403

There's been a cluster of Perl-hate on Stack Overflow lately, so I thought I'd bring my "Five things you hate about your favorite language" question to Stack Overflow. Take your favorite language and tell me five things you hate about it. Those might be things that just annoy you, admitted design flaws, recognized performance problems, or any other category. You just have to hate it, and it has to be your favorite language.

Don't compare it to another language, and don't talk about languages that you already hate. Don't talk about the things you like in your favorite language. I just want to hear the things that you hate but tolerate so you can use all of the other stuff, and I want to hear it about the language you wished other people would use.

I ask this whenever someone tries to push their favorite language on me, and sometimes as an interview question. If someone can't find five things to hate about his favorite tool, he doesn't know it well enough to either advocate it or pull in the big dollars using it. He hasn't used it in enough different situations to fully explore it. He's advocating it as a culture or religion, which means that if I don't choose his favorite technology, I'm wrong.

I don't care that much which language you use. Don't want to use a particular language? Then don't. You go through due diligence to make an informed choice and still don't use it? Fine. Sometimes the right answer is "You have a strong programming team with good practices and a lot of experience in Bar. Changing to Foo would be stupid."


This is a good question for code reviews too. People who really know a codebase will have all sorts of suggestions for it, and those who don't know it so well have non-specific complaints. I ask things like "If you could start over on this project, what would you do differently?" In this fantasy land, users and programmers get to complain about anything and everything they don't like. "I want a better interface", "I want to separate the model from the view", "I'd use this module instead of this other one", "I'd rename this set of methods", or whatever they really don't like about the current situation. That's how I get a handle on how much a particular developer knows about the codebase. It's also a clue about how much of the programmer's ego is tied up in what he's telling me.

Hate isn't the only dimension of figuring out how much people know, but I've found it to be a pretty good one. The things that they hate also give me a clue how well they are thinking about the subject.

Tim Post
  • 33,371
  • 15
  • 110
  • 174
brian d foy
  • 129,424
  • 31
  • 207
  • 592
  • 11
    This is a really nice spin on the old "your favorite language" question. Good justification. – Tom Leys Nov 11 '08 at 23:03
  • 14
    I find it interesting that despite SO having a large .NET audience, at the time of this writing there are 24 answers, only one of which (mine) is about .NET or a .NET language. I have no idea what this says about SO or .NET, but it's interesting... – Jon Skeet Nov 11 '08 at 23:40
  • 22
    The first 15 years of programming with C/C++, I hated (in alphabetical order): 1. Pointers 2. Pointers 3. Pointers 4. Pointers 5. Pointers – ileon Mar 10 '10 at 12:01
  • 4
    I wonder how many comments people made about hating their language of choice because they didn't understand how to program in their language of choice.... – Kris.Mitchell May 25 '10 at 19:12
  • Many people make comments showing they don't know their favorite language. That's one of the beautiful things about this question: it quickly shows how much you've thought and learned without having to ask something specific. – brian d foy May 25 '10 at 21:03
  • 3
    This is a fantastic question. If you're wondering what some language is like, reading 3 different replies about it on this page would be *easily* the best useful-information-for-time-spent you could find. Also a great way to gauge a programmer's experience (and humility) levels if you already know the language. – j_random_hacker Jun 01 '10 at 13:11
  • @Andrew: The thing I don't like about lolcode is that your comment doesn't compile in it. Shows a lack of vision on the part of the authors… – Donal Fellows Nov 28 '10 at 17:39
  • 1
    Well, the question certainly provokes a response, if not a real answer. Five things... why five? Anyway, I agree that inability to find a defect in one's favourite language can indeed show one's lack of knowledge of the tool. When I first read the title, I thought: "Right, I may dislike something in Delphi, but why *hate*?" But after I read the point mentioned I could see its validity: my knowledge of Delphi is really incomplete, quite incomplete. And yet when I have started hating something in my favourite language, I wonder how long I will be allowing myself to call it my *favourite*... – Andriy M Jan 22 '11 at 14:03

182 Answers182

215

Wow, I'm surprised that SQL hasn't made it up here yet. Guess that means nobody loves it :)

  • Inconsistent syntax across implementations
  • Subtle code differences can have massive performance ramifications for seemingly obscure reasons
  • Poor support for text manipulation
  • Easy cost of entry but steep learning curve towards mastering the language
  • Minimal standardization across the community for best practices, this includes syntax style.

...And a few bonus reasons to hate it, at no extra charge

  • the WHERE clause goes last, making it easy to prematurely execute an UPDATE or DELETE, destroying the whole table. Instead, the WHERE should go somewhere up front.
  • It's difficult to implement relational division.
  • I can set a value to NULL, but I can't test it for equality with NULL. I can check IS NULL, but that just complicates code -- needlessly so, in my opinion.
  • Why do we need to completely respecify the formula for a GROUPed column, rather than setting an alias on the column and then GROUP BY the alias (or column index as with SORT)?
Chris Wuestefeld
  • 3,266
  • 2
  • 23
  • 23
  • 7
    Maybe nobody can learn to love it until they stop thinking of it as a language. :) – Alan Moore Nov 24 '08 at 04:36
  • 4
    +1 for everything. And yet people wonder why I'll put up with the headaches of ORM... – James Schek Nov 24 '08 at 15:27
  • For the record, all I do for a living is write SQL :) –  Nov 25 '08 at 14:55
  • Apparently, we need an open-standard SQL parser that DB vendors can plug in and merely be responsible for the backend data retrieval... – Tanktalus Nov 28 '08 at 19:00
  • 2
    @Alan M...isn't that what the L stands for? :) – Kev Dec 09 '08 at 19:00
  • @Kev I thought it stood for Legume. –  Jan 02 '09 at 13:47
  • 29
    I can't understand why the syntax for INSERT is so different from UPDATE. And MERGE is incomprehensible. – LaJmOn Jan 14 '09 at 15:39
  • Poor support for text manipulation? –  Feb 06 '09 at 20:59
  • 1
    @Dalin in comparison with, say C# or Ruby, SQL's text manipulation is god awful, especially when you take regex text replacement into account. –  Feb 08 '09 at 23:16
  • 1
    SQL isn't a shining example of language design, but many constraints are imposed on the architecture by query optimisation and the mechanical component to database operations. SSDs notwithstanding, database development is more or less unique in that SQL is a declarative language controlling operations with a mechanical component - disk heads moving and rotational latency. Not subject to Moore's law. http://stackoverflow.com/questions/339744/better-languages-than-sql-for-stored-procedures – ConcernedOfTunbridgeWells May 04 '10 at 08:28
  • I am a huge fan of SQL, but I hate the fact it lacks Regex or any other advanced string manipulationoptions. – TimothyAWiseman May 25 '10 at 16:56
  • My general feeling about string manipulation and SQL is “do it in something else if you can, almost anything will do”. If only no queries ever required it… – Donal Fellows May 25 '10 at 22:16
  • LOVE your bits about checking NULL and not being able to GROUP by an alias! Seriously. The compiler can't internally translate " [!]= NULL" into [NOT ]IS NULL" ?? – eidylon May 29 '10 at 19:02
  • I can't write `SELECT col1, col2, col3, col4, col5, from` – xenoterracide Jul 16 '10 at 00:47
  • @All "SQL sucks for string manipulation" commenters: In some legacy code of my company there is a scripting language implemented entirely in T-SQL (SQL Server 2000), I once had to modify it.. that was... interesting. – Earlz Aug 20 '10 at 04:29
  • 3
    The necessity of IS NULL should be clear, if you consider that NULL is a third possible result, right after TRUE and FALSE. Since it's meaning is "unknown" you can not tell if something which is unknown matches another thing which is unknown as well. Another example: if NULL equals NULL this would mean that the whole concept of making JOINs would be impossible, since any NULL value could be matched to another NULL value. If you understand this (what also is called ternary logic) than you might understand the reason for introducing the "IS" operator for testing against NULL. – Alex Aug 26 '10 at 16:58
  • 1
    Vash is right. Another (easier to digest?) way of putting it: if you made NULL = NULL, then you don't *remove* weirdness from the language, you just push it into other, even more inconvenient places. – j_random_hacker Sep 09 '10 at 04:43
  • 1
    +1 for missing WHERE clause havoc. Thank $deity for ROLLBACK; – al. Sep 16 '10 at 12:11
  • I'm not sure if it's the language, implementation, or the users but it's always undercommented. At least some places in some implementations it will delete the comments anyway. I'm looking at you MS views, some clown always opens it in design mode sooner or later. – dwidel Jan 13 '11 at 17:09
182

Five things I hate about Java:

  • No first-class functions.
  • No type inference.
  • Lack of sane defaults in eg graphics.
  • NullPointerException not containing more information about what is null.
  • The proliferation of pointlessly "configurable" frameworks/service provider interfaces/factory classes/dependency injection systems. The configurability is almost never used, DRY is violated egregiously, and code quadruples in size and halves in legibility.

I know, I should check out Scala.

Zarkonnen
  • 22,200
  • 14
  • 65
  • 81
  • Do you have any idea to make Java's NPE contain information about what is null? – grayger Feb 25 '09 at 15:36
  • @grayger I wish I had some kind of idea, but I don't. It's admittedly not a trivial problem, as the thing that may be null may not be assigned to any variable. – Zarkonnen Feb 26 '09 at 16:24
  • 7
    @both: The NPE is shown in the first line of the stack trance. It contains ( most of the time ) class,java file name, and line number like: "at your.faulty.code.Instance( Intance.java:1234 )" Then you just open that file, go to that line and there it is, a variable which has nothing assigned to it. – OscarRyz Jun 25 '09 at 20:24
  • 35
    @Oscar Reyes - Er, we know that. But there may be multiple variables on that line, and the exception message doesn't tell me which one is null. – Zarkonnen Oct 24 '09 at 10:09
  • I was about to say scala as I was reading this. We're learning it as part of a course. Amazing stuff. – Ape-inago Nov 18 '09 at 22:20
  • 10
    Scala has its warts too. However, it is magnificently better than Java. – wheaties Dec 19 '09 at 21:16
  • @Zarkonnen : yeah, but when you know the line, a simple debug can tell you the incriminated variable – Valentin Rocher Jan 29 '10 at 22:09
  • 2
    @Bishiboosh Yes, if you can replicate the problem, and it's on your own machine so you can attach a debugger, and it's not in a loop that goes around 10000 times... – Zarkonnen Jan 30 '10 at 11:19
  • 10
    +1 for the proliferation of frameworks etc. – Erich Kitzmueller Feb 16 '10 at 12:52
  • 6
    @Valentin, just imagine the fun of the NullPointerException being in a gigantic logfile from a nightly run and you need to figure out what happened... Debugging is not an option. – Thorbjørn Ravn Andersen Feb 21 '10 at 20:26
  • If you use Eclipse (or anything similar), you can set a breakpoint at the line, then set breakpoint properties to only stop when the variables are false - otherwise it would continue on. In other words, conditional breaks. – nevets1219 Mar 22 '10 at 18:10
  • you always trade one evil against another – Chris May 23 '10 at 11:09
  • @grayger, write your code so there is only _one_ candidate in each source line - i.e. _one_ array index - [..] - or _one_ period - foo.bar() - in each line. Then there is no doubt which one caused the NPE. – Thorbjørn Ravn Andersen Jun 26 '10 at 20:56
  • @Thorbjørn Ravn Andersen So my method (with 5 parameters) call should be on 5 lines? :p – Jeriho Sep 08 '10 at 14:03
  • @Jeriho, naturally not as all your parameters are already calculated and placed in local variables. – Thorbjørn Ravn Andersen Sep 08 '10 at 15:09
  • 1
    @Thorbjørn Ravn Andersen, I disagree strongly: adding extra variables just to hold a value that's used once add a lot of mental overhead for the reader and make the code more verbose. (Obviously, it's OK to convert code to do this temporarily as a debugging technique.) – Zarkonnen Sep 08 '10 at 17:39
  • @Zarkonnen, "conversion of code temporarily as a debugging technique" does not help much when you need to find an issue in production which cannot be reproduced, and you are not allowed to change the code. Feel free to disagree, and come back when you've had the 3 AM call... – Thorbjørn Ravn Andersen Sep 08 '10 at 17:59
  • @Thorbjørn Ravn Andersen: "Not allowed to change the code"? I'd run away. Quickly. – configurator Sep 16 '10 at 20:53
  • @configurator, we are talking production code here, and the issue happens in production. I don't know about you, but we are simply not allowed to change code in production which has undergone acceptance test etc. – Thorbjørn Ravn Andersen Sep 16 '10 at 21:36
  • @Thorbjørn Ravn Andersen: Okay, that makes a bit more sense :) I think you should be allowed to change production code to add logging if that's the only change you make, but I'm not sure how that would be accepted in most places. – configurator Sep 17 '10 at 19:32
  • @configurator, in a true emergency anything goes, but then comes the question why the log statements were not in the code in the first place, and why you need to insert them to find out which candidate on the source line were the culprit. In other words, the defensive coding I started mentioning. – Thorbjørn Ravn Andersen Sep 17 '10 at 19:58
158

JavaScript:

  1. All the coolest things are insanely complex, but then, all the coolness is also wrapped up in such a small amount of code that you feel stupid for struggling to follow it

  2. '+' is an absurd choice of operator for concatenation in a weakly-typed language. Were they trying to scare off the noobs?

  3. It's a cross-browser compatibility minefield (never mind if it's even turned on or not)

  4. It's generally untrusted - associated with scummery such as blocking the back button, pop-ups that never die, etc.

  5. It's nearly impossible to debug because there are only a few different error messages and a few different types (Number, String, Object, etc.)

If it wasn't for jQuery, I'd probably still hate it as much as I used to :)

animuson
  • 53,861
  • 28
  • 137
  • 147
jTresidder
  • 466
  • 1
  • 3
  • 8
  • I wonder how many total programmer hours have been spent on trying to disable the back button. Has to be millions and millions, if not billions. – MusiGenesis Nov 14 '08 at 21:30
  • 1
    Javascript is indeed the fugliest language... except for all those others. – JoeBloggs Nov 19 '08 at 16:01
  • It appears we need to work on natural language programming again for the sake of beauty! – Albert Dec 05 '08 at 17:45
  • 15
    I agree with mausch. ECMAscript in and of itself is a beautiful and powerful language. It's the pesky browsers (:cough: IE) that muddle its name. – TJ L Feb 06 '09 at 20:54
  • ...and here I was thinking beauty was subjective :) – jTresidder Feb 07 '09 at 14:44
  • 32
    @Mausch: where does javascript live in the *vast* majority of cases? You're saying the equivalent of "cars don't contribute to global warming, it's driving cars that does it" - true, of course, but missing the point - what else do you do with a car? – jTresidder Feb 07 '09 at 14:47
  • 1
    I would like an argument for #3. In some cases it makes perfect sense (to me) for numbers and strings to share a similar operator that does something different to each. For example, Python has "2*2" for 4 and "'yes'*2" for "yesyes". Same operator, different meaning. I think this makes perfect sense. – Chris Lutz Feb 19 '09 at 07:01
  • 20
    @Chris: Yes, "+" is a good operator for concatenation in a strongly typed language (like Python). In a weakly typed language (like Javascript or C) it is terrible; it decides (silently!) that 'sum: '+2+3 is not 'sum: 5' but 'sum: 23'. Someone with more Javascript experience can give better examples. – ShreevatsaR Feb 20 '09 at 00:01
  • 1
    So your problem is not the use of + to be addition and concatenation, but the absurd contextual rules that the language uses to determine which one to do? – Chris Lutz Feb 28 '09 at 05:49
  • 4
    Undeclared identifiers are global variables. Eeek! – Martijn Mar 27 '09 at 17:23
  • 2
    @ShreevatsaR: C is weakly typed? – Blindy Jun 05 '09 at 18:04
  • 2
    @shreevatsaR: since when is C a weakly typed language? oO – knittl Sep 10 '09 at 09:23
  • 3
    The beauty of javascript is it keeps me employed – Mike Robinson Dec 31 '09 at 20:42
  • 2
    *JQuery* is fugly. JQuery code looks like somebody who likes to eat a lot of brackets got sick. – Pekka Feb 07 '10 at 21:28
  • 5
    Yes, C is weakly typed, compared to, say, Python (e.g. you can assign integers to `char`s, cast anything to anything via void* pointers, etc.) It is *statically* typed instead of *dynamically* typed, and also requires *explicit* typing instead of type inference, but those are unrelated to strong v/s weak typing. [Random examples: Python has implicit dynamic strong typing, Haskell has (optionally explicit) static strong typing, Java has explicit (mostly static) strong typing, C has explicit static (relatively weak) typing.] "Strongly typed" and "weakly typed" are actually not well-defined. – ShreevatsaR Apr 27 '10 at 21:16
  • I never want to have 'max' returned as a value. – graham.reeds May 04 '10 at 09:11
  • 2
    @ShreevatsaR: C is strongly & statically typed. Maybe you need a beginner's textbook. – Viet May 12 '10 at 02:04
  • 4
    @Viet: Can you state your definition of strongly typed? (As I've already said, "strongly typed" is not well defined. See http://www.c2.com/cgi/wiki?StronglyTyped — by most of those definitions, C is less strongly typed than Python or Ocaml.) My definition of strongly typed, which I already made clear from context, is that casts are not silently performed. This is the sense relevant to JavaScript and this question, anyway. – ShreevatsaR May 12 '10 at 04:49
  • Would web applications be a lot more advanced now, if all browsers had been gifted with a bytecode interpreter from the start? – Chris S May 23 '10 at 12:24
  • 5
    @ShreevatsaR The clasical example is: `'3'+'2'='32'`, `'3'-'2'=1`. – Thomas Ahle May 25 '10 at 18:19
  • 3
    javascript has no "proper" associative arrays: you cannot use arbitrary objects as keys. I find this mindboggling. – deubeulyou May 25 '10 at 18:33
  • 3
    If it's fugly you're doing it wrong. – Justin Ludwig May 25 '10 at 19:59
  • 1
    Well, as for #7, you're lucky if you get an error message at all. In most JS environments I've seen, the only "error message" is causing the script to terminate silently. D: – MiffTheFox May 25 '10 at 20:31
  • 1
    i'd add a bullet point for broken scoping rules for closures necessitating stuff like: var that = this; – Nathan Hughes May 25 '10 at 20:51
  • no JS specifically but I hate the DOM – xenoterracide Jul 16 '10 at 00:50
  • 1
    I strongly disagree with Mauricio Scheffer: DOM and the browser-dependent APIs are indeed very bad, but the language itself is also pretty terrible. I actually refused to touch it until I found jQuery. – reinierpost Aug 26 '10 at 16:24
  • JavaScript is a language of politics. That's why typeoff(null) is object. Some guy made a mistake in LiveScript. JScript copied the mistake. Now the mistake's an ECMAscript standard. – diadem Sep 09 '10 at 17:16
  • @Gordon Tucker: What would you want it to return? – configurator Sep 16 '10 at 21:14
  • @Gordon Tucker: oh, that makes sense. I was thinking you're saying it returns that as opposed to something else it should have returned. – configurator Sep 17 '10 at 19:51
  • 1
    JavaScript has a tendency to be mistaken as an ugly version of Java or C by people who don't know enough JavaScript. It's a damn pretty language when you truly know it. – Ates Goral Sep 19 '10 at 01:55
  • Disagree with mostly everything: There are very few incompatibilities between browsers on the language side of things, DOM is the problem. JavaScript can be very stylish, if you know what you're doing. If you don't, you'll scatter a lot of procedural code in html, rather than write nice OO code in js files, where it belongs. I would call it the best of both worlds if JavaScript added optional type checking with classes, as did ActionScript. – Ruan Mendes Nov 03 '10 at 19:38
148

PHP:

1) Forces me to make unnecessary variables:

$parts = explode('|', $string);
$first = $parts[0];

2) An implementation of lambdas so lame it is roughly equivalent to using eval() and so hideously wrong I have never used it (see http://www.php.net/create_function).

3) A try/catch system which can only catch about 80% of errors that might occur.

4) Regex support just as lame as lambda support because it has to be written inside regular strings, making one of the most hard-to-learn programming tools about three times as difficult. And PHP is supposed to be an "easy" language?!?!?

5) No way to safely pull stuff out of $_POST without writing it twice or building your own function, or using the '@' operator:

$x = isset($_POST['foo']['bar']) ? $_POST['foo']['bar'] : null;

6) Bonus answer: '@'. If you can't be bothered writing your code correctly, just add '@', and too bad for anyone who has to debug your code later.

Matt Fenwick
  • 48,199
  • 22
  • 128
  • 192
too much php
  • 88,666
  • 34
  • 128
  • 138
  • 44
    what about list($first) = explode('|', $string); ? – mlarsen Nov 12 '08 at 06:56
  • 3
    or $first = explode('|', $string); $first = $first[0]; – Pim Jager Nov 15 '08 at 11:04
  • 44
    Ideally, I would like to use some_function(explode('|', $string)[0]); – too much php Nov 16 '08 at 21:10
  • 2
    Best solution for #1 is to use strtok. That only works if you're getting the first element - otherwise list is the only other method I can think of (apart from using some hideous regex...). I, too, would love to add [0] to the end of functions. It's very neat and intuitive. – DisgruntledGoat Jan 05 '09 at 21:58
  • Btw for 5. you cant check isset within a function, php is gonna yell at you for sending an undefined variable into the function. – Ólafur Waage Feb 19 '09 at 10:22
  • 1
    What about its weird variable scoping? – Leonardo Herrera Jun 25 '09 at 21:39
  • 8
    What weird variable scoping? Having everything local and forcing you to declare when you want to use a global is a good idea, it prevent noobs from making functions that just use globals, rather than using arguments and return values like they should do. – scragar Sep 10 '09 at 09:12
  • 24
    you forgot about functions with parameter order changing randomly – dusoft Oct 09 '09 at 20:43
  • 2
    It's funny looking at this, because almost all these gripes have been addressed in newer versions of PHP. Mainly real lambdas and the ternary shortcut operator. Also, by setting a simple error handler, you can convert all PHP errors (notices, warnings, etc) to Exceptions, so they can be caught by try/catch blocks. – jason Nov 01 '09 at 18:29
  • 2
    5.3 has fixed #2, and that is all. Custom error handlers still can't catch fatal errors, so try/catch still can't catch all errors. – too much php Nov 02 '09 at 00:25
  • 2
    @too much php, consider fatal errors to compiler errors. In languages like Java and C# if you leave a semicolon out or make a syntax error which doesn't let it compile, you would get a compiler error the same way you get fatal errors in php – Ali Nov 02 '09 at 17:24
  • 2
    @Click Upvote: But Fatal errors are not the same as compile errors - if you have `null` instead of an object than trying to call a method results in a Fatal Error. Could you imagine trying to build a reliable Java program if the NullPointerException instantly crashed your program and there was no way to catch the exception? – too much php Nov 02 '09 at 23:35
  • How does #4 make the language harder? And why would you consider it being one of the hardest to learn? That is simply not true. – Franz Nov 04 '09 at 11:36
  • My favorite part is I thought of explode and having to toss it into a separate variable first too when I was listening to the last SO podcast – Andrew G. Johnson Nov 09 '09 at 03:39
  • 4
    @Franz: I think he meant that regex is a hard language - and I'd concur. It's hard enough to keep track of escaping for regex, without adding string-escaping as well. – K Prime Nov 23 '09 at 06:01
  • @1: http://stackoverflow.com/questions/1965017/php-syntax-arrays-and-errors/1965035#1965035 – Alix Axel Dec 28 '09 at 02:13
  • 6
    $parts = current(explode('|', $string)); – Galen May 04 '10 at 03:42
  • 1
    PHP 5.3.0+ has nice lambda-like functions: http://php.net/manual/en/functions.anonymous.php – Felix May 23 '10 at 12:21
  • 7
  • 39
    You forgot about verbNoun, verb_noun, noun_verb, nounverb, verbnoun, nounVerb, etc >_> – Warty May 23 '10 at 18:10
  • To solve the first problem: function elem($array, $key) { return $array[$key]; } ... elem(explode('|', $string), 0); – Ollie Saunders May 25 '10 at 18:05
  • 1
    @Ollie: When you're writing library code that you need to run anywhere, it's dangerous to define functions with short names (as it will likely clash with something else somewhere), and a longer function name just isn't convenient any more. Also, the function call is expensive, especially when you need to handle more than one $key. – too much php May 25 '10 at 22:02
  • For #1: Why not $first = reset(explode('|', $string)); I do agree with the rest though... also, for #1 it is such a hack to use reset there... sigh – SeanJA May 26 '10 at 16:13
  • @too much php: Even in php 5.3 lambda are poorly design, you are oblige to specify which variable you want to capture and you could even not capture $this and self ... – mathk Aug 07 '10 at 09:51
  • 1
    #1 should be `substr($string, 0, strchr($string, '|'))`. – Billy ONeal Sep 09 '10 at 17:13
135

C++

  • Far too easy to randomly corrupt memory and create almost impossible-to-find bugs (although, Valgrind goes a long way towards fixing this).
  • Template error messages.
  • When using templates it's easy to end up having to include everything in one file, and then get stupid compile times.
  • The standard library is a joke in the modern age (still no threads or network by default?)
  • Lots of nasty little bits of C poking through (in particular, all the conversions between short/int/unsigned/etc..)
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Chris Jefferson
  • 7,225
  • 11
  • 43
  • 66
129

C# / .NET:

  • Classes should be sealed by default
  • There should be no lock statement - instead, you should have specific locking objects, and there should be methods such as Acquire which return disposable lock tokens. Corollary: there shouldn't be a monitor for every object.
  • GetHashCode() and Equals() shouldn't be in System.Object - not everything's suitable for hashing. Instead, have an IdentityComparer which does the same thing, and keep the IComparer<T>, IComparable<T>, IEqualityComparer<T> and IEquatable<T> interfaces for custom comparisons.
  • Poor support for immutability
  • Poor way of discovering extension methods - it should be a much more conscious decision than just the fact that I'm using a namespace.

Those were off the top of my head - ask me tomorrow and I'll come up with a different 5 :)

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
  • 2
    Java has hashCode() and equals() methods as methods on Object, and I find this to be a very reasonable design. As it makes semantic sense for every object to be able to compare itself against other objects and generate its own hash code I am not understanding why you are opposed to this. – Ryan Delucchi Nov 11 '08 at 22:41
  • 4
    I really don't agree with classes being sealed by default. But hey, it's your list I suppose. – JSmyth Nov 11 '08 at 22:52
  • 3
    @Eric: for most classes, deriving doesn't make sense and most classes actually support it poorly. By default, every virtual class should be abstract and every other class sealed, meaning that you could only have leaf classes as dynamic types, never node classes in the inheritance hierarchy. – Konrad Rudolph Nov 11 '08 at 23:10
  • 22
    Sealed by default: inheritance should either be designed into a class (which takes time and limits future options) or prohibited. hashCode/equals: it sucks in Java too. One day I'll write a long blog post about it. Read Effective Java for details of why equals is hard in inheritance chains. – Jon Skeet Nov 11 '08 at 23:37
  • 88
    Sealing by default means that you have thought of every possible reason that someone may want to inherit from your class and you don't think any of them make sense. Sorry, but none of us are that smart. – Ed S. Nov 12 '08 at 01:08
  • 69
    In that case I'm not smart enough for you to derive from my code: because I can't predict what future changes I might make which could break your code. That's a very significant problem, IMO. Sealing the code is more restrictive, but leads to more implementation freedom and robustness. – Jon Skeet Nov 12 '08 at 02:38
  • I agree with all except #3: how can an IEquatable help with the fact that equals() is broken under an inheritance chain? – Buu Nov 12 '08 at 10:30
  • 3
    @Buu: You'd usually only use IEquatable when only one sense of equality was sensible, which would usually exclude unsealed types. For other situations you'd use an IEqualityComparer, which is effectively context-sensitive: "I'll compare for equality in way because that's what I care about." – Jon Skeet Nov 12 '08 at 10:50
  • Hi Jon can you elaborate more on why inheritance should be prohibited? If inheritance is designed into a class wouldn't that mean that the class would be very massive and represent multiple entities? I can see there will be many switch statements inside the class. – RWendi Nov 13 '08 at 13:17
  • 1
    RWendi: Designing for inheritance doesn't mean that it has to be massive or already know what the subclasses will do, exactly. It just has to know which bevahiours may be specialised, and deal with them appropriately. (Continued in next comment) – Jon Skeet Nov 13 '08 at 13:41
  • 1
    I have a blog post on the "inheritance tax": http://msmvps.com/blogs/jon_skeet/archive/2006/03/04/inheritancetax.aspx It's fairly old now - I may have to rewrite it some time. Josh Bloch (unsurprisingly) does a better job in Effective Java. See item 17 in the second edition. – Jon Skeet Nov 13 '08 at 13:42
  • 11
    I can't believe no-one mentioned the "goto case" syntax, I hate that one! – Aistina Dec 09 '08 at 19:07
  • 1
    Glad you aren't Anders! This business of "sealed by default" is just a bridge too far for me. It sounds like propaganda from some incomprehensible Java Community Process community with some kind nonsense JSR assigned to it. – BobbyShaftoe Dec 10 '08 at 21:56
  • 4
    I'd 'kill' anyone that will make all classes sealed by default in .Net, even if it tries to hide on the other side of the moon. Actually I have a better "Idea", ban the sealed keyword .... – Pop Catalin Dec 10 '08 at 22:03
  • 4
    @Pop: I think we'll have to agree to disagree then. I *strongly* urge you to read Josh Bloch's "Effective Java" on the topic though. – Jon Skeet Dec 10 '08 at 22:51
  • @Bobby: I don't see what this has to do with the JCP at all. Is that just because I mentioned Effective Java? Let me know when you have wisdom to match that of Josh Bloch... – Jon Skeet Dec 10 '08 at 22:52
  • 4
    @Pop: I think a death threat is a pretty extreme reaction to a suggestion that is as reasonable as wearing a seatbelt. – MusiGenesis Dec 12 '08 at 15:26
  • 1
    @MusiGenesis: it's a metaphor to show my extreme position regarding this, and that I'm strongly against it. I know it's bad to be at extremes, but in this case I'm combating an extreme solution with a extreme attitude :P – Pop Catalin Dec 15 '08 at 09:06
  • 1
    @MusiGenesis: guess not everyone knows about that classic vb 6 joke: "code like the next person maintaining the code is a psycho maniac killer that knows where you live", or that everyone digs this kind of jokes... – Pop Catalin Dec 15 '08 at 09:21
  • 4
    @Musigenesis: I think we must have a different idea of "extreme". I'm saying that I believe that the *default* should have been sealed. I'm not trying to ban inheritance - you could still explicitly unseal a class. By being explicit, you'd be showing that you've thought about the consequences. – Jon Skeet Dec 15 '08 at 09:41
  • 4
    I'm going to go ahead and agree with Jon Skeet on the subject of keeping classes sealed by default. If you want something to be inheritable, make it so. Don't assume that every class should be inheritable, though. – Alex Fort Dec 16 '08 at 19:27
  • @Jon: by "extreme" I was referring to Pop's saying that he would 'kill' anyone who sealed classes by default (I know he didn't really mean that). I agree 100% with sealing classes by default - it makes sense like wearing a seatbelt makes sense. :) – MusiGenesis Dec 16 '08 at 21:57
  • @Musigenesis: Sorry, my comment should have been to Pop, who was claiming that my idea was an "extreme solution". – Jon Skeet Dec 17 '08 at 07:28
  • no friend class support. – Kon Jan 02 '09 at 13:45
  • 1
    +10 for "there shouldn't be a monitor (or even an index into the lazily-created monitor table, which I believe is the present situation) for every object" – Doug McClean Jan 03 '09 at 17:42
  • 3
    Good list. I agree with every point, and in particular the "sealed by default" and no implicit support for comparison/hash-code. There should be as few built-in things in the base object as possible, and everything else should be explicitly specified that a class supports it. – Lasse V. Karlsen Jan 03 '09 at 21:48
  • 2
    +1 for sealing classes by default. I strongly believe (and Jon stated it above already) that designing a class that PROPERLY supports inheritance is an order of magnitude harder than designing a sealed, immutable class. Thus "allow inheritance" should be a conscious decision. – Milan Gardian Jan 23 '09 at 15:48
  • 4
    +1 for sealing by default. Planned Inheritance: The contract of a class must describe what derived classes must, may and can't do. – peterchen Jan 26 '09 at 16:33
  • 4
    +1 for poor immutability support. I always prefer immutable data structures. – Anton Tykhyy Mar 24 '09 at 10:12
  • 2
    You really don't hate array covariance!? – Mehrdad Afshari Apr 21 '09 at 20:48
  • @Mehrdad: I don't like it, but it was *somewhat* useful pre-generics. It's not a big "hate" for me. – Jon Skeet Apr 21 '09 at 21:15
  • 1
    The biggest problem I have with classes being sealed is the difficulty in mocking them for Fitnesse or Unit tests. The biggest example that comes to mind is HttpContext - it can't be extended, and only implements IServiceProvidor. If I want to mock a call to a function that takes an HttpContext, it would be nice to pass in a MockHttpContext that extends/overrides HttpContext. Instead, you have to create an instance of HttpContext and populate it, and there's no way to spy what functions were called. Even Rhino Mock can't deal with a sealed class. – Matt Poush Jun 25 '09 at 20:31
  • 7
    @Matt: To me, that says that HttpContext should implement a suitable interface, not that it should be unsealed. Overriding arbitrary methods of classes without understanding whether internally one of those methods would normally call another is just replacing one problem with a different one, IMO. – Jon Skeet Jun 25 '09 at 20:56
  • I think I could live with sealing by default as long as there was a keyword to allow you to override the sealing: Please allow us to run with scissors if we want to! I think a better solution (which could actually be implemented in a future version of C#/.NET) would be a DesignedForInheritanceAttribute and a warning from the compiler when a class derives from it anyway. – Rasmus Faber Sep 10 '09 at 08:56
  • 1
    You'd be able to override the sealing at the *base* class level obviously, but not at the *derived* level. If I design a class not to be derived from, I don't want that to be violated. – Jon Skeet Sep 10 '09 at 09:03
  • Here's my 2c on default sealing of classes. This should be done. Even in the framework itself, this causes troubles. For instance, once upon a time, I wanted to extend some of `List` 's default behavoiur (specifically, I wanted to add events for Add, Remove, etc). So away I go and derive from `List` which worked, but then I couldn't actually do anything from there... – Matthew Scharley Sep 16 '09 at 06:41
  • Wow, It's been a long time since I looked at this topic :). I do understand your point about 'sealed by default'. Inheritance is often overused and used incorrectly. However, in practice I doubt that sealed by default would make our lives any better. In my own code I wouldn't care because I can change it as I see fit (I don't develop public libraries). Unfortunately, elegantly designed third party API's are the exception, not the rule. So, what does this mean? It would probably mean that almost every darn class in the API I am using is sealed. I would rather be able to inherit from – Ed S. Nov 25 '09 at 06:41
  • 1
    these deficient classes if needed than to be blocked out entirely. Since this theoretical API was designed poorly to begin with, I highly doubt that they have provided sufficient flexibility in their interface for me to accomplish what I need, so now I am screwed. In theory I think that you may be right, in practice, at best, I doubt that it would help. – Ed S. Nov 25 '09 at 06:44
  • What about Mutex class? I think it solves 2nd issue. – terR0Q Nov 25 '09 at 07:42
  • @terR0Q: Yes, but at the cost of being a full Win32 kernel object instead of a lightweight .NET lock. – Jon Skeet Nov 25 '09 at 07:54
  • (It also doesn't free "lock" from being a keyword, which is one of the annoyances of the current situation.) – Jon Skeet Nov 25 '09 at 07:55
  • @Jon Skeet Yep, Mutex is heavy. But managing lock tokens involves more information and actions that can be mishandled while lock introduces only one more variable handling per lock (and that's definitely easier). And we always can implement tokens support system if we really need them in a project :) Concerning syntax, well, there are pros and cons of equal weight: keyword (bad as it is, yet better readability), brackets (more indentation, yet we have better view of what is being locked), some strange variable doing some strange business inside :) – terR0Q Nov 25 '09 at 09:55
  • No array properties. No constants inside a method. – Loren Pechtel Jan 02 '10 at 05:39
  • I believe in C# everything should be virtual by default.. – Tigraine May 04 '10 at 12:05
  • 20
    It's a good thing Jon Skeet didn't design C#, or my list would look like "1. classes are sealed by default; 2. locking is too complicated; 3. most objects aren't hashable"! – Gabe May 23 '10 at 21:27
  • 2
    @Gabe: Locking would still be easy to do *right* - it's only *bad* locking (e.g. locking on "this" or typeof(...)) which would be broken. And you could still use any type in a hash table - just use the ReferenceEqualityComparer which would obviously be required. – Jon Skeet Jun 01 '10 at 14:04
  • @John Skeet, Now is tomorrow++. What 5 do you have today? – Thorbjørn Ravn Andersen Sep 08 '10 at 18:05
  • 2
    @Thorbjørn: They're still the same, as it happens :) – Jon Skeet Sep 08 '10 at 18:40
113

C

  • string manipulation.

Having to deal manually with the string buffers is an error-prone pain. Since so much computing is really moving and modifying strings (computers aren't used quite as much for big number-crunching stuff as people thought they'd be way back when), it's really nice to be able to use managed languages or C++'s string objects to deal with these. When I have to do it in straight C, it feels like swimming in quicksand.

Michael Burr
  • 333,147
  • 50
  • 533
  • 760
  • 50
    Agreed. String manipulation is item 1 through 5 of things I hate about C. – BoltBait Nov 11 '08 at 23:11
  • I guess I wasn't too interested in coming up with 4 others - that one is just a real bear. Also, I suppose straight C isn't really my 'favorite' language, so maybe I should have just passed on this question. – Michael Burr Nov 11 '08 at 23:50
  • String manipulation in C is great, all you have to be able to do is count. Compare it with the syntax nightmare of using istringstream in c++ – Martin Beckett Nov 14 '08 at 00:54
  • 1
    Just use DJB's safe string library or something. XML manipulation is difficult in most languages, and a lot of programs do XML manipulation, but you don't see many posts saying "Perl is totally broken because it doesn't support DOM nodes as a primitive data type". They use a library. – Steve Jessop Nov 15 '08 at 01:19
  • 5
    C string manipulation does suck, but as far as language issues go, it's not the worst. – Chris Lutz Feb 19 '09 at 07:15
  • Okay, I really really don't get this complaint. C is a low level language, system work. It is not meant for UI stuff, not compared to modern languages. This is a case of trying to put on elephant robes on a donkey. You're asking C to do something it really doesn't want to do. C has enough problems, string manipulation is just using a hammer instead of a philips screw. – Daniel Goldberg Oct 30 '09 at 14:32
  • I don't know what else to say - I don't really do much in the way of UI programming so it's not that. But I also don't do a whole lot of number crunching. I still find myself doing a lot of string manipulation, and it's generally more painful to do in C compared to C++ or other languages. I use C an awful lot, and I don't hate it. But I wish dealing with strings was somehow less difficult. I can't tell you how that might look since I haven't thought much about fixing it at the language level. I have library routines that help quite a bit, but they still require more effort than I'd like. – Michael Burr Oct 30 '09 at 15:04
  • 3
    strcat to concatenate, but wait... does the destination have enough space... ok, must insert if statement to check... but wait, what if my string is on the heap? Ok, must keep a variable around to keep track of size... And this can go on and on and on... – blwy10 Nov 12 '09 at 14:32
  • 1
    Maybe I'm daft and haven't used much of C itself, but couldn't you just make an abstract data type for char* (and relevant properties) in a struct and call it string? – Thomas Eding Jan 17 '10 at 00:43
  • 1
    @trinithis: you're not daft - that can be done (and there are several libraries that implement that kind of thing), but you often run into a problems integrating existing code and practices or using the datatype with other libraries. – Michael Burr Jan 17 '10 at 07:19
  • @blwy10: `strcat`? Try using `getcwd()` or `readlink()` correctly. – Joey Adams May 04 '10 at 07:42
  • Just use an excellent string implementation like GLibs GString (http://library.gnome.org/devel/glib/stable/glib-Strings.html) and string handling becomes at least as easy than in C++. – ahe May 04 '10 at 10:24
  • 1
    Design principal if esoteric language BIT (http://www.dangermouse.net/esoteric/bit.html): "Extend the ease of string processing in C to other, more basic, data types such as integers." :) – whybird May 23 '10 at 12:16
  • 4
    We need a thread for five things we _don't_ hate about C... – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ May 23 '10 at 16:35
  • I would like to add "no function overloading" – Dave O. Jun 27 '10 at 09:42
  • 1
    String manipulation is the most beautiful part of C. How can you make strings any simpler! Better than having some monster string library that goes and does a zillion copy ops or a locale specific lookup of Klingon plurals when I want to read the first character.\ – Martin Beckett Sep 09 '10 at 17:34
94

How about five things I hate about "Things I hate about some language" lists? :D

5- Painting an orange red doesn't make it an apple.

When a language is designed, the designers typically have in mind what it's useful for. Using it for something completely different can work, but complaining when it doesn't is just dumb. Take Python. I'm sure either someone has or someone will some day make a utility to create exe's from Python code. Why on God's earth would you want to do that? It would be neat—don't get me wrong—but it has no use. So stop complaining about it!

A well-designed project would likely contain code from multiple languages. That's not to say you cannot complete a project with only one language. Some projects may be well within the abilities of whatever language you are using.

4- Are you standing on wooden legs?

The platform can be a large influence of what the language can do. With nowadays garbage collectors, or well even pascals early attempt at "garbage collection", can aid in memory fade (maybe malloc more ram??). Computers are faster and so of course, we expect more out of our languages. And quite frankly, we probably should. However, there is a huge price to pay for the convenience of the compiler to create hash tables or strings or a variety of other concepts. These things may not be inherit to the platform of which they are used. To say they are easy to include to a language just tells me you may not have a leg to stand on.

3- Who's fault is it really?

Bugs. You know. I love bugs. Why do I love bugs. Because it means I get to keep my job. Without bugs, there would be many closed pizza shops. However, users hate bugs. But here is a little splash of cold water. Every bug is the programmers fault. Not the language's. A language with such a strict syntax that would significantly reduce how many bugs were possible to generated would be a completely useless language. It's abilities could probably be counted on one hand. You want flexibility or power? You've got bugs. Why? Because you're not perfect, and you make mistakes. Take a really identifiable example in C:

int a[10];
for (int idx = 0; idx < 15; idx++) a[idx] = 10;

We all know what that's going to do. However, what maybe some of us don't realize is.. that functionality can be very beneficial. Depending on what you are doing. Buffer overruns are the cost of that functionality. That code above. If I actually released that to the public. That's again.. say it with me.. "My fault". Not C's for allowing me to do it.

2- Shouldn't we put that in the recycle bin?

It's very easy to point at a feature in a language we don't understand because we don't use it often and call it stupid. Complain that it's there etc. Goto's always entertain me. People always complain about goto's being in a language. Yet I bet your last program included a type of goto. If you have ever used a break or a continue, you've used a goto. That's what it is. Granted, it's a "safe" goto, but it is what it is. Goto's have their uses. Whether "implicit" gotos like continue or break are used or explicit gotos (using the actual keyword "goto" for whatever language). Not that language developers are flawless, but typically... if functionality has existed since the dawn of time (for that language). Likely that aspect is a defining quality of that language. Meaning.. it's being used and likely is not hanging around because of backwards compatibility. It's being used today. As in 5 minutes ago. And used properly. Well.. arguably someone is using it improperly as well, but that relates to #3 on my list.

1. - Everything is an object.

Ok.. this one is really a subset of #2. But this is by far the most annoying complaint I see in hate lists. Not everything is an object. There are a great many of concepts that do not belong or need to be objects. Putting things where they don't belong is just ugly and can decrease efficiency of a program. Sure. Maybe not much depending on the language. This also relates to #5. This means... yes. Global are ok. Functions as apposed to static methods are ok. Combining OO programming with global functions is ok. Now.. that doesn't mean we should all go out and "free" our code from it's object models either. When designing a section of code or a whole project, what happens behind the scenes should be considered when putting it together. Not only where that concept lives and many other factors. Why wrap global functions within classes or name space concepts if it serves no purpose? Take static member variables. That greatly amuses me because.. well..Depending on the language and implementation of course, but generally speaking, you just declared a global. Yes, there are some reasons to wrap these non-OO concepts in OO wrappers. One of course being self documenting code. That can make sense. So.. like I say. Don't go out and "free" your code. But any good modern language will have a global concept outside of it's OO modeling. Yes I'm specifically meaning to point out that an OO programming language without a global concept most likely has a serious design flaw. Again though.. depends on the intention and design of the language so I'm not attempting to pick on any specific language and there are far too many to analyze right here. Anywho, Consider where the code should live and be the most effective. Adding a bunch of flare to something which doesn't add functionality or support just wears down the keyboard faster. It doesn't do anybody any good. Well.. unless you like brownie points from the person who probably incorrectly taught you that everything is an object.

In short, programming isn't just mindlessly tapping on the keyboard. There are a lot of design considerations to any project. I know it's cliche, but you have to look at it from every angle. Even with nowadays type-safe languages. You don't just chuck code out and expect it to work well. Sure.. it may work, but it may not be the right way to go about it. Overall, pick the language and format that is best suited for the specific job AND the environment. But no language takes away the thought behind it. If you're not thinking.. you're just typing.

Timwi
  • 65,159
  • 33
  • 165
  • 230
  • +1, even though everything should be an object. ;) – eyelidlessness Jul 23 '09 at 05:52
  • 19
    Languages aren't perfect, and if you make a list of things you hate about a language, you may get some interesting comments and ideas. First, it allows others to give you solutions which you didn't know existed (look through the posts, you will see a few things were learned). Second, it constitutes user feedback for the language developers (wouldn't you be interested if your users came up with a list of the 5 things they hate the most about your software?), and third, it's kinda interesting to ponder on the flaws of your tools. – Sylverdrag Sep 10 '09 at 09:20
  • I certainly agree with your #1. On the other screen as I write this I have 11 "objects" which contain nothing but data and can't logically contain anything else. They only exist to organize fields in a parent object so I don't end up with an object containing 2 pages worth of fields. – Loren Pechtel Jan 02 '10 at 05:43
  • 4
    If you view it at that level not only break and continue are gotos, but loops are gotos (jump the begin of the loop if the condition is met), if is goto (if the condition is not met jump over the block, function calls are goto (jump to the begin of the function and later jump back), ... – helium Jan 03 '10 at 17:04
  • @helium If you think about it, even Exceptions can be considered some form of goto. @Znr ++upvote Best post in weeks. – helpermethod May 04 '10 at 11:27
  • 17
    Creating executable files from source code "has no use"? What? – detly May 12 '10 at 01:41
  • 4
    Perl could create an executable from a Perl file since the late '80's. One thing to distribute is useful. No need to a) install Perl, b) install components of program, c) maybe write a script to set paths and execute it all... Yeah, really useless. – xcramps May 25 '10 at 19:27
  • I agree with #1, but not the example given. You should always target as close to vanilla Windows as possible with software like this. – MiffTheFox May 25 '10 at 20:36
  • I agree with you, but I just had to snarkily point out "Because your not perfect, and you make mistakes." My not perfect WHAT? B-) – Brian Postow May 25 '10 at 21:00
  • @detly Agreed. Since when is Py2Exe useless? Sure developers dont really have a use to compile their Python code because they all have an interpreter installed, but not everyone is a developer. Instead of having to install & update Python & countless libraries and dependencies on user's systems, it's a lot easier to send them a single .exe to run. – crgwbr May 26 '10 at 01:04
  • Exactly. Try distributing a wxPython program to someone who wants an easy install. Gauntlet of pain. – detly May 26 '10 at 04:15
  • 1
    But, if you can't create .exe files from the source, windows users won't be able to run it. ;) – Evan Plaice Jun 08 '10 at 03:40
  • @Sylverdrag Not to mention these lists can help programmers decide which programming language IS appropriate by the limitations of each (intended limitations or otherwise). – Dan Jun 09 '10 at 18:27
  • Nice list, but everybody should understand by now *why* `for` loops and `goto` are bad. – reinierpost Aug 17 '10 at 15:25
  • "Adding a bunch of flare to something which doesn't add functionality or support just wears down the keyboard faster." What popular languages actually do this? I can only think of Perl and C#... Others are drawing from new paradigms to help create *better* code (not fancier). @MiffTheFox @delty, sure you can create an exe, but then again you can create a one line batch file to launch the app with the proper lang runtime.. Ideally, the OS should manage the entire packaging (what Linux distros do, although still too ghetto) – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ Aug 24 '10 at 00:16
  • And what *aren't* objects? Everything down to the atom and whatever is under that is an object, likewise for conceptual objects. Globals **are** bad (or any state for that matter). They can be convenient in certain situations, but they should be used conservatively. Every time you add more state, your program gains (exponentially) more bugs. Continue is a goto? Maybe, but then every statement could be a goto to the next statement. I've never personally seen a use for goto in any high level language (and I'm mainly an assembly guy...) – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ Aug 24 '10 at 00:19
  • Maybe in PHP where a ton of functions return error values instead of raise exceptions, goto may be useful, but not in any good high level language. – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ Aug 24 '10 at 00:23
  • @Longpoke - So, how can a one-line batch file detect the presence of a certain version of .NET/Java/whatever your project uses, run the code if the runtime is present, or else display a helpful message to the user prompting to install the runtime? – MiffTheFox Aug 24 '10 at 03:26
  • @Longpoke - I'm sorry, that comment was so old I forgot what it relates to. :O – MiffTheFox Aug 24 '10 at 03:27
  • @MiffTheFox: eh you're right, you can't in Windows, which is a major flaw, you can always double click the jar to run it though, as jdk registers that on windows, although this is also bad because it makes the code have to manage its dependencies. Depending on old versions of Java is bad and insecure though, dunno about .NET as there is 1/2/3/4... Then again, most devs don't care about security so they'll just force the user to install a bunch of useless native crap and ship with some old JRE. – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ Aug 24 '10 at 17:32
  • 1
    Well written, but a terrible message. Making up excuses. – reinierpost Aug 26 '10 at 16:27
88

Five things I hate about Java (which, presently, is my favorite language) in no particular order.

  1. As much as I am a fan of Java Generics, there are a lot of oddities that arise from the way it was designed. As such there a myriad of annoying limitations with generics (some of which are the result of type-erasure).
  2. The way Object.clone() and the Cloneable interfaces work is totally broken.
  3. Instead of taking the high-road and making everything an object (a.la. SmallTalk), Sun wimped out created two distinct categories of data-types: Objects and primitives. As a result there are now two representations for fundamental data types and wierd curiosities such as boxing/unboxing and not being able to put primitives in a Collection.
  4. Swing is too complex. Don't get me wrong: there's a lot of cool stuff one can do with Swing but it is a great example of over-engineering.
  5. This final complaint is equally the fault of Sun and those whom have written XML libraries for Java. Java XML libraries are way too complicated. In order to simply read in an XML file, I often have to worry about what parser I am using: DOM or SAX? The APIs for each is equally confusing. Native support in the language for easily parsing/writing XML would be very nice.
  6. java.util.Date sucks. Not only is it unnecessarily complicated but all the useful methods have been deprecated (and replaced with others that increase complexity).
kbrimington
  • 25,142
  • 5
  • 62
  • 74
Ryan Delucchi
  • 7,718
  • 13
  • 48
  • 60
  • 32
    You forgot about java.util.Date! – TM. Dec 09 '08 at 18:59
  • 1
    ah yes. The Java Date/Time classes. Well, I probably forgot about it because it's been a long while since I have had to use them. – Ryan Delucchi Dec 09 '08 at 19:32
  • I agree with all of these, but I would like to hear your explanation of (2). Saying it's "totally broken" is not much of an explanation. Could you clarify? Thanks. – dj_segfault Jan 03 '09 at 04:30
  • You can't reassign final fields in clone. – Steve Kuo Jan 05 '09 at 19:55
  • 3
    Also: The "Cloneable" interface doesn't have a "clone()" method. This makes The Cloneable interface an Oxymoron. And since clone() returns an Object, type safety is out the window (there does not appear any attempt made to rectify this even after Generics have been introduced in J2SE 5.0). – Ryan Delucchi Jan 07 '09 at 20:18
  • 2
    As long as we're bashing cloneable, might as well include the so called Serializable "interface". Whenever using it I always want to stab myself. – wds Jan 08 '09 at 15:18
  • 12
    Hard to do simple things like open a file and read from it. – Eric Johnson Mar 13 '09 at 18:31
  • 1
    JAXB makes XML reading/writing very slick (1.6+), but I'll concede the rest and a few more I havne't thought of yet. – Andrew Coleson Jun 05 '09 at 17:07
  • I hate beans -- ugly set/get code vs C#/Ruby properties, and class-invariants are right out the window with constructors that make crippled objects -- "run enough sets and eventually this object will be useful for something". Next on the chopping block: I'm really tired of the mark-and-sweep garbage collector. It would be nice to have alternate GC settings like "none", "refcount" or "s&m", er, "m&s". It sounds cool to never have to worry about memory leaks again (oh really?), but the cost of blasting pg faluts through CPU caches any time you have stuff cached in your app gets old. – Roboprog Jun 12 '09 at 23:40
  • 3
    @Ryan clone() does not necessarily need to return "Object". With J2SE 5.0 Java introduced covariant return types, which means you can return any subtype of a base class. So public MyType clone() IS possible! – helpermethod May 04 '10 at 11:15
  • 1
    @Eric +1 Decorator pattern done wrong :D. It's funny that in C file handling is so much easier -,-. – helpermethod May 04 '10 at 11:16
  • "Native support in the language for easily parsing/writing XML would be very nice." If you think Java should have this, you don't understand Java... Enjoy your bloated JavaScript with E4X... – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ May 23 '10 at 16:29
  • 1
    For XML I find that xmlpp (Pull Parser) it just about the easiest to use. I like that I can pass the xmlpp around like an iterator. What's this? a Foo tag? Let me can parseFoo() to deal with that. – KitsuneYMG May 25 '10 at 12:55
  • 1
    DOM and SAX are two inherently different approaches to parsing XML. One is document-based (i.e. read the whole doc in, and then manipulate it) vs stream-based (react to tokens as they are seen in the input- much better for larger documents). But I'll grant you that using them both can be a PITA, especially since they're implemented via "service provider" interfaces. – George Armhold May 25 '10 at 18:36
73

Ruby has many flaws related to its speed, but I don't hate those. It also has flaws with the community evangelism going overboard, but that doesn't really bother me. These are what I hate:

  • Closures (blocks) have 4 different creation syntaxes, and none of them are optimal. The elegant syntax is incomplete and ambiguous with hashes, and the full syntax is ugly.
  • The community tends to be against real documentation, favoring ‘read the code’. I find this childish and lazy.
  • Metaprogramming abuse, particularly in libraries, makes bugs a nightmare to track down.
  • On a related note, pervasive metaprogramming makes a comprehensive IDE difficult, if not impossible, to make.
  • The way block passing to functions is done is silly. There is no reason blocks should be passed outside the parameter list, or have odd special syntax to access (yield). I am of the opinion that blocks should have been given a less ambiguous syntax (or hashes could have used different delimiters; perhaps <> rather than {}), and passing as parameters to methods should have been just like all other parameters.

    object.method(1, {|a| a.bar}, "blah")
    

    These oddities, like the block must be the last parameter passed and passing more than one block is different with longer syntax, really annoy me.

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215
Myrddin Emrys
  • 42,126
  • 11
  • 38
  • 51
  • I agree with the last one, it was also surprising to me when I started to learn Ruby that passing a function (block) is conceptually different from passing any other argument. – Adam Byrtek Nov 12 '08 at 08:20
  • 2
    sub-optimal m17n & unicode support although it is getting better. 1.9 remains complicated... – Keltia Dec 20 '08 at 15:21
  • 37
    I thought that metaprogramming abuse is called "idiomatic ruby" :) – Slartibartfast Jan 10 '09 at 15:27
  • 1. Global variables (especially, class/module names) which cuts possibility to load several versions of the same library 2. Mutable string literals (you have to write Cblah = "blah".freeze to optimize GC) 3. Operators are not methods (!=, !~, !, if, while), so you cannot do 100% proper proxies and futures – Oleg Andreev May 13 '09 at 15:58
  • I never thought about lame sides of metaprogramming abusing. Nice point. – Arnis Lapsa May 28 '09 at 11:01
  • I wish Ruby blocks were just JavaScript anonymous functions with a more elegant syntax. That would make much more sense IMO than doing what they did. – Sasha Chedygov Jun 12 '09 at 23:32
  • Re: closure (block) passing after function args: this lets you extend your own language to create "visitors" and the like. It's quite useful, actually. Nothing stops you from making and passing function/closure references in as standard arguments. – Roboprog Jun 12 '09 at 23:46
  • I can see the problem in excessive cutesy dynamic programming in frameworks gumming up IDE support, though. I don't want to sound like too much of a fan-boy (fan-geezer?). And, Ruby implementations do run a bit slowly. And, I have gotten a little tired of Rails version thrashing: I want my Postgres driver to just continue working, please. – Roboprog Jun 12 '09 at 23:48
  • You can get to within one character of your desired syntax: alias :L :lambda object.method(1, L{|a| a.bar}, "blah") I fully agree that it's not optimal, but I think it's a useful, and more importantly, practical convention. – ben_h Jun 16 '09 at 13:34
  • Threads are not true kernel threads, but 'green' threads. Using require to include other ruby files doesn't expand the path, so if multiple files in a library load the same files from different paths they get linked twice. – Allyn Jul 13 '09 at 07:06
  • What are the 4 creation syntaxes? I only know { ... } and do ... end. – akway Jul 22 '09 at 21:53
  • 2
    akway: The other two syntaxes are *lambda* and *Proc.new*. – Myrddin Emrys Aug 25 '09 at 20:49
  • 2
    Re documentation, I once heard a talk by someone working at the Pragmatic Programmers publishing house, who said that when the company was founded, they wanted a Ruby book because the only one that was available was in Japanese. So they could have had that book translated and published by their company. But what they did instead what to read the source code :-) The Ruby book was apparently one of the books that launched Pragmatic Programmers. – Arthur Reutenauer Oct 09 '09 at 21:11
  • 13
    I find it interesting that 3 of these are to do with people and not the language itself. Ruby remains the language I hate least. – Toby Hede Nov 25 '09 at 08:54
  • Lol. Myrddin, I wish I could vote twice for this answer. :-) – conny Apr 21 '10 at 10:49
  • 2
    I think it may be that there's an inherent tradeoff between language power and IDE power. Making a language more expressive may place hard limits on how much help an IDE can provide. If that's the case, I'll go for language power every time because I've found that powerful IDEs help a lot more for writing code than reading it, and I do more of the latter. – Zak May 23 '10 at 12:32
  • OH GOD, THERE ARE SO MANY `end`S! – John Douthat May 25 '10 at 18:33
  • Just because you can infer some code's purpose by reading it doesn't mean that it's the One True Way of finding out what some function does. – MiffTheFox May 25 '10 at 20:38
  • I actually love blocks coming last and coming outside of parameter list brackets (if any). The reason for that is, the function is usually the largest parameter: it quite often spans lines. I hate the split argument lists way more than I mind the separate syntax. – Amadan May 26 '10 at 16:34
  • 1
    @Amadan I wouldn't mind it as an optional, occasional way to pass blocks that were long... but as the only way blocks are usually passed, I think it kinda sucks. – Myrddin Emrys Jun 05 '10 at 14:52
72

Perl

  • Mixed use of sigils

    my @array = ( 1, 2, 3 );
    my $array = [ 4, 5, 6 ];
    
    my $one  = $array[0]; # not @array[0], you would get the length instead
    my $four = $array->[0]; # definitely not $array[0]
    
    my( $two,  $three ) = @array[1,2];
    my( $five, $six   ) = @$array[1,2]; # coerce to array first
    
    my $length_a = @array;
    my $length_s = @$array;
    
    my $ref_a = \@array;
    my $ref_s = $array;
    
    • For example none of these are the same:

      $array[0]   # First element of @array
      @array[0]   # Slice of only the First element of @array
      %array[0]   # Syntax error
      $array->[0] # First element of an array referenced by $array
      @array->[0] # Deprecated first element of @array
      %array->[0] # Invalid reference
      $array{0}   # Element of %array referenced by string '0'
      @array{0}   # Slice of only one element of %array referenced by string '0'
      %array{0}   # Syntax error
      $array->{0} # Element of a hash referenced by $array
      @array->{0} # Invalid reference
      %array->{0} # Deprecated Element of %array referenced by string '0'
      

    In Perl6 it is written:

    my @array = ( 1, 2, 3 );
    my $array = [ 4, 5, 6 ];
    
    my $one  = @array[0];
    my $four = $array[0]; # $array.[0]
    
    my( $two,  $three ) = @array[1,2];
    my( $five, $six   ) = $array[1,2];
    
    my $length_a = @array.length;
    my $length_s = $array.length;
    
    my $ref_a = @array;
    my $ref_s = $array;
    
  • Lack of true OO

    package my_object;
    # fake constructor
    sub new{ bless {}, $_[0] }
    # fake properties/attributes
    sub var_a{
      my $self = shift @_;
      $self->{'var_a'} = $_[0] if @_;
      $self->{'var_a'}
    }
    

    In Perl6 it is written:

    class Dog is Mammal {
        has $.name = "fido";
        has $.tail is rw;
        has @.legs;
        has $!brain;
        method doit ($a, $b, $c) { ... }
        ...
    }
    
  • Poorly designed regex features

    /(?=regexp)/;           # look ahead
    /(?<=fixed-regexp)/;    # look behind
    /(?!regexp)/;           # negative look ahead
    /(?<!fixed-regexp)/;    # negative look behind
    /(?>regexp)/;           # independent sub expression
    /(capture)/;            # simple capture
    /(?:don't capture)/;    # non-capturing group
    /(?<name>regexp)/;      # named capture
    /[A-Z]/;                # character class
    /[^A-Z]/;               # inverted character class
    # '-' would have to be the first or last element in
    # the character class to include it in the match
    # without escaping it
    /(?(condition)yes-regexp)/;
    /(?(condition)yes-regexp|no-regexp)/;
    /\b\s*\b/;              # almost matches Perl6's <ws>
    /(?{ print "hi\n" })/;  # run perl code
    

    In Perl6 it is written:

    / <?before pattern>  /;   # lookahead
    / <?after pattern>   /;   # lookbehind
    / regexp :: pattern  /;   # backtracking control
    / ( capture )        /;   # simple capture
    / $<name>=[ regexp ] /;   # named capture
    / [ don't capture ]  /;   # non-capturing group
    / <[A..Z]>           /;   # character class
    / <-[A..Z]>          /;   # inverted character class
    # you don't generally use '.' in a character class anyway
    / <ws>               /;   # Smart whitespace match
    / { say 'hi' }       /;   # run perl code
    
  • Lack of multiple dispatch

    sub f(   int $i ){ ... }  # err
    sub f( float $i ){ ... }  # err
    sub f($){ ... } # occasionally useful
    

    In Perl6 it is written:

    multi sub f( int $i ){ ... }
    multi sub f( num $i ){ ... }
    multi sub f( $i where $i == 0 ){ ... }
    multi sub f(     $i ){ ... } # everything else
    
  • Poor Operator overloading

    package my_object;
    use overload
      '+' => \&add,
      ...
    ;
    

    In Perl6 it is written:

    multi sub infix:<+> (Us $us, Them $them) |
                        (Them $them, Us $us) { ... }
    
Philip Potter
  • 8,975
  • 2
  • 37
  • 47
Brad Gilbert
  • 33,846
  • 11
  • 78
  • 129
  • 5
    I don't see lack of true OO as being as bad as you make it. Sometimes, it's a saviour, especially when the CPAN module you're using didn't think to expose what you need. And lack of multiple dispatch could be worse: perl could have been strongly typed ;-) – Tanktalus Nov 28 '08 at 18:57
  • Basically I went through the differences of Perl5 and Perl6. – Brad Gilbert Dec 04 '08 at 01:31
  • 1
    $array->[0] != $array[0] != @array[0] – Brad Gilbert Dec 06 '08 at 02:51
  • Poor exception handling is one of my #1 problems with Perl 5. I also dislike the fact that it is not strongly typed and that I can't have defined paramater-ized functions – Mick Dec 10 '08 at 02:31
  • What's wrong with m/(?=>look ahead)/; ? – ysth Dec 10 '08 at 04:55
  • Should have been (?=look ahead). ... fixed. – Brad Gilbert Dec 10 '08 at 21:41
  • 3
    I like that Perl isn't strongly typed, but it would be useful to add in some type information. – Brad Gilbert Dec 10 '08 at 22:01
  • Wow. I REALLY don't like the change in character class notation. That's one thing I don't think should be changed. I don't mind (?non-capture) - it's clearly a GROUP, which is what matters more then whether or not it captures. – Chris Lutz Feb 19 '09 at 07:13
  • The only change in character class notation, is that they must be inside of <>. Which would allow you to do <-[a-z]> for negation. – Brad Gilbert Feb 20 '09 at 03:12
  • 13
    It seems like you chose to criticize a language that's not your favorite (you should have criticized perl6) – Frew Schmidt Feb 23 '09 at 04:13
  • 5
    What's the point about comparing to perl 6? Are you suggesting that perl 6 fixes your issues, or continues them? – Robert P Feb 23 '09 at 18:14
  • 1
    I agree with all of these, except for the regex constructs - I think that Perl's regular expressions are as good, if not better than any other language. – Drew Stephens May 06 '09 at 16:15
  • 1
    That's not a bug, it's a feature! Perl is probably my favorite "get 'er done" language, but the OO bag-on-the-side in Perl 5 did kind of jump the shark, in terms of conceptual and notational clutter. – Roboprog Jun 12 '09 at 23:59
  • +1 for the list of all possible array / hash notations, all but two of which are authorized by the syntax, with completely different meanings :-) – Arthur Reutenauer Oct 09 '09 at 21:21
  • 1
    Perl should just die. But it **can't**. It's specified as mandatory by the **Linux Standard Base** :( – java.is.for.desktop May 25 '10 at 18:10
  • The "inconsistent sigils" are actually typed dereferencing operators, and should be thought of as such. Every one of those examples makes sense. Perl 6 is going to break this, and therefore, regardless of its improvements on Perl 5, is downright offensive. Most of the actual inconsistencies in Perl can be chalked up to growing pains. – Jon Purdy May 26 '10 at 17:08
  • 2
    I doubt I need to say more than: http://www.ozonehouse.com/mark/periodic/ – Arafangion Jun 06 '10 at 01:06
  • Lack of true OO? You appear to actually not like the lack of a clean implementation of a common way of implementing OO. Others would argue that OO is simply about message passing, isolation and polymorphism. Still others would have different definitions of what "OO" really is. While I agree with some of your warts, this isn't one of them. – Ovid Aug 06 '10 at 13:51
  • 1
    The question was '[...]about your **favourite** language[...]'. – hlynur Aug 20 '10 at 07:16
  • 1
    TNANC;DR (too many non-alphanumeric characters; didn't read) – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ Aug 24 '10 at 00:24
  • @Drew Stephens: By any other language do you mean `{COBOL, microcode, VB}` ? – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ Aug 24 '10 at 00:28
  • Forget "fake" OO. My biggest issue with Perl is that `sub foo { +(1..5) }` returns 5 elements when called in list context, but `''` when called in scalar context. That's just not right. –  Sep 09 '10 at 17:13
57

I'll do PHP as I like it at times and Python will be done way too much.

  • No namespace; everything is in a kind of very big namespace which is hell in bigger environments

  • Lack of standards when it comes to functions: array functions take a needle as a first argument, haystack as second (see array_search). String functions often take the haystack first, needle second (see strpos). Other functions just use different naming schemes: bin2hex, strtolower, cal_to_jd

    Some functions have weird return values, out of what is normal: This forces you to have a third variable declared out of nowhere while PHP could efficiently interpret an empty array as false with its type juggling. There are near no other functions doing the same.

    $var = preg_match_all('/regexp/', $str, $ret);
    echo $var; //outputs the number of matches 
    print_r($ret); //outputs the matches as an array
    
  • The language (until PHP6) does its best to respect a near-retarded backward compatibility, making it carry bad practices and functions around when not needed (see mysql_escape_string vs. mysql_real_escape_string).

  • The language evolved from a templating language to a full-backend one. This means anybody can output anything when they want, and it gets abused. You end up with template engines for a templating language...

  • It sucks at importing files. You have 4 different ways to do it (include, include_once, require, require_once), they are all slow, very slow. In fact the whole language is slow. At least, pretty slower than python (even with a framework) and RoR from what I gather.

I still like PHP, though. It's the chainsaw of web development: you want a small to medium site done real fast and be sure anybody can host it (although configurations may differ)? PHP is right there, and it's so ubiquitous it takes only 5 minutes to install a full LAMP or WAMP stack. Well, I'm going back to working with Python now...

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
I GIVE TERRIBLE ADVICE
  • 9,578
  • 2
  • 32
  • 40
  • And I so want strong typing. Or at least give me the choice to activate it. – Christian Studer Nov 12 '08 at 08:09
  • You can partially have it, just use !== and === for comparisons. That ensures the types are respected but for +-/* etc. I believe PHP gives enough choice. Being weakly typed is a language choice like duck typing, and letting people choose on their own would make the language even less consistent. – I GIVE TERRIBLE ADVICE Nov 12 '08 at 12:55
  • 4
    I suppose point 1 is implemented in 5.3 :) While param ordering is getting better naming is still poor. I agree with the backward compatability though. – Ross Mar 09 '09 at 21:55
  • Chainsaw of web development? Man, I'll use that in my signature. Hehe. – capfu Jul 23 '09 at 00:05
  • The only thing I have to (sort of) disagree with is the weird return values. With the way PHP does it now, you can do if(preg_match_all("/regexp/", $str, $ret)) { print $ret; } (or if (preg...(...) > 2) {...}, etc) which was probably the point. – Jess Aug 21 '09 at 17:14
  • When returning an empty array, PHP will evaluate it to false with its loose typing. Returning the array itself would still let you like "if($matches = preg_match_all($regexp,$str)){...}". Adding 'or' after sounds like a pretty bad reason to have the return values that way. – I GIVE TERRIBLE ADVICE Aug 27 '09 at 16:54
  • I believe the common version of the phrase is "Swiss Army Chainsaw," which is also accurate. Also, you were supposed to write it about your favorite language, not one you "kinda" like. – NateDSaint Nov 02 '09 at 13:44
  • 4
    Gotta love #4. That's one of the things that bothered me the most all the time, too. – Franz Nov 04 '09 at 11:41
  • 1
    I think, the speed argument is pretty subjective. Speed depends much more on how efficient the code is than on the language itself. Poor PHP code is probably slower than high quality python code but good PHP may also perform better than poor Python. – selfawaresoup May 23 '10 at 12:02
  • It is subjective, especially since the largest bottlenecks you have are about the network and how long it takes to render the page to the user (CSS, JS), which amounts to roughly 90% of the time taken to load a page. What makes file importing really bad though is that it basically just calls 'eval' on the file you pipe in. It's neither smart, safe or fast. – I GIVE TERRIBLE ADVICE May 23 '10 at 17:51
  • 17
    no_really_now_mysql_escape_the_string_im_serious() – Salaryman May 26 '10 at 12:06
  • 2
    namespaces schmamespaces. PHP is on the world wide web so everything should be global – Evan Plaice Jun 08 '10 at 03:47
50

Here are some things I dislike about Java (which is not my favorite language):

  • Generics type erasure (i.e. no reified generics)
  • Inability to catch multiple exceptions (of different types) in a single catch block
  • Lack of destructors (finalize() is a very poor substitute)
  • No support for closures or treating functions as data (anonymous inner classes are a very verbose substitute)
  • Checked exceptions in general, or more specifically, making unrecoverable exceptions checked (e.g. SQLException)
  • No language-level support for literal collections
  • No type-inference when constructors of generic classes are called, i.e. the type parameter(s) must be repeated on both sides of the '='
Dónal
  • 185,044
  • 174
  • 569
  • 824
  • Inability to catch multiple exceptions (of different types) in a single catch block -> will most likely be added in Java 7 – Jorn Jan 02 '09 at 13:45
  • yeah, and you wont know what exception you are dealing with... – Svish Jan 30 '09 at 23:26
  • 1
    @Svish - I think is the point is that you would only use this construct when you don't care what type of Exception you're dealing with. In other words, when you want to handle them all identically – Dónal Jan 31 '09 at 02:10
  • 3
    I wouldn't call a lack of destructors a flaw when the language has a GC, and a GC that's gotten better and better with each release. Destructors were missed in java 1.1.8 but not in java 6 because gc is so vastly improved. – Mike Reedell Apr 10 '09 at 11:49
  • 7
    C# fixes all of these except catching multiple exceptions. Generics are reified, destructors are replaced by using/IDisposable, closures are implemented by anon methods and lambdas, exceptions are unchecked, there are collection literals, and there is 'var' to avoid specifying the constructed type twice. – Daniel Earwicker May 09 '09 at 22:34
  • 1
    Java definitely has closures. An anonymous inner class closes over local final variables in its scope. I agree that anonymous inner classes are not a proper substitute for anonymous functions, but they *are* closures. – Adam Jaskiewicz Jun 05 '09 at 17:10
  • Re inability to catch multiple exceptions - please name a language that *does* support this. At least it is *planned* for Java. The planned implementation might not be elegant but that is better than making no effort to solve the problem. However if you meant SQLException should have been unchecked then I agree. – finnw Jun 12 '09 at 23:38
  • 2
    Anon inner classes are NOT closures: try creating a visitor callback with something like "sum += current.amount()" in it, where "sum" is a non-final variable from the enclosing scope. Close, but no cigar. – Roboprog Jun 12 '09 at 23:51
  • The lack of destructors: how could I forget. That often sucks mightily. – Roboprog Jun 12 '09 at 23:53
  • type erasure is really annoying. – fastcodejava Nov 14 '09 at 07:34
  • @finnw: Well since you asked, Python supports catching multiple exceptions (as a tuple of exception classes) in a single `except` clause. – Don O'Donnell Dec 28 '09 at 04:01
  • @Roboprog This is due to the fact that everything in java is pass by value. If your created a Ref class that held a T[1] that was access via a get/set pair, you'd be able to pass a local `final Ref` into an anon function and do `myRef.set( myRef.get().intValue() + current.amount()`. Now I should go try that to make sure it actually works. – KitsuneYMG May 25 '10 at 13:02
  • Anonymous inner classes are syntactic vinegar (the opposite of syntactic sugar) for closures. – Gabe May 26 '10 at 02:11
40

C++

  1. Template Syntax
  2. Diamond Inheritance issues
  3. The plethora/lack of standard libraries that modern languages have (though boost comes close).
  4. IOStreams
  5. The syntax used around IOStreams

Python

  1. Spaces are meaningful (sometimes)
  2. underscored keywords
  3. Limited thread support (at least currently)
  4. "self" instead of "this"
  5. Spaces are meaningful (sometimes)
grieve
  • 13,220
  • 10
  • 49
  • 61
  • 80
    You can refer to "self" as "this" is you really want to (although it might be hard for others to follow). "Self" isn't a keyword, and you can name the variable anything you want. – mipadi Nov 11 '08 at 23:49
  • 1
    Could you split these into two separate answers? – wnoise Nov 12 '08 at 01:17
  • 36
    there you go, I would actually list the meaningfulness of whitespace (especially indentation) in Python as one of its biggest pluses... ;) – Oliver Giesen Nov 12 '08 at 01:54
  • 2
    @Oliver - I agree, but it gets confusing when you mix spaces and tabs. Tab space space is not the same as any number of just spaces. – Tom Leys Nov 12 '08 at 03:12
  • 22
    "spaces are meaningful" is one of the best features of python!! p.s. try to run this in an interpreter "from __future__ import braces" – hasen Dec 05 '08 at 18:05
  • @mipadi why do you need to give a name to "this" in the first place? Why cant python do it like everybody else (say C++/C#/Boo)? – Sandeep Datta Dec 07 '08 at 02:30
  • 2
    The way python methods are implemented (they are just a funciton with the object as the first parameter) allow all sorts of flexible tricks, for example monkey patching. Is it really that hard to write "self, " once for each method? – gnud Dec 07 '08 at 17:55
  • 1
    spaces and tabs not being equal frustrated me too until I set my editor to 'replace tabs with spaces'. The whitespace syntax I find very appealing. – Josh Smeaton Jan 12 '09 at 01:32
  • 4
    I disagree with pretty much your whole python list, except thread support. Whitespace is not meaningful, indentation is meaningful; there's a big difference. – Christian Oudard Aug 31 '09 at 20:10
  • @Gorgapor: You are welcome to disagree, I am certainly no great authority on anything. :) I will point out, however, that you achieve indentation by using whitespace. – grieve Sep 15 '09 at 20:58
  • 1
    @Oliver - mix your space and tabs, and you're going to have a real fun time debugging. It will waste at least a good couple of minutes (if you're experienced in python), and you'll feel like an idiot when you finally found the problem after stressing over it. It happens more than you think, and the lack of real tokens for code blocks makes it impossible to attempt to put the code back in _some_ kind of order. – Calyth Oct 14 '09 at 13:20
  • @gnud - yes. yes it is very hard to write self for each method because it shows that Python, historically, didn't think of OOP. The Python interpreter _should_ take care of that. You'd think that with all the other OOP languages getting the self/this pointer right that Python would eventually fix that crap? – Calyth Oct 14 '09 at 13:22
  • 2
    I really enjoy the Python's aspect of "self." It finally taught me how to think of OOP. It would be so easy to write a C++ program in C now (with regards to classes). The "methods" would take the object (structure) as its first argument. Of course, many things would still be lacking in C, but writing from an OOP perspective would be must simpler now. – Noctis Skytower Dec 15 '09 at 00:50
  • Oh god, Python's threading support or lack thereof is ridiculous. I disagree with the __keywords__ though. I believe that a lexical differentiation of this sort is necessary in this case. – orokusaki Dec 31 '09 at 20:22
  • 1
    just be glad its not like the language whitespace – mikek3332002 May 23 '10 at 11:19
  • @Calyth It doesn't show that Python forgot to think of OOP; it just shows that they are following their philosophy of *explicit is better than implicit*. If you don't know what I mean, run `import this` – crgwbr May 26 '10 at 01:09
  • 1
    So spaces are not meaningful in, say, C? `if(condA)foo();elseif(condC)bar();` – badp May 26 '10 at 07:05
  • 1
    @call: they are only meaningful in indentation: `if x and y:` and `if     a     and     y:` and `if a and\ny:` are perfectly equivalent. – badp May 26 '10 at 08:19
  • imho: Non of the points mentioned for python are bad (except [a python keyword] #3). I like that Python do things in its own way. :) – Joschua May 31 '10 at 18:51
  • 1
    If self wasn't explicit, then understanding python's scoping rules would be more difficult. Python's scoping rules are very different to other conventional languages. – Arafangion Jun 06 '10 at 01:09
  • 3
    Wow. It's like no one invented a text editor that highlights/shows whitespace/tabs as special chars (What, are you coding in notepad?). Also, if you expand tabs to spaces, please go die in a fire. – Fake Name Aug 07 '10 at 11:06
  • @Fake Name: Jython, my friend. Python has no language concurrency constructs, so the best you can do is grab a library for it. – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ Aug 24 '10 at 00:38
  • 1
    People rejecting Python due to whitespace is the most retarded thing I can imagine. Braces are just redundant in C-like languages, since all good code is indented anyways. You don't even need to indent all the time in python, you can separate statements with semicolons (although, just like in C-like languages, nobody does this, because it's retarded) `print 'hurr'; print 'durr'`. Although I wish I could make anonymous functions/classes, which is natural with braces, but hardly any big deal, plus you can use lambdas a lot of the times for this. – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ Aug 24 '10 at 00:44
  • What's wrong with underscored keywords? Python does its best to stay out of *your* namespaces. Instead of, say, defining the sequence protocol as requiring your objects to have a 'length' method, it requires them to have a __len__ method which is called be the 'len' function in the builtin namespace. As far as I can tell, Python never requires you to have a non-underscored name in your objects for its own mechanics. – Isvara Dec 06 '10 at 18:12
37

Objective-C

1) No namespaces, just manual naming conventions - I don't mind the that in terms of class separation, but I do miss being able to import all class definitions in a namespace in a single line (like import com.me.somelibrary.*).

2) Libraries still have some holes in important areas like RegEx support.

3) Property syntax is a bit clumsy, requiring three lines (in two separate files) to declare a property.

4) I like the retain/release model, but it is easier than it should be to release a reference and then accidentally make use of it later.

5) Although not really a language feature, Xcode is so intertwined with use of Objective-C I can't help thinking about that aspect... basically the autocompletion, is very iffy. It's more like a system that rewards you for finding something you want exists, and then presents it as a choice afterwards. But then I suppose I never have liked autocomplete engines.

Adam
  • 43,763
  • 16
  • 104
  • 144
Kendall Helmstetter Gelner
  • 74,769
  • 26
  • 128
  • 150
  • 2
    Agree about the namespaces, prefixing classes with letter codes is dumb. And I would add missing support for real class variables, I don’t like faking them with file statics. – zoul Nov 13 '08 at 18:05
  • Definitely agree with the property verbosity. It ought to default to @synthesize until you tell it otherwise. I also have a gripe with the amount of C-ness and the amount of code needed to move between C and Foundation types. –  May 15 '09 at 12:59
  • 2
    Objective-C properties. Seriously, they are shocking, I can't understand the hype especially seeing how well C# does them. – Justicle Jun 19 '09 at 03:48
  • I really like codesense, but it's still not what it should be. I personally think that it needs to take time and frequency into effect. If you've been using a lot of NSPoint recently, it should be the first suggestion, and it should pop up faster. – Sneakyness Jul 24 '09 at 15:12
  • Don't forget the message sending syntax: [[[someObject sendMessage] doSomethingElse] doAnotherThing]; Making sure the # of open/close brackets match up is a PITA for especially complex messages, it's like I'm working in LISP again. – drewh Dec 28 '09 at 13:53
  • 6
    Actually I really liked that aspect of Lisp and ObjC - you just need an editor with good brace matching, like Emacs or XCode. I usually type braces in pairs before I type anything in them, so I don't really run into problems with matching... and XCode can also highlight the region enclosed by a brace just by double-clicking on either containing brace. – Kendall Helmstetter Gelner Dec 28 '09 at 17:45
  • @synthesize should make it in there. YES/NO for boolean values. Named parameters. Strange mixture of dot notation and []. – Chris S May 23 '10 at 12:22
  • 1
    @Chris S: Are you saying `YES/NO` for booleans is a bad thing? And more importantly, are you saying Named Parameters are a bad thing?? I can understand bools, but named params are possibly one of ObjC's best features (in terms of readability). – jbrennan May 25 '10 at 20:32
  • 1
    named parameters rock! I like YES NO it makes code more readable. – nickthedude May 25 '10 at 20:40
  • Property syntax really requires four lines, if your properties are marked `retain` and you don't want to leak memory. – Frank Schmitt May 25 '10 at 22:12
  • 1
    Yes/no is too VB-esque for my liking. Named parameters are good if the method has many, many overrides, but pointless otherwise – Chris S May 25 '10 at 22:37
  • 3
    Maybe I'm a masochist, but I like prefixed class names. It makes google and documentation searches crystal clear, there's never any confusion about what kind of string your using if the class is called NSString. – kubi Jun 26 '10 at 16:48
  • @kubi: That's a really good point, but I'd still like to be able to import a prefixed group all in one import... the way you get with package imports like #import . I guess I could set it up that way myself... – Kendall Helmstetter Gelner Jun 27 '10 at 02:47
36

C++

  • Strings.
    They are not interoperable with platform strings, so you end up using std::vector half of the time. The copy policy (copy on write or deep copy) is not defined, so performance guarantees can not be given for straightforward syntax. Sometimes they rely on STL algorithms that are not very intuitive to use. Too many libraries roll their own which are unfortunately much more comfortable to use. Unless you have to combine them.

  • Variety of string representations
    Now, this is a little bit of a platform problem - but I still hope it would have been better when a less obstinate standard string class would have been available earlier. The following string representations I use frequently:

    • generic LPCTSTR,
    • LPC(W)STR allocated by CoTaskMemAlloc,
    • BSTR, _bstr _t
    • (w)string,
    • CString,
    • std::vector
    • a roll-my-own class (sigh) that adds range checking and basic operations to a (w)char * buffer of known length
  • Build model.
    I am sick to death of all the time spent muddling around with who-includes-what, forward declarations, optimizing precompiled headers and includes to keep at least incremental build times bearable, etc. It was great in the eighties, but now? There are so many hurdles to packing up a piece of code so it can be reused that even moms dog gets bored listening to me.

  • Hard to parse
    This makes external tools especially hard to write, and get right. And today, we C++ guys are lacking mostly in the tool chain. I love my C# reflection and delegates but I can live without them. Without great refactoring, I can't.

  • Threading is too hard
    Language doesn't even recognize it (by now), and the freedoms of the compiler - while great - are to painful.

  • Static and on-demand initialization Technically, I cheat here: this is another puzzle piece in the "wrap up code for reuse": It's a nightmare to get something initialized only when it is needed. The best solution to all other redist problems is throwing everything into headers, this problem says "neeener - you cannot".


Granted, a lot of that is beyond strict language scope, but IMO the entire toolchain needs to be judged and needs to evolve.

Thomas L Holaday
  • 13,614
  • 6
  • 40
  • 51
peterchen
  • 40,917
  • 20
  • 104
  • 186
  • Looking documentation on the STL is like looking for manuals on how to build a graphics card from scratch. – aviraldg Mar 03 '10 at 07:28
  • Frankly, most of these points sound like you never quite bothered to learn C++ properly... this gets rather obvious in #3, since inclusion guards are something that *every* C++ programmer should know. I'm not sure how to understand Point #1 either, are you confused about `std::string`? maybe reading a good documentation and/or tutorial on `std::vector` (and why you're not supposed to use `std::string` in places where it was never designed for) could clear that up for you. –  Feb 08 '11 at 23:55
  • @nebukadnezzar: I found Meyers illuminating on the STL, but it doesn't solve the fundamental problems. Frankly, this sounds like you never had to maintain a large project, you never had to hunt down a circular dependency in a dozens-deep include hierarchy. I know include guards, but why do we have to bother with them? BTW. they don't fix every problem. How "standard" is a `std::string` if I can't use it half of the time? (C++0x at least fixes that, but I'm still stuck with dozens of libraries that use different string representations). – peterchen Feb 09 '11 at 09:55
  • `but why do we have to bother with them (inclusion guards)` - because C++ doesn't have modules. `How "standard" is a std::string if I can't use it half of the time?` - I think that depends on the way you use `std::string`. The string class allows you to access the string data as `const char*` via `std::string::c_str`, which already makes `std::string` perfectly compatible with every class/function that also takes `const char*` arguments. –  Feb 09 '11 at 15:44
  • *because C++ doesn't have modules* - exactly my complaint: the build model is antique (I'd just accept any other solution than modules, too). ----- *perfectly compatible* - but perfectly incompatible with many other scenarios (I'd argue C++0x fixing this says I do have a point here.) I'd be happy if std::string had been pervasive enough to have been adopted as THE string class 10 years ago, but it wasn't - the other complaint. – peterchen Feb 09 '11 at 15:56
  • @peterchen `exactly my complaint: the build model is antique` - I see how you mean it now. But seeing how it simply is not a module system, you will have to live with inclusion guards. That is, I doubt that there will ever be a module system for C++. I'm still not sure what you mean about std::string - if any function takes a `const char*` argument, you just pass `std::string::c_str` along, and be done with it. –  Feb 09 '11 at 17:55
35

JavaScript:

  • The Object prototype can be modified. Every single object in your program gets new properties, and something probably breaks.

  • All objects are hash maps, but it's difficult to safely use them as such. In particular, if one of your keys happens to be __proto__, you're in trouble.

  • No object closure at function reference time. In fact, no object closure at all -- instead, this is set whenever a function is called with object notation or the new operator. Results in much confusion, particularly when creating event callbacks, because this isn't set to what the programmer expects.

    • Corollary: calling a function without object notation or the new operator results in this being set equal to the global object, resulting in much breakage.
  • Addition operator overloaded to also perform string concatenation, despite the two operations being fundamentally different. Results in pain when a value you expect to be a number is in fact a string.

  • == and != operators perform type coercion. Comparisons between different types involve a list of rules that no mortal can remember in full. This is mitigated by the existence of === and !== operators.

  • Both null and undefined exist, with subtly different, yet redundant meanings. Why?

  • Weird syntax for setting up prototype chains.

  • parseInt(s) expects a C-style number, so treats values with leading zeroes as octal, etc. You can at least parseInt(s, 10) but the default behaviour is confusing.

  • No block scope.

  • Can declare the same variable more than once.

  • Can use a variable without declaring it, in which case it's global and probably breaks your program.

  • with { }.

  • Really difficult to document with JavaDoc like tools.

Daniel Cassidy
  • 24,676
  • 5
  • 41
  • 54
  • 3
    For `null` and `undefined`: sometimes you really want to know if the variable has been assigned a value or not. Since null is a value, undefined is the only way to tell. Granted, the only time I've found this useful was for creating getter/setter functions. – Zach Jul 11 '09 at 22:38
  • Javascript being my favorite language, this is pretty close to the list I'd write. Exceptions: object closure/this doesn't confuse me; null/undefined doesn't confuse me; don't know what you mean by syntax for setting up prototype chains; block scope with closures (and I believe Mozilla's block scope implementation is syntactic sugar around that); I would note that the use of a variable without declaring -> global is a necessary consequence of the lack of a documented global object (window is DOM, not JS). – eyelidlessness Jul 23 '09 at 05:38
  • The lack of object closure and the fact null !== undefined doesn't confuse _me_ either, but they're still design flaws, as well as a plentiful source of confusion with _other_ programmers (whose code I then have to fix). Also I disagree that implicit globals is a _necessary_ consequence -- it's just the solution Netscape chose. One possible (albeit somewhat unpleasant) alternative would be to require programmers to declare all referenced globals in every file (e.g. JSLint requires this). I am easily able to imagine other alternatives. – Daniel Cassidy Jul 23 '09 at 12:55
  • I guess I don't see object closure/this and null/undefined as design flaws. I see them as design *choices*, with benefits and drawbacks, and I happen to appreciate the benefits. One thing I'd add about globals is that the language does not offer any way to distinguish between global and local variables of the same name. – eyelidlessness Jul 24 '09 at 06:50
  • 1
    "if one of your keys happens to be __proto__" -- well, it's a reserved word with special meaning. it's like complaining that you can't use `for` as a variable name. – nickf Jan 02 '10 at 05:13
  • 5
    @nickf: The key to a hash is a string. Strings can have any value including reserved words. In particular the value `"for"` is valid as a hash key. `__proto__` is not a reserved word. Special string values that do not work as expected when used as hash keys violate reasonable expectations about how associative arrays work in any language. They also violate the EcmaScript spec. – Daniel Cassidy Jan 03 '10 at 23:04
  • 1
    How about the fact that semicolon isn't needed to terminate statements, except everyone seems to think they are so they use them. Statements are terminated by newline in JavaScript. – Thomas May 25 '10 at 20:48
  • 2
    Thomas: Newline doesn't always end a statement. Therefore sensible coders terminate every statement with a semicolon to make the code more clear. – Daniel Cassidy May 26 '10 at 10:30
  • Well if you think undefined may be corrupted, you may just declare a new one inside your function... var undefined; But still, you bette use this : function isset(obj) { return typeof obj === 'undefined'; } The only way it can fail is by using is on non-declared vars. But in this case, you're able to get window.varname and it works. – xavierm02 Jul 01 '10 at 18:23
  • 2
    `newline may or may not end a statement depending on context` is one in my top 5 list – reinierpost Aug 26 '10 at 16:37
34

Python:

  • Lack of static typing
  • Default argument handling (specifically the fact that you can change the default argument for future callers!)
  • Too many required underscores (constructors must be called __init__)
  • Lack of proper private members and functions (convention just says that most things that start with underscore are private, except for all the stuff like __getattr__ that isn't)
  • Funny syntax for printing to a file (but they're fixing that in Python 3)
Community
  • 1
  • 1
Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
  • really? how do you change the default argument? that's great! – Claudiu Nov 11 '08 at 22:34
  • If it's a mutable object, because there is only a single instance of it created, when the function is first evaluated, any changes to it will be reflected in all future calls. – Jeremy Nov 11 '08 at 22:46
  • Most consider lack of static typing an advantage. Anyway in Python 3 you will be able to use function annotations for type checking. – Adam Byrtek Nov 12 '08 at 08:14
  • 10
    What I'd like is an *option* to use static types. – Greg Hewgill Nov 12 '08 at 10:06
  • 4
    BTW: __init__ isn't really the constructor, the object was already created, when you enter there (guess what self is...). The constructor is acutally __new__ where you get access to the class to be instantiated. – André Nov 26 '08 at 19:38
  • 90
    If you prefer static typing, why is Python your favourite language? – finnw Dec 07 '08 at 18:09
  • 9
    finnw: Static typing is great for some kinds of programs, and not really needed for other types. I usually don't mind the lack of static typing, but when you need it, it's *really* nice to have at least the option. – Greg Hewgill Dec 07 '08 at 18:26
  • The only time I miss static typing is in IDE's since static typing improves auto completion capabilities. Python 3's function annotations will fix this, for any code which annotates its functions with type information (assuming someone will come up with a standard way of doing so). –  Jan 05 '09 at 13:35
  • Please add: No try-except-finally construct in Python 2.x – pi. Feb 03 '09 at 15:27
  • @pi: try-except-finally was added in Python 2.5: http://python.org/doc/2.5/ref/try.html – Greg Hewgill Feb 03 '09 at 17:56
  • 1
    static typing would destroy python, even if it was a built in optional feature... – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ Mar 22 '10 at 17:18
  • 2
    Actually, things that start with a **single** underscore are considered 'private' by convention. Names prefixed and suffixed by double underscores are reserved by the language. – Romuald Brunet May 08 '10 at 22:40
  • You can also have double underscore prefixes on methods (without double underscore suffixes) which makes them "really" private, but it's generally kind of a bad idea that will make your code less easily extendable. Better to use the single underscore convention. The default argument thing, as others have pointed out, is only true for mutable objects. In cases where a mutable object is the expected input, it's best to just have `None` defaults or something like that and then check for them in the body. Annoying, but once you're aware of it, not that big a deal. – dwf May 25 '10 at 08:11
  • @greg hewgill have you looked at ctypes? – Jiaaro May 25 '10 at 17:27
  • 8
    I would say that lack of static typing is a feature, not missing functionality... – arnorhs May 25 '10 at 17:56
  • python 3 has now a (optional) syntax, that can be used for typechecking: http://stackoverflow.com/questions/1275646/python-3-and-static-typing – Joschua May 31 '10 at 19:02
  • if you don't like the 'self' keyword. how is it any better than having to add the 'public' for methods or 'static' for non-method functions. or override public static void FunctionName(). I much prefer self/no self over public/internal/static. private is '__var' and internal is '__var__'. I agree that the underscores suck but I'd prefer python over static typing anyday (unless I was getting paid per LOC :)~). – Evan Plaice Jun 08 '10 at 04:00
  • 1
    the fact that python does not enforce member privacy is a conscious language choice. It wouldn't have been hard to add this, but it's not there because *we're all adults here*. Anyone that is mucking about in the implementation of a class knows what he's doing, and is doing it for the right reasons. This is fine! If a pythonista doesn't need to muck with the implementation, our good sense will prevent us from doing so, because it's undocumented or some such and we don't want to write fragile code. – SingleNegationElimination Oct 27 '10 at 06:28
32

C#

  • I wish I could switch() on any type, and that case could be any expression.

  • Can't use object initializer syntax with 'readonly' fields / private set autoprops. Generally, I want language help with making immutable types.

  • Use of {} for namespace and class and method and property/indexer blocks and multi-statement blocks and array initializers. Makes it hard to figure out where you are when they're far apart or mismatched.

  • I hate writing (from x in y ... select).Z(). I don't want to have to fall back to method call syntax because the query syntax is missing something.

  • I want a do clause on query syntax, which is like foreach. But it's not really a query then.

I'm really reaching here. I think C# is fantastic, and it's hard to find much that's broken.

Jay Bazuzi
  • 45,157
  • 15
  • 111
  • 168
  • 14
    +1 for switch on any type – oɔɯǝɹ Jul 12 '09 at 20:48
  • +1 for switch issues, and {} issues, which I hadn't really thought about until now – Maslow Aug 21 '09 at 21:27
  • I hate {}. They look too much like (). Mismatching has never been much of an issue to me because I always put them at the same level unless they are basically one-liners. – Loren Pechtel Jan 02 '10 at 05:46
  • 2
    +1 for the linq query. Especially when you only want one object returned. Instead of (from x in y select).first(), why not a (from x in y select top 1) or something to fit closer to actual sql syntax. – AdmSteck May 12 '10 at 19:43
  • if you wish you could switch() on any type, and that case could be any expression check out F# pattern matching. http://www.c-sharpcorner.com/UploadFile/mgold/PatternMatchingFSharp04292008183848PM/PatternMatchingFSharp.aspx – gradbot May 26 '10 at 03:28
  • +1: because C# belongs on higher place on this list ;-) (Oh, and the LINQ thing) – GvS May 26 '10 at 13:40
  • +1 for the LINQ method call thing, and I'd give +45 for switch()ing on any type. – drharris Jun 02 '10 at 05:46
  • `switch` on any elementary type? `case` as any expression? Sounds like VB.Net is better :) http://msdn.microsoft.com/en-us/library/cy37t14y(VS.71).aspx – MarkJ Jul 17 '10 at 21:33
  • The do method is trivial to write in only 2/3 lines of code with an etension method - pretty sure many here have written one themselves... – saret Aug 19 '10 at 10:34
  • Surely switching on a type could be better handled with polymorphism? – EightyOne Unite Oct 22 '10 at 07:29
  • @Stimul8d: No, not switching on type, `switch` on any type. Not just `int`, `enum`, `string`. – Jay Bazuzi Oct 22 '10 at 15:00
25

C (OK, it's not my favorite, but it hadn't been done yet.)

  • Socket library syntax.
  • No function overloading.
  • C-style strings.
  • Buffer overruns.
  • Cryptic syntax. I don't know how many times I've looked up stuff like atoi, slapped my forehead, and shouted "Of course!"

EDIT: I could probably come up with more if I resorted to more library code (like I did with sockets, but those are particularly bad), but I already felt like I was cheating for picking on C. So many languages exist only to take the good parts of C and replace the bad that it's kind of like beating a dead horse.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
  • 22
    What socket syntax? C has no concept of sockets. – Ferruccio Nov 11 '08 at 22:47
  • http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_15.html – Bill the Lizard Nov 11 '08 at 22:58
  • 3
    Oh, c'mon! You can come up with five. Doesn't pointer arithmetic just suck? :) – brian d foy Nov 11 '08 at 23:02
  • Actually, I've never understood what sucks about it. I learned it from K&R (like most people, I imagine) and never had much problem with it. – Bill the Lizard Nov 11 '08 at 23:05
  • Okay, the peer pressure got to me. I came up with one. (I could never cut it as that 5th dentist.) – Bill the Lizard Nov 11 '08 at 23:19
  • 8
    +1 I laughed at "C-style strings." And @brain_d_foy: pointer arithmetic only sucks if you don't understand it. – Chris Lutz Feb 19 '09 at 07:07
  • 1
    @Chris Luts: Even back when I was learning plain C (before I knew C++ or any other OO language) I just knew there was something wrong about char arrays. :) – Bill the Lizard Feb 19 '09 at 13:56
  • 2
    pointer arithmetic is a power saw - very efficient, but you risk taking your whole leg – Thorbjørn Ravn Andersen Dec 23 '09 at 14:33
  • Seriously.. the "Cryptic syntax" point is valid, but should refer to actual syntax (i.e: type declarations) to get the point across. For example: `char *(*(**foo [][8])())[];` Not to mention the standard library is a useless piece of crap. "No function overloading" is also a pretty bad point... C is meant to be a portable assembler, _not_ an OO language. – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ May 23 '10 at 17:23
  • @Longpoke: Nobody said library == syntax. There's nothing particularly OO about *function* overloading. Plenty of languages have it, and I always miss it when I write anything in C. – Bill the Lizard May 23 '10 at 23:34
  • @Bill: Well it would be kind of useless since C isn't good for anything but glue code these days... – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ May 24 '10 at 00:40
  • @Longpoke: Maybe if it had nice features people could stand to write more than glue code in it. :) – Bill the Lizard May 24 '10 at 02:20
  • @Bill: Yeah well it would also need a total remake, I find programming assembler more intuitive than C (although I'm not sure if it's possible to effeciently remove all the undefined behaviour, but at least the syntax and semantics could be fixed up quite a bit). I've always been hoping to see a modern version of C be made, Ada, D, C++, and Go are too big to be called that. – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ May 24 '10 at 03:24
  • @Longpoke - no one considers assembler more intuitive than C. You can't be serious. Hate C, OK. But implying assembler is somehow easier than C is disingenuous. Have you ever looked at the assembler output of a good C compiler? – xcramps May 25 '10 at 19:40
  • @xcramps, The _syntax_, not semantics, (although the semantics are equivalent to a very well documented library). Take C vs the style of Intel x86: in C, a pointer dereference is `*x`, while in x86, it's `[x]`. Now imagine if you could expand that how Ollydbg does. double dereference would be `[[x]]`, while in C it's `**x`. call deref would be `[x]()`, while in C it would be `(*x)()`. func pointer declaration: `[int function(int a, [float] b)] x`, vs `int (*x)(int a, float* b) x`. clearly the former is superior. heck anything is better than C syntax. – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ May 25 '10 at 21:38
  • but yeah, that would be if Intel x86 assembler syntax was generalized to a C like language. nonetheless the restricted subset that's allowed is _very_ easy to comprehend compared to C... – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ May 25 '10 at 21:40
25

PHP

  1. No debugging features if you don't control the server, and even then they kinda suck
  2. The extreme amount of bad PHP code floating around gives all PHP programmers a bad name
  3. Inconsistent function naming
  4. Inability to have a static typed variable if I want one (I'm a big fan of dynamic typing 90% of the time)
  5. REGISTER_GLOBALS is the devil
MattBelanger
  • 5,280
  • 6
  • 37
  • 34
  • 25
    REGISTER_GLOBALS once ate my dog :( – Pim Jager Nov 15 '08 at 11:08
  • 2
    1: I recommend xdebug and a GUI client such as MacGDBp. That really eases some of the pain... I agree on the other points. – Jonas Due Vesterheden Nov 15 '08 at 11:54
  • 5
    #2: Oh god, don't get me started on that. I always have to defend myself as a PHP developer against people who only have seen the mess that many people create with PHP. – selfawaresoup May 23 '10 at 12:04
  • 1
    +1 for #2 I've spent far too much time defending myself as a PHP developer. – UnkwnTech May 25 '10 at 08:20
  • +1 for #2 -- results in bad salary too :( – Shiki May 25 '10 at 18:44
  • I heard that: A long time ago, Chuck Norris got angry with the world and roundhousekicked REGISTER_GLOBALS from hell until it got to PHP. – Javier Parra May 25 '10 at 22:10
  • There are IDEs such as NuSphere's phpED that comes with their own debugger that will work with any server, regardless of your level of control. Also, you can use any debugger, like you said, when using your own server, such as localhost. You wouldn't want to do line-by-line debugging with a live build anyway. – asnyder May 26 '10 at 05:37
24

Common Lisp:

  1. Keywords are often too wordy.
  2. Library support is pitiful.
  3. Doesn't work well in OSes that want to handle memory more strictly.
  4. Doesn't have good facilities for interacting with the OS.
  5. The "loop" facility is not well defined, and sure doesn't look Lispy.
David Thornley
  • 56,304
  • 9
  • 91
  • 158
  • 2
    'loop' might not be lispy, but what's poorly defined about it? – Daniel Cassidy Dec 07 '08 at 02:08
  • 2
    I haven't read the standard myself, I'm mostly going on Paul Graham's "On Lisp". He says the standard is mostly examples, and doesn't define corner cases at all well. – David Thornley Jun 25 '09 at 20:19
  • 3
    don't you mean keywords-are-too-wordy ? – GClaramunt May 25 '10 at 18:26
  • I agree that it isn't "lispy," but CLtLv2 spends a lot of time on it. I just think it was designed to do way too much. http://sunsite.univie.ac.at/textbooks/cltl/clm/node235.html#SECTION003000000000000000000 – Hans Van Slooten May 25 '10 at 18:32
  • In addition to "loop", "format" is also not very Lisplike. I hate "format" and "loop" both even though Lisp is my favorite language. – Paul Reiners May 25 '10 at 20:12
24

BrainF*ck

  • Your highlight is that you're Turing complete?! I can do more in Perl regular expressions!

  • Lack of objects. C'mon, people! It's like, hello...

  • No networking libraries. All I want is to scrape a web page, GOSH.

  • No first-class functions. Congratulations — you get to commiserate with your Java friends.

  • An infinite tape for storage and nothing else. This is so anally pretentious that we might as well be writing Lisp.

a paid nerd
  • 30,702
  • 30
  • 134
  • 179
23

JavaScript

  1. numbers as strings - Math can be frustrating when numbers are intpreted as strings. 5 + 2 = 52? Grrr...
  2. permissions - all the best stuff requires permission from the user!
  3. screen updates - The browser must be in the steady state to update the screen. There doesn't seem to be a way to force the screen to update in the middle of a script.
  4. Slow - although Google's Chrome is nice...
  5. Browser differences make using the language a [censored].
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
BoltBait
  • 11,361
  • 9
  • 58
  • 87
  • 4
    The numbers as strings is easily fixed. If you've ever got a string, you need to parseInt(x,10) it. The giant fail is when you leave out the ,10, and it interprets '017' as OCTAL – Orion Edwards Nov 13 '08 at 00:12
  • What I have been doing is multiplying all of my numeric variables by 1. That seems to force Javascript to read them as numbers. And, it doesn't convert decimals to integers. – BoltBait Nov 13 '08 at 00:27
  • Didn't everyone learn that 1+1=11 when they were a kid? – Flame Nov 19 '08 at 01:27
  • 3
    false == 0 == [] == "" but null and NaN are not. NaN != NaN. null == null. – Jimmy Nov 24 '08 at 19:21
  • 7
    typeof "a string" == "string". typeof new String("another string") == "object. new String('a').constructor == "a".constructor. typeof new Array() == 'object' – Jimmy Nov 24 '08 at 19:24
  • for(x in list) returns the indices rather than the values. – Jimmy Nov 24 '08 at 19:26
  • 1
    for(x in object) returns functions – Jimmy Nov 24 '08 at 19:28
  • (ok, not javascript technically) domelement.onmouseover/out fires against child nodes. – Jimmy Nov 24 '08 at 19:29
  • @boltbait, that probably just translates to a parseFloat(str) call. javascript does treat numbers and strings as different types. – Jimmy Nov 24 '08 at 19:31
  • function rather than block scope, this causes not only the standard looping counter headaches but also manifests as sometimes requiring extra functions in loops just to provide closures around variables – Jimmy Nov 24 '08 at 19:34
  • I used to stay away from JavaScript until I found AppJet.com - now I love the language! Takes care of 4 & 5, and reduces the pain of 2 & 3. Now I'm longing for a JavaScript compiler... – Joe Pineda Nov 26 '08 at 23:14
  • @Jimmy: NaN != NaN is important (and C's fault anyway) – ysth Dec 10 '08 at 04:45
  • ok, perhaps NaN!=NaN isn't a 'real' problem, but [NaN, null, and ] form an unholy trinity of confusion. Add in isNaN(undefined) == true, undefined==null, undefined != NaN, for example. – Jimmy Dec 10 '08 at 18:36
  • personally i think NaN != Nan, null == null, null != everything else, NaN != everything else makes sense –  Jan 05 '09 at 13:30
  • 14
    -1, this list is mostly about browser issues, not the language itself. – Mauricio Scheffer Jan 21 '09 at 13:48
  • @mausch: Yes, but IE support is a real "clusterbomb", no? – Roboprog Jun 12 '09 at 23:55
  • @Mauricio, how would you use the language except in a browser? – BoltBait Sep 22 '09 at 00:02
  • @Jimmy: `isNaN(undefined) == true` that makes perfect sense, undefined is NotaNumber you wouldn't expect `isNaN('string') == true` to return false, would you? – Javier Parra May 25 '10 at 22:01
  • @Jimmy: a little clarification isNaN doesn't test if `var == NaN` it tests if ` typeof var != number` – Javier Parra May 25 '10 at 22:35
  • @BoltBait: Mozilla Rhino, Windows scripting host, node.js, just to name a few. The question is about languages, not about particular runtimes or environments. – Mauricio Scheffer Oct 13 '10 at 02:18
20

PHP:

  • One can never be sure that certain almost common extensions are available on all webservers.
  • tries to be everything in future ( goto, closures, ... )
  • many security risks for unexperienced users
  • more operator overloading would be nice
  • all the poor programmers that don't learn how to make it work properly, and give it a bad name

Nevertheless PHP is the (scripting) language. ;-)

Alister Bulman
  • 34,482
  • 9
  • 71
  • 110
okoman
  • 5,529
  • 11
  • 41
  • 45
18

VB6

  1. Windows only.
  2. No longer supported.
  3. Arrays can start at any number, rather then all being normalized to 0.
  4. compiled applications depends on many dll's to run properly.
  5. Many complicated controls like a browser control or complicated pieces of code tend to break the IDE when you run code uncompiled, but work just fine when compiled.
Asrrin29
  • 301
  • 2
  • 3
  • 11
  • 13
    VB is someone's favourite language? O_o. Why isn't "syntaz that is completely different and incompatible with other languages" and "gives bad habits with regards to other languages" here? – Jonta Nov 24 '08 at 19:15
  • just out of curiosity, what bad habits? I need some ammunition against my VB6 colleagues.. ;-) – petr k. Nov 26 '08 at 20:21
  • 3
    I actually find #3 a very powerful feature, not a bug - I'd really love VB.NET had this. AWK has it, in a sense, but then in AWK arrays are really hashes in disguise :( – Joe Pineda Nov 26 '08 at 23:11
  • @Joe: Maybe you should program in PL/1 or Pascal where you can start your arrays from anywhere :) – Adrian Pronk May 28 '09 at 09:50
  • 3
    On 1 and 4, and .NET C# doesn't require A COMPLETE FRAMEWORK and Operating System??? (hey, I heard that you mono bigot... it's still a "complete framework" for you, and I doubt a debian dist ever eats it). Regarding 5, no right-minded VB6 programmer (back in the day) kept the default "Compile On Demand" option ON... – jpinto3912 May 29 '09 at 22:14
  • 2
    Still have to support vb6 occasionally. Pet pieves: can't initialize a variable at declaration, no parametrized constructurs, one class per file, etc... If they would fix these issues, the language could go on for another 10 years easy. – AngryHacker Aug 04 '09 at 00:18
  • 14
    What about "On Error Resume Next"... thats like saying "this code is F**KED, but lets keep running it anyway. =) – StingyJack Oct 13 '09 at 12:11
  • It's a pity no 2 didn't come sooner, then I would've had to be taught it in Highschool. – mikek3332002 May 23 '10 at 11:30
  • I will add these: 1 No brackets! 2 Variable declaration. 3 Function calling and array accessing. – Secko May 23 '10 at 11:43
  • 1
    Also, many older VBx installers did not check the 'minor' part of Major.Minor.Revision.Build on DLL versions and would actually end up downgrading system DLLs. – JBRWilkinson May 25 '10 at 23:50
  • The different syntax is actually not _that_ terrible. What is more informative, C's and friends' `}`, Pascal's/Ruby's `end`, or VB's `End If`? (or `Wend`? har har har.) – badp May 26 '10 at 07:53
18

Ruby is my favourite language, here's what I don't like:

  • Green threads + blocking C libraries = giant fail
  • SO PAINFULLY SLOW
  • The standard library itself is inconsistent with its use of bang! methods
  • Module include + extend is messy.
  • "Open Classes" can't be scoped - I want to add a String#dostuff, but I don't want that to leak into all the third party libraries
  • No binary deployment packaging solution.
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
Orion Edwards
  • 121,657
  • 64
  • 239
  • 328
17

Delphi:

  • IDE is a bit unstable.
  • Code insight is sometimes confused.
  • Debugging is sometimes buggy.
  • Updating several project files can be cumbersome.
  • If starting up when one or more packages are unavailable, the error message is popped several times.
Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
  • 5
    All of these seem to be complaints about Delphi the IDE rather than Delphi the language (AKA Object Pascal) – Dónal Nov 11 '08 at 22:52
  • 11
    Presumably that's because Object Pascal is perfect ;-) – Mark Bessey Nov 11 '08 at 23:42
  • Ehm, I love Object Pascal because it's what I started with ... but every IDE since D7 was an utter failure. Mostly due to the insane instability since D7, no version after that has run properly on my systems (and I've used it across 3). – Robert K Nov 13 '08 at 14:52
  • @The Wicked Flea: things are supposed to have become a *lot* better since Delphi2007, and that's also actually my own experience... – onnodb Nov 26 '08 at 22:27
  • Delphi 2007 is rock-solid. I use it everyday and it just works. I previously used Delphi 2005 for about 3 months and it really really sucked for me. Delphi 2007 is sweet. – Mick Dec 10 '08 at 02:27
  • Delphi 2009 is a lot more stable than Delphi 2007 yet, I cant imagine working with a old version animore. – Cesar Romero Dec 10 '08 at 14:07
  • I still use delphi 6 and love it... – MikeJ Dec 21 '08 at 00:07
  • 3
    I'm a bit late to the party, but here goes anyway: - having to write down method signatures twice (interface + implementation) - Unit name is REQUIRED to be identical to the file name. WTF?!? – Martijn Mar 27 '09 at 17:30
  • The IDE has reasonable code completion so you're writing method signatures ONCE. Keep in mind that with Delphi, it really is a one stop shop - the IDE and the Language really come in together. – Arafangion Jun 16 '09 at 02:21
  • Carpal tunnel from having to type begin and end all these years... – dverespey Aug 12 '09 at 15:29
  • @dverespey At least you don't need to use the shift key { :-} – Gerry Coll Sep 25 '09 at 03:40
  • 1
    I find the begin..ends to be superior--they're much clearer than {}. You spend a lot more time reading code than writing it. For a gripe, though--you can't use defined subranges of enumerated types in a case even though it's perfectly legal if you declare the range right there in the case. Also, no forward references across units. – Loren Pechtel Jan 02 '10 at 05:51
  • isn't Delphi dead as disco by now? – Alex Nolasco Mar 07 '10 at 02:16
  • 1
    @AlexanderN: No, it has never been more alive, popular or great. – Andreas Rejbrand May 23 '10 at 17:31
  • +1, easy to build, optional namespaces, clear syntax – arthurprs May 27 '10 at 01:24
  • 1
    You forgot: The compiler enforces type safety with a strictness unknown to many languages, yet considers strings as "special". Changes the size of 'char' depending on compiler, has a confusing implementation of "Interfaces", which turn out to be almost completely unrelated to classes - classes are to object oriented programming, whereas Interfaces are as to Microsoft COM interfaces! Classes are not reference counted, but interfaces are! – Arafangion Jun 06 '10 at 01:12
  • Interfaces _may_ be reference counted if, for instance, the implementations subclass TInterfacedObject. But interfaces do invoke "compiler magic" at the entry- and exit-points of a procedure/function. – Frank Shearar Jun 28 '10 at 06:58
16

JavaScript

  • Every script is executed in a single global 'namespace'...something which you have to look out for when working with scripts from different sources

  • If a variable is used but hasnt been defined before hand, it is considered a global variable

  • Browser vendors making up standards as they please, making coding for us developers using such a beautiful language harder than it should be

  • Case-Sensitivity - considering that there is no decent IDE for developing js with compile-time checking

  • Workarounds (such as the use of hasOwnProperty method) to perform some, otherwise simple operations.

Andreas Grech
  • 105,982
  • 98
  • 297
  • 360
  • AFAIK, all extensions to the JS *language* (not the DOM) by browser vendors have at least been pushed for standard adoption—even if the standards process has failed to achieve that. hasOwnProperty/workarounds: double-edged sword. To force the "simplicity", we lose a lot of power and flexibility. That complaint always pisses me off. Write your loops right (and check your object members right too)! – eyelidlessness Jul 23 '09 at 05:44
15

Haskell:

  1. Space leaks from lazy evaluation.
  2. Numeric Hierarchy not constructed with regard to mathematical abstractions.
  3. Strict monadic IO can make it harder to debug.
  4. The big implementations handle I/O in ways that don't seem quite compatible with the standard. (In particular, outputting characters only outputs the low 8 bits -- and then code gets built that uses this assumption to do binary I/O. Ick.)
  5. Associativity of ($) operator could be changed to make some expressions prettier.

Most of these don't rise to the level of hate, and there are people trying to fix or construct solid workarounds for each of these.

Edit: There's been some confusion about point 5. In particular some people seem to think I meant the order of arguments, which I don't. Rather than explaining what I meant, I'll just point people to the following link, http://hackage.haskell.org/trac/haskell-prime/wiki/ChangeDollarAssociativity , which expresses it well.

wnoise
  • 9,764
  • 37
  • 47
  • 3
    Why would you want to change the associativity of ($)? 'f g h x' brackets as '((f g) h) x' and 'f $ g $ h $ x' brackets as 'f (g (h x))'... – Erik Hesselink Nov 13 '08 at 14:41
  • 1
    I <3 Haskell. The standard library needs to include mountains of mathematical abstractions, including vector spaces et al. The prelude also needs an operator which chains just like ($) but from left to right { source |> func1 |> filter func2 |> map (func3 10) }. – yfeldblum Nov 24 '08 at 04:30
  • 10
    You missed out the really bad one: the tendency of Haskell programmers to use one letter variable names. – Benjamin Confino Apr 04 '09 at 16:22
  • 1
    A left-associative ($) operator is just function application, which in Haskell is represented by the space character. @Justice: Try the flip function. (|>) = flip ($) – Apocalisp Jun 16 '09 at 01:43
  • I was with you up to the `$`. An infix right-associative identity function is the best thing *ever*. – Norman Ramsey Apr 23 '10 at 06:09
  • The lack of cast operators(string to int), odd syntax for IO, & list only access were my hates – mikek3332002 May 23 '10 at 11:38
  • 1
    Can someone explain the point of #5? I thought right associativity was the whole point of ($). – Tim Matthews May 26 '10 at 16:08
  • 1
    The thing I hate the most is the ugliness of working with mutable arrays (example: http://www.haskell.org/haskellwiki/Prime_numbers#Using_ST_Array ). However, dynamic programming with immutable boxed arrays works very nicely. – Joey Adams May 29 '10 at 19:10
  • 6. Difficult to work out time and space complexities due to laziness. – j_random_hacker Jun 01 '10 at 13:16
  • 1
    7. Half the useful things in the language are described in a huge DAG of research papers. – j_random_hacker Jun 01 '10 at 13:21
  • 8. Basic stuff like recursing through nested data types requires either a pile of repetitive boilerplate or a language extension (rank-2 polymorphism for SYB) – j_random_hacker Jun 01 '10 at 13:25
  • 9. Point-free style! What's the point? Other than to satisfy some masochistic minimalistic craving? (Of course half the time it won't automatically typecheck due to the monomorphism restriction.) – j_random_hacker Jun 01 '10 at 13:34
  • 10. It's hard. It's taking me forever to get beyond newb. I love it though :D – Matt Ellen Jul 14 '10 at 18:06
  • @Erik Hesselink: @Apocalisp:, @Tim Matthews:, See the link I added. It's a subtle point. The dollar sign seems to replicate function application via " ". The utility is the different precedence it has. The associativity is a minor point, but just as left associativity is nice for function application, it's also nice for this bracketing and mixing with function application. – wnoise Mar 01 '11 at 21:01
  • 1
    @Eric, Norman, Apocalisp: If you flip the associativity of $ it can be used to delimit multiple arguments. `f $ x y z $ quux quaffle` becomes `f (x y z) (quux quaffle)`, the utility of the right-associative $ is still present, because if you wanted the other meaning for that you can use `f . x y z $ quux quaffle`. – Edward Kmett Mar 06 '11 at 04:43
13

Smalltalk

  • I don't want to develop in java, delphi, c#, or ruby anymore (which is impractical as the main development languages in my company are c#, delphi and java).
  • Left-to-right evaluation.
  • Has a class comment but no method comment (at least in Squeak)
  • No real standard library, lots of differences in details
  • Lack of namespaces
Stephan Eggermont
  • 15,847
  • 1
  • 38
  • 65
  • How is the first something you hate about Smalltalk? – ysth Dec 10 '08 at 04:53
  • 5
    Smalltalk made me much unhappier over other languages, that's not nice. – Stephan Eggermont Dec 10 '08 at 12:18
  • @ysth: since my day job uses C++ to exclusion of (almost) all other languages, anything that makes me like it less could hurt my morale. :-) If my goal was only to feel better about my day job, I'd learn Intercal! – Aaron Dec 16 '08 at 19:43
12

Lua

I love this language, but there are some things that bug me for years!

  • No (built-in) support of binary operations (as of 5.1, it might come with 5.2).
  • Should have a built-in binary buffer implementation, allowing for example in place long string concatenation.
  • I know it doesn't fit well in the syntax, but sometime I miss longVariableName++ or verboseVariableName += 5.
  • Reference assumes knowledge of C (I have it but it is a minus for newcomers) and defers some help to C reference! And sometime it is too terse.
  • It is starting to have a good deal of libraries, but you have to get them from various places. On the other hand, the download is very small! ;-)
PhiLho
  • 40,535
  • 6
  • 96
  • 134
  • Not sure exactly what you mean with "long string concatenation", but lua has one facility for building strings: pack a table of strings, and make the result with `table.concat(..)`. – u0b34a0f6ae May 25 '10 at 20:49
  • I greatly miss the `continue` statement when I'm using Lua. Pretty much entirely because I find less indentation levels more aesthetically pleasing. – David May 25 '10 at 22:17
  • @kaizer.se: I know, and use it, but yet I feel there is some waste of memory in this process (can be wrong, though). Anyway, it is really a minor issue... :-) @David: I agree on this one too. – PhiLho May 26 '10 at 11:42
12

I know I'm late to the party, but hate is timeless!

Java

  • Runtime.exec(). So, if I don't manually clear the STDOUT and STDERR buffers, my code will hang? Wow. Die, plz.
  • Null Pointer Exceptions. Responsible programming means I have to treat most objects like they're unexploded bombs, which is kind of a pisser in an object-oriented language. And when the inevitable happens I kinda need to know which object blew up in my face, but Java apparently feels telling me would be cheating.
  • File I/O. Why do I have to jump through this many hoops to read a dang text file? And when copying files, I have to funnel the source file into my code and manually handle the output byte buffer? You're serious?
  • Primitives vs. Primitive Wrappers. Note that Java now has a number of features that allow you to treat primitives and their wrapper objects as interchangeable in some places, but not in others; don't worry, the compiler will let you know which is which. This feels like a hack to work around a fundamentally broketastic design decision. And it is. (EDIT: Actually, the compiler is a much crappier safety net than I thought, particular when doing equality checks. If `a` and `b` are integers, `a == b` is guaranteed to behave as expected only if at least one of them is of type `int`. If they're both type `Integer`, then that statement will do what you think only if the two numbers are between -128 and 127. `Integer a = 1000; Integer b = 1000; return a == b;` will return `false`. Really.)
  • XML. I have this dirt-simple little XML file I need to create and I have to do what?
BlairHippo
  • 9,502
  • 10
  • 54
  • 78
  • -1 java tells you which object it is, it's the one before the . or [] operator in the first line of the stacktrace – flybywire Jul 07 '09 at 08:09
  • 3
    Uhm, no. It will tell me which LINE it's on. If there's only one object that could be null on that line, that's sufficient. If there are multiple objects on that line that could be null, I have to guess. – BlairHippo Jul 08 '09 at 14:53
  • @File IO: Moving files is painful, but Java's IO API is not that bad. I used to hate it, but that's before I learned about encodings. Now, I find it quite handy. Of course, if you just want something like C#'s ReadAllText/ReadAllBytes, it's still inconvenient. – luiscubal May 25 '10 at 14:57
11

VB.NET

  • The behavior AndAlso / OrElse and And / Or seems backwards. Perhaps they should be switched.
  • When can only be used for exception catching. The ability to do a When conditional would be nice for some other things.
  • There is no friggin Refactoring in the VS IDE (not really the language's fault) like there is with C#
  • Not <obj> Is Nothing. Yes, this has been remedied by IsNot, but for some reason I see the Not Is being used too often. (I see it much more frequently with devs who speak english as a second language, does it make better sense from that angle?)
  • It doesn't require the () on ToString() and most functions. (Leads to sloppy coding habits)
  • Having to do _ when breaking a line.
  • It allows optional parameters. (Leads to sloppy coding habits)
  • declaring an array is done by UpperBound and not by capacity. "Dim arr(2) as String" will actually hold 3 elements.
  • Having = be a comparison and assignment operator.
badp
  • 11,409
  • 3
  • 61
  • 89
StingyJack
  • 19,041
  • 10
  • 63
  • 122
  • +1 for UpperBound array declaration. I dislike optional parameters too, but the C# guys are clamouring for them? odd. According to someone (can't remember who, on SO) said that in vb11 will allow mid line breaks (think fluentInterfaces) with out the _. I look forward to that :) – Pondidum May 28 '09 at 09:15
  • past .Net, there's no good reason for you to stay with VB... go C#. – jpinto3912 May 29 '09 at 22:15
  • 3
    c# is getting optional parameters, and I miss them – Maslow Aug 21 '09 at 21:25
  • 1
    Do some office interop work. You'll end up praying for optional parameters. – wefwfwefwe Oct 12 '09 at 16:51
  • @wefwfwefwe - I have, but I just see it abused too much. – StingyJack Oct 13 '09 at 12:01
  • *Nothing* being *null* as well as default(T) for value types. This leads to such nice effects like If(True, Nothing, 5) returning zero! – Heinzi Nov 04 '09 at 08:48
  • 1
    How do optional parameters lead to sloppy coding habits? – helium Jan 03 '10 at 22:04
  • Because you or the next dev can "forget" to set the parameters in the correct order on a method call, and cause yourself additional debug/troubleshoot/recompile time. Once this pattern is established, it will continue to be used, leading to additional time wasted. – StingyJack Jan 05 '10 at 18:38
  • @jpinto3912 - VB has literal XML handling that C# doesn't appear to have yet.. http://blogs.msdn.com/b/bethmassi/archive/2007/10/30/quickly-import-and-export-excel-data-with-linq-to-xml.aspx – JBRWilkinson May 25 '10 at 23:54
  • In VS 2010 you don't have to use _ in most of the places you used to have to. – Ryan Lundy Oct 27 '10 at 16:52
11

Python

  • 1-3: There is no one obvious choice of packaging/build/documenting system (such as Perl's cpan, POD or Ruby's gem, rake, rdoc).

  • 4: Python 3.0 is incompatible enough to require two source branches (2.x and 3.x) for every single Python project. But Python 3.0 is not incompatible enough to justify it. Most py3k advantages are too subtle.

  • 5: Jython, IronPython, CPython are incompatible.

jfs
  • 399,953
  • 195
  • 994
  • 1,670
10

Objective Caml

  1. Non-concurrent garbage collector. I can write multi-threaded programs all day long, but they're only ever going to get one of my eight cores at a time. This makes me sad.

  2. No type classes (or their moral equivalent). There's Furuse-san's GCaml, but it's A) not quite as good as type classes, and B) not in the INRIA distribution.

  3. Badly in need of a Cocoa bridge. Seriously. If I wrote more code with actual interfaces to DNA-based life forms, then I'd probably break down and write the damned thing myself. Why hasn't anybody else done this yet?

  4. Functors are abominable. Seriously, modules ought to be first-class values. There should be only one kind of function. Read Montagu and Rémy before you flame me for this.

  5. Should use LLVM for its back-end. Who do I have to murder to get OCaml to compile for my stupid little ARM6 core?

So yeah, I have some issues. I still love the language to pieces. It's totally awesome.

james woodyatt
  • 2,170
  • 17
  • 17
  • 1
    I agree 100%. OCaml is a language that I *want* to love so much, but just won't ever use it because of a combination of the factors you list. – Jason Baker May 25 '10 at 17:28
  • 1
    Hey, so it turns out that OCaml-3.12 adds first-class modules. I should edit my original entry to replace item 4 with item 5, and append a new item 5: tagged boxes. Seriously gentlemen, I think the debate is settled now-- the spineless tagless G-machine is the proper way to lower functional languages into stock hardware. Please fix this at the same time you add the LLVM back-end and the concurrent garbage collector. I don't want to lose the 'mutable' keyword by going to Haskell, but the temptation is near overwhelming. – james woodyatt Sep 15 '10 at 00:59
9

My own top-5 "what do I really hate in c++":

[5] Automatic generation of constructors, destructor and assignment operator. Man, whenever I don't declare something in the class, it means I DON'T NEED IT, not I FORGOT IT. Do you, compilers, hear me?!

[4] Template syntax. Oh, do I really need to type all these "<" and ">", whenever I decide to extract definitions from the class body?

[3] Strings. Jeez, I am fed up with "const char*", I have to handle NULL situations, I have to waste O(N) to get its length, I have to allocate a buffer for concat operations.

[2] Macroprocessing. Whenever I do not understand, what is going on with my compiler, I start looking for a macro.

[1] Operator overloading. I see the code "A + B * C" and I cannot say a word what this code is about, until I see the actual types of A, B and C.

SadSido
  • 2,511
  • 22
  • 36
  • +1 for [1] Lots of people moan that Java should have operator overloading, clearly they never coded much in C++ – Steve Claridge Oct 09 '09 at 20:19
  • +1 for all the items in the list (I wish I could give you +1 for *each* item of the list ;-) Re operator overloading, I'm going to illustrate that someday, by writing a very special class where all possible operators will be overloaded, and things like +, += or = will have completely incomprehensible meanings and unrelated to their semantics in C. – Arthur Reutenauer Oct 09 '09 at 21:37
  • 9
    Re: operator overloading: it won't be the fault of the language but of the programmers if they write strange overloaded operators that don't do what they convey. I like the flexibility coming of operator overloading. – MP24 Nov 11 '09 at 12:06
  • @SteveClaridge operator overloading isn't difficult to handle when you have managed memory and you only pass reference the way Java does. The reason it's a disaster in C++ is because you can get values or references and you have to manage the memory yourself. – TM. Dec 28 '09 at 05:47
  • +1 for Automatic Constructor creation – Viktor Sehr Dec 28 '09 at 13:36
  • 2
    Constructors and destructors are generated not because you forgot them, but because no matter what the compiler needs them to be there. Construction so that the compiler can call the constructors of member variables, and destructors likewise. - there's no other sensible place to call them. – blwy10 Jan 02 '10 at 05:35
  • to blwy10: I would like to see an error, if I try to create an object, but no constructors were defined. I don't want to receive object with uninitialized members instead. – SadSido Jan 08 '10 at 09:35
  • re: [3] You're in luck, there are at least two dozen other implementations of string for you to choose from! – Jacob Krall May 26 '10 at 06:59
  • 1
    Re: operator overloading. 'A.Add(B).Mult(C)' doesn't tell me any more then 'A+B*C'. Either way I have to either look up the types and functions, or trust that the programmer gave things sane names. And 'A.Add(B).Mult(C)' is ugly and wordy. – Matthew Scouten Aug 17 '10 at 03:05
  • If (3) is biting you, you are doing something wrong. Well written C++ code uses std::string. – Billy ONeal Sep 09 '10 at 17:34
9

VBA (including MS Office IDE):

1) Poor Documentation
2) Poor Error Messages
3) Inadequate Array Manipulation Routines
4) Having to repeat types for DIM statements
5) Won't print in color (have to buy 3rd party addin)

Lance Roberts
  • 22,383
  • 32
  • 112
  • 130
  • I dont get how VBA can be anyone's prefered language – Eric Dec 10 '08 at 22:01
  • 2
    Because that's what I have to do most of my work in. I have to support a huge amount of convoluted, interconnected Excel spreadsheets. I hope to rewrite it all someday in a console app, but it'll take a while. – Lance Roberts Dec 11 '08 at 16:13
  • 2
    i Feel so so sorry for you...:( vba is trash – Kelly Feb 20 '09 at 04:08
  • 1
    @Eric: be a non CS enginneer, install MSOFFICE, and start solving everyday problems while doing your spreadsheets, docs, etc. – jpinto3912 May 29 '09 at 22:18
  • 1
    How about lack of casting from variant to its named object type. Had the problem varient/Contanct assigned to contact produced type mismatch. – mikek3332002 May 23 '10 at 11:40
8

Delphi (aka Object Pascal), I'll talk about the native version, not .NET.

  • Var blocks!
  • Interfaces in the language are designed with COM usage in mind - thus more complex than say in C# or Java. ie. Reference counting involved unless you disable it explicitly.
  • No try except finally end;
  • Object creation too explicit:

    var obj: TMyObject;
    ...
    obj := TMyObject.Create;
    try
      ...
    finally
      obj.Free;
    end;
    

Instead something like

auto obj: TMyObject; // compiler adds the default constructor call and the destructor call in a try/finally block. 
  • OK, the language is so good I can't really think of any more so I'm pushing myself here: Builtin types such as string, integer.. or enums would better have methods. ie. i.ToString instead of IntToStr(i).
utku_karatas
  • 6,163
  • 4
  • 40
  • 52
7

Lua:

  • I understand the reasons, but seriously. Variables should be local by default, with a global keyword, not vice versa.
  • I'm in general not a huge fan of the do/end style semantics. I much prefer C-style braces.
  • Dynamic typing. I know, some of you go "Huh?" but I've been entirely spoiled by knowing exactly what type of data will be in a given variable. Constant if (type(var) == "string") then stuff() end is a pain.
  • Variables need not be defined before they're used. I would much rather be explicit about what I'm trying to do than risk a typo causing what I like to call "wacky beans".

PHP:

  • Again, dynamic typing.
  • Lack of closures. I know, you can do $function($arg); but that doesn't count.
  • Yet again, variables can be used before being defined. I have a personal policy of always explicitly initializing any variable to a known value before I use it, and I extend that to whatever best practices documents I have any sort of control over.

C/C++:

  • Headers = pain in the neck.
  • No support for closures. (I'm excited for C++0x, which has them.)
  • Static typing. "Wait," you say. "You just said you don't like dynamic typing!" Yes, I did say that. But static typing can be a pain in the butt too. (If given a choice I'd still pick static typing.) Optimally I'd like a language that was statically typed by default, but supported a dynamic type as well. (And I'd also like a pony, and fifty billion dollars, and the world, please.)
Sean Edwards
  • 2,062
  • 1
  • 18
  • 19
  • It sounds like you preffer C# to C++, it supports every one of your dislikes about C++. – Blindy Jun 05 '09 at 18:47
  • I don't understand the connection between $function($arg) and closures. $function is a dynamically assigned function name, closures are basically equivalent to block scoping (and usually mistakenly conflated with anonymous functions). – eyelidlessness Jul 23 '09 at 06:02
  • I'm sorry, you're right. Closure is the wrong word. – Sean Edwards Jul 24 '09 at 06:18
  • 2
    Regarding static/dynamic typing, your ideal system seems a description of C#. – luiscubal May 25 '10 at 15:03
  • luiscubal and Bindy: Funny you say that. Since writing this, I've been using C# a lot more, and it is wonderful. – Sean Edwards May 27 '10 at 14:17
7

C

  1. No parametric polymorphism (i.e. C++ templates). It makes writing reusable data structures and algorithms a pain (and there's hardly any static checking). See for instance the comparator argument to qsort and bsearch: the comparator takes void pointers :(
  2. No library of data structures. I really hate writing my own hash table. I also really hate scouring the web for a library of reusable data structures. Especially if it turns out to be incomplete.
  3. Strings. Inefficient representation, unwieldy if you make it sane, too hard to safely input a string. No standard for snprintf. Too hard to create a format string with sprintf, then use that to create a string with sprintf again, in a safe way.
  4. Only lexical macros. If different compilers expects function annotation in different places, I have to put the same HAS_NO_SIDE_EFFECTS in different places. Why can't I just grab the function, switch over the compiler type, and then insert it at the right place by a macro call?
  5. No portable libraries for common functionality. For sockets and threading, I use SDL---a frigging game library. For .ini-style parsers, the only library I could find which was packaged for ubuntu, I posted on the daily wtf (it calculates an array of hash values, then does a linear scan through it...)

C++

  1. Template syntax is heavy and unweildy. Let's see, for(map<string, int>::const_iterator it = mymap.begin(); it != mymap.end(); ++it).
  2. Design errors in the STL. Should changing allocation strategy for your vector really change its type?
  3. Overly complex type system. Type T1 has a convert-to-T2 method, and T2 has an implicit from-T1 constructor. Which is called? How does overloading, overriding and multiple inheritance interact? Poorly, I guess...
  4. Incredibly long and unwieldy error messages from templates. You know what I mean...
  5. References means you can't see output parameters at call sites. In C, you can guess what foo(bar, &baz) can and can't modify.
Jonas Kölker
  • 7,680
  • 3
  • 44
  • 51
  • 1
    "Should changing allocation strategy for your vector really change its type?" -- I can't see how you could use more than one allocation strategy without considering it a different type. The type includes the operations upon it, and the operations must be different if different allocators are used. – Juliano Jun 13 '09 at 01:02
  • 2
    +1 for C++ point 4. Template error messages make your eyes bleeed. – Steve Claridge Oct 09 '09 at 20:16
  • But when you fix all the problems in C, you basically get C++ – Calyth Oct 14 '09 at 15:40
  • @Calyth: When you fix all the problems in C++, you basically get D. :) – missingfaktor May 04 '10 at 08:37
  • C 2.,3. and 5. are all handled by Glib pretty well. – helpermethod May 04 '10 at 12:59
  • 1
    I agree a lot about #5: references bring so little to pointers and they obscure readers, all that for some convenience for not having to use `*` there in front of the name. – mike3996 Aug 18 '10 at 22:17
6

Haskell:

  • Space leaks - a price paid for laziness by default - maybe too high a price?
  • Even pure functions like head and tail can invoke error and boot you out to IO.
  • fail from Monad - bring back MonadZero.
  • The Num class - (+) should have been in AdditiveGroup or similar.
  • That Monad is not an Applicative.
Paul Delhanty
  • 751
  • 8
  • 11
6

My language du jour is Java. Here is what I hate about it:

5.) Lack of pointers
4.) Exception catching
3.) The Boolean type
2.) BigDecimal type
1.) C# fanboys and Java fanboys

Boolean can be null. I find this counterintuitive.

BigDecimal is a library and not a language feature. My annoyance with BigDecimal and Exception catching stems mainly from writing test classes that have to jump through a bunch of hoops to get actual work done. I should clarify I'm annoyed by these things, I'm not about to lobby for changes.

Jay Bazuzi
  • 45,157
  • 15
  • 111
  • 168
zmf
  • 9,095
  • 2
  • 26
  • 28
6

Python:

  1. Too slow!
  2. list operations don't return the list, so you can't do list.append(4).append(5). (I mean a reference to the same list, not a copy). This is a minor gripe; it's only come up a few times.
  3. statements don't return values (if, print, while, for, etc). This is only a problem when dealing with lambdas.
  4. lambdas can only be one expression. There's no real need for this restriction, as they are equivalent to functions in every other way. What if I want a button press event which calls two functions? I'd need to create a named function to supply that functionality to an action listener, while doing "lambda: f1(); f2()" would not hurt.
  5. you can only put standard a-zA-Z_0-9 as names. Having functions like "true?" and "+" would be great. Of course, this could lead to terrible obfuscation, but I'm not saying we immediately rename all functions to "p@$%3". Which do you find clearer to read: "dec2bin" or "dec->bin"? ("store_results" or "storeResults") or "store-results"?
badp
  • 11,409
  • 3
  • 61
  • 89
Claudiu
  • 224,032
  • 165
  • 485
  • 680
  • 5
    Your second point is sooo minor. Why don't you list.extend([4,5])? – Martin Cote Nov 11 '08 at 22:39
  • @pt 2, Lists are MUTABLE. Why return a copy of itself when adding a new entry? – Nick Stinemates Nov 11 '08 at 22:41
  • @Nick: He doesn't want to return a copy, he wants it to return the original list so that he can chain modifications to it. I think. – Jeremy Nov 11 '08 at 22:43
  • In Py3k you'll be able to use non-ASCII characters in identifiers, but I _think_ it still tries to stick to ones that are letters, not symbols. It's a pity, I think this would have been a good time for them to add that ability to the language. – Jeremy Nov 11 '08 at 22:45
  • 12
    My gut reaction to number 5 is shuddering in horror. This summer I had to clean up column names which had slashes, spaces, question marks, parens, colons, etc. Not fun. – pbh101 Nov 11 '08 at 23:16
  • Yeah, the lambda thing is a big WTF for me, too. Overall, you seem to want Lisp. – Svante Nov 12 '08 at 00:17
  • 1
    This is heavily influenced by my recent exposure to Scheme, it's true. for 5, it's mostly the fact that function names with dashes as separators ("print-columns") are prettier than either print_columns or printColumns, and also conversions (dec->bin) is cleaer than (decToBin) or (dec2bin). – Claudiu Nov 12 '08 at 08:05
  • "Too slow!"... as compared to? – Phillip B Oldham Nov 12 '08 at 09:21
  • @Philip: as compared to java, c, c++, haskell (Damn haskell is fast), maybe scheme. – Claudiu Nov 13 '08 at 07:00
  • list + [4] + [5] + [some comprehension] – hasen Dec 05 '08 at 18:09
  • 5
    if the langauge allows + in function names, parsing would be hell!! a+b is that a function name or an expression? if you have a function called "a+b" and two varialbes a,b then what should a+b do?? – hasen Dec 05 '08 at 18:11
  • tmp = 2048 x=3 tmp>>x Under your suggestion of having other characters be available for function names is "tmp>>x" a function or an expression? what about "tmp>x", or "tmp%x"? This would kill the readability of python. – Asa Ayers Jan 15 '09 at 19:35
  • Punctuation in function names is my #1 reason for disliking lisp & scheme. – user26294 Jan 30 '09 at 19:51
  • Reason why symbols appear in lisp identifiers and not in other languages: Number of lisp reserved symbols: 5 (, ), `, ', and " and the last two are optional. – SingleNegationElimination Feb 23 '09 at 04:58
  • @hasen and asa: under my suggestion, tmp>x would be a function/identifier called "tmp>x", and you'd have to type "tmp > x" to use the greater-than symbol. Allright, maybe it's not the best idea =). – Claudiu Feb 24 '09 at 02:48
  • 1
    "Too slow!" ... my Python data processing code runs at 50k-200k rows/sec on a 3 year old laptop. That's good enough for me... – Stephen Simmons May 05 '09 at 22:27
  • 10
    "lambda: (f1(), f2())" is a trick I've used in a few cases. –  May 21 '09 at 05:57
  • 1
    I don't get all the complaints about limiting lambdas to only one line. Just use a regular function! – TM. Dec 28 '09 at 05:45
  • Unladen Swallow for the "Too slow" part. On your ->bin addition... ????? I think you're looking for Pearl or Ruby if you want your code to look like Mesopotamian hieroglyphics. – orokusaki Dec 31 '09 at 20:23
  • @TM: Of course. And, while we're at it. Why have lambdas at all when you have functions? If you're going to add a feature to a language, make it useful. – luiscubal May 25 '10 at 14:48
  • #1: http://psyco.sourceforge.net/ ~~~ #3: For a good reason: lambdas are supposed to be side effect free! http://en.wikipedia.org/wiki/Functional_programming Besides, what should a `if` return? ~~~ #4: Use full fledged functions instead. You can also nest them. ~~~ #5 Not being able to insert operators in variable names sounds like a good idea to me... unless you believe `a = 2; b = 3; c = b-a` should raise a `NameError`? ;) – badp May 26 '10 at 08:13
6

Groovy/Grails

  1. Duck-Typing
  2. Convention over Configuration, assuming you know the Convention
  3. Everything you hate about Spring
  4. Everything you hate about Hibernate
  5. [Groovy] common operations across collections aren't (but recent releases improve this)
Ken Gentle
  • 13,277
  • 2
  • 41
  • 49
  • Maybe more important than all of those: **horrible documentation that is usually either missing or flat out *wrong*.** – TM. Dec 28 '09 at 05:48
6

ColdFusion

  1. Compile Time for large Flash Forms.
  2. Dynamic Variable Types (Sometimes I hate them.)
  3. Lack of features in CFScript.
  4. CFTable (Can never get it to display right).
  5. The lack of chart types left out of CFChart.
  6. Complete lack of NTLM support (enterprise ready - yeah right)
  7. Moronic var scoping in CFCs
  8. No concept of a true NULL - your variable just vanishes!
  9. No way to test for the existence of certain things (like scopes, just members inside them)
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • 7
    Oh god... Cold fusion. Why hasn't it died yet? – Nick Stinemates Nov 12 '08 at 04:10
  • 2
    ColdFusion is a zombie. Zombies are already dead ... yet somehow they're still up and about, still biting people in the face. (I get to say that: I work with it day-to-day.) – yfeldblum Nov 12 '08 at 12:28
  • I worked for a company that had their main website in ColdFusion. I hated trying to debug the thrown-together and bug-ridden mess. And it didn't help that the some servers used ColdFusion 5, others used 6, and others ran the ColdFusion code on .NET via BlueDragon. – Lara Dougan Nov 14 '08 at 05:53
6

Here's some more for Perl 5, from the perspective of someone who's created a lot of Perl modules, and in particular worked on Moose.

  1. The horrible brokenness that is overloading and tied variables. Both of these features are a failed attempt to allow transparent extension to the built-in types.

    They both fail in various ways, and require module authors like myself to either implement horrible hacks to support them, or to say "never pass an overloaded object to the foo() method". Neither alternative is really acceptable.

  2. Lack of proper hooks into the compilation process and the meta-model. Moose in general, and role usage in particular, could be made much safer if the Perl core allowed us to affect the compilation process via a sane API that allowed us to hook into the meta-model (packages, classes, etc.)

  3. Lack of named parameters built into the language. Instead, everyone reinvents this. It's annoying.

  4. Similarly, lack of optional types. I don't want a static language, but the ability to specify types and constraints, particularly on function/method parameters, would be great. Perl 6 gets this right. Types are optional, but very rich, and there's no fundamental difference between built-in and user-defined types.

  5. The backwards compatibility police. This is more of a cultural issue. A number of the above issues can never really be fixed, since Perl 5 has a very strong commitment to backwards compatibility. So even if something were to be added that effectively replaced the current ball of shit that is tie and overloading, those features will never be removed. Of course, backwards compatibility is also one of Perl 5's greatest strengths.

  6. Bonus hate: Perl's built-in exception mechanism is a joke. The fact that exceptions may be a string or object makes for an eternity of fiddly exception-catching code, and the lack of a catch in the language syntax is the wart on the wart.

Community
  • 1
  • 1
Dave Rolsky
  • 4,524
  • 1
  • 24
  • 24
6

JavaScript

  1. Function object syntax:

    f = new Function( "foo", "bar", "return foo+bar;" );
    

    (It takes n arguments, the first n-1 are arguments for the function, then nth is the actual function, in string form. Which is just silly.)

  2. Function arguments can be repeated.

    f = new Function( "foo", "foo", "return foo;" );
    

    The last repetition is the only one ever used, though:

    f( "bye", "hi" ) // returns "hi"
    f( "hi" ) // returns undefined
    
  3. E4X should just die. My users are always complaining that it doesn't work the way they think it will. Let's face it, when you need a page and a half of psuedocode for a setter, it's time to rethink things.

  4. A standard notion of stdin/stdout/stderr (and files!) would be nice.

  5. null != undefined

    It's irritating to have to handle them both. Sometimes it's useful, but most languages manage to limp along fine with one.

kris
  • 23,024
  • 10
  • 70
  • 79
  • 1
    Actually, null == undefined (loose equality). However, null !== undefined (strict inequality). You only need to handle both if you're testing for strict equality (null === undefined, which is false). – Daniel Cassidy Dec 07 '08 at 02:05
  • 8
    Also, why would you ever use the function constructor? f = function (foo, bar) { return foo+bar; } – Daniel Cassidy Dec 07 '08 at 02:06
  • To add to what Daniel Cassidy said, the Function constructor basically exists to ensure the language is consistent and developed upon its own foundations. You're not meant to use it for anything that isn't dynamically generated (which is probably a bad idea for most purposes anyway). – eyelidlessness Jul 23 '09 at 05:55
  • +1 for the fifth. It just makes your life a lot harder. – Şafak Gezer May 04 '10 at 10:43
6

ActionScript / AS3

  • No abstract classes
  • No private constructors (so singleton is a hack)
  • No typed arrays before FP10
  • Compile/publish time is ludicrously slow in Flash IDE
  • Performance of built in functions (e.g. Math) is slow

Otherwise it's actually a good language - much better than JavaScript, contrary to popular belief, and a million times better than something like PHP.

Iain
  • 9,432
  • 11
  • 47
  • 64
  • 1
    No method overloading, doesn't throw exception on division by zero – Amarghosh Sep 10 '09 at 07:16
  • 1~5 Fantastic Flash code editor. – eonil May 23 '10 at 11:24
  • @eyelidlessness: ActionScript3 is *compiled*, has inline XML capabilities (no DOM required), output works on 98% of internet-connected computers (source: Adobe :-) ) and comes with a ton of awesome graphical abilities in the libraries. Iz soo > JS. – JBRWilkinson May 25 '10 at 23:59
6

C#

It's a great language, especially with LINQ, but generics support is poor compared to C++. It had so much potential, but the current implementation is only useful for strongly-typed collections and similar trivial things. Some examples of where it falls down:

  • A generic argument cannot be restricted to enums (only classes or structs).
  • A generic argument cannot be a static class. Why? This seems like a completely artifical restriction.
  • You cannot specify that a generic type must have a constructor with a certain signature because you cannot have constructors on interfaces. Why not? It's just another method with the special name ".ctor".
  • Similarly, you cannot specify that a generic type must have a static method, because those also cannot be declared on interface. Something like static T Parse(string s) would often come in useful.
  • The compiler is too eager in prohibiting some casts which the programmer knows would actually work, so they require uglyness like (TheRealType)(object)value
  • No covariance, eg. IList<string> cannot be converted to IList<object>, even though string[] can be converted to object[]. (Microsoft might be fixing this in C# 4.0, though.)
EMP
  • 59,148
  • 53
  • 164
  • 220
  • You cannot specify that a generic type must have a constructor... while thats true but you can specify the constructor where you want to use it.. class Test where T : New(int) or some thing like that. – Peter Feb 03 '09 at 14:55
  • If you could cast IList to IList, you'd be able to call Add(object) on it and add stuff like integers. That's hardly type safe. – Blindy Jun 05 '09 at 18:45
  • You can use where T: Enum to limit the type argument to enum's – oɔɯǝɹ Jul 12 '09 at 20:51
  • > "while thats true but you can specify the constructor where you want to use it.. class Test where T : New(int) or some thing like that" Um.. what? – Fowl May 26 '10 at 02:23
  • "A generic argument cannot be a static class. Why?" This is for the same reason interfaces can't have static methods. What method could you call on the generic type? Static classes have no instance methods; static methods are non-inheritable. Alternatively, what method in your class could have a static parameter type-- you can't instantiate it, so by definition there can be no instance! – Jacob Krall May 26 '10 at 07:19
6

Python.

Although the weird way python deals with scope has been mentioned, the worst consequence of it, I feel, is that this is valid:

import random

def myFunction():

    if random.choice(True, False):
        myString = "blah blah blah"

    print myString

That is, inside the if block is the same scope as the rest of the function, meaning that variable declaration can occur inside condional branches, and be accessed outside of them. Most languages will either prevent you doing this, or at least offer you some kind of strict mode.

This function will sometimes succeed, and sometimes throw an exception. Although this is a contrived example, this could lead to some subtle problems.

SpoonMeiser
  • 19,918
  • 8
  • 50
  • 68
  • I actually consider this good. Its easy to point at the scope rules of language X and say that its scope rules are insane, but my feeling is that fewer rules to learn is better. – SingleNegationElimination Feb 23 '09 at 05:32
  • 4
    I think generally scope rules for languages are simple and consistent, conditional blocks and loops having their own scope isn't _more_ rules, it's the same rules being applied recursively. – SpoonMeiser Feb 23 '09 at 13:48
  • .. and I ususally would set myString to None just before the if anyway, signifying "have not been set yet". – kaleissin Oct 30 '09 at 13:48
  • @kaleissin I would too, but it's another step to get safe code that you get for free in other languages. – SpoonMeiser Nov 02 '09 at 12:02
  • @SpoonMeiser: How is that another step since you seem to be implying that in other languages `myString` needs to be declared/initialized outside of the `if` scope in order to exist outside of that scope? – Don O'Donnell Dec 28 '09 at 07:44
  • Since `myString` is obviously a string, for most use cases it would be safer to initialize it to the nul string, '', rather than `None`. – Don O'Donnell Dec 28 '09 at 07:48
6

Ruby:

  1. It's damn slow
  2. The egotistical community
  3. It's not quite smalltalk
  4. Errors when calling methods on nil rather than just returning nil à la Objective C
  5. Non-native threading
brian
  • 3,344
  • 2
  • 26
  • 35
5

I have a book exploring all sorts of projects in SNOBOL. The first chapter explores the history and culture around SNOBOL programming and language and spends some time making the argument that a good programmer likes a language not because of its flaws but in in spite of them.

My favourite language is Icon/Unicon. But there are still things that annoy me about it:

  1. It's not well known or all that popular.
  2. It has a much smaller library compared to PHP, Perl, Java, etc. Database access is done via ODBC, which is actually quite annoying.
  3. For all it's otherwise excellentt list handling, I miss PHP's built-in explode() and implode().
  4. It doesn't have a table constant. Lists, yes, tables, no.
  5. It is a compiled (actually translated) language.
staticsan
  • 29,935
  • 4
  • 60
  • 73
5

German

My native language... Though it can sound even more beautiful than Klingon it's a grammar hell...

  1. conjugations: even regular verbs have different forms for each person and time (with few exceptions)... Example: I see, you see, he/she/it sees, we see, you see, they see translates into: Ich sehe, du siehst, er/sie/es sieht, wir sehen, ihr seht, sie sehen.
  2. polite form of address: equals 3rd person plural, used to equal 2nd person plural in the middle age... I really hate the concept of distinguishing between "Du" and "Sie" for my philosophy is that each human being should be considered equal in the amount of respect for it deserves (I mean, what are swear words for, hm?)
  3. punctuation: show me a language that uses more commas regularly!
  4. missing suitable words: eg. there's no real German equivalent of "convenience" or any derivate of this word... in almost every case you just can't translate it into another German word and keep the meaning... instead you would have to make up a whole subset to describe it somewhat adequate...
  5. Anglicisms and Denglish: Sure, the English language has "Kindergarten" or "Poltergeist" and what not but the German language is overflowing with Anglicisms nobody needs... Even worse: We redefine some words we adopt, eg. in German "Handy" means a cell phone and has nothing to do with the adjective it is in English... There are influxes on grammar as well, leading to "Denglish" expressions (see linked article at Wikipedia) There's more, but I don't want to exaggerate this and those are my personal Top5 of what I hate about the German language...
5

Python:

  • You usually have the entry point of the program at the end of the file. (Because if it calls any function defined in the module, it has to occur after those functions in the sources.) I hate it when you have to spend time looking for the entry point of a program, so I always have a simple main.py file with:

    def main():
        ...
    
    if __name__ == '__main__':
        main()
    
  • When an exception is raised, it can only be catched by the main thread. Or something like that.

  • Destructors are quite useless, because when written in Python they may break garbage collection IIRC.

  • I've never figured out how relative imports work in Python 2.

  • I'd like to see more collections in the standard library. For example: linked lists, thread-safe collections, ...

Bastien Léonard
  • 60,478
  • 20
  • 78
  • 95
5

C++

  • The inconsistencies in the libraries related to char* and std::string. All C++ libs should take std::strings.

  • Characters are not bytes with respect to iostream. I do a lot of byte-oriented work. Having a "byte" type and a "character" type would significantly make it simpler. That, too, would permit scaling to Unicode somewhat easier.

  • Bit operations should be easy on a value. I should be able to access and set the n'th bit of a value without playing AND/OR dancing.

  • The lack of a standardized interface for GUIs. This is where Microsoft has really been able to position themselves well with C#. A standard interface binding that OS makers provide would go really far for my work.

Paul Nathan
  • 39,638
  • 28
  • 112
  • 212
5

Perl 5 In order from most annoying to least.

1.) Backwards compatibility police. Yes backcompat is a strength but Perl 5 takes it too far. Now we don't really even get new features in our language without having to enable them explicitly. I'm much prefer the inverse, if a new feature causes a problem let me disable it or enforce old behavior. e.g. perl 5.10 added say I'd rather have no feature 'say' if I have my own say implemented than have to put use feature 'say'; or use 5.010; also if 5.8 worked but 5.10 didn't. I'd rather have use 5.008; to restrict my code to only use features available up to and including 5.8 if no use version; was defined then it should be defaulted to whatever version you're running, and a recommended practice of not to restrict it unless you have to.

2.) Excessive Boilerplate.

#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use autodie;
use English '-no_match_vars';
use 5.010;
package Package::Name;

BEGIN {
    Package::Name::VERSION = 0.1;
}

sub somesub {
    my $self = shift;
    my ( $param1, $param2 ) = @_;
}
1;

now you may start coding. This won't change due to #1. of course there are shortcuts to this stuff like use common::sense; or use modern::perl; which will shorten the above and you may want some slightly different modules or pragma's. But because of #1 we'll never be able to reduce it to.

#!/usr/bin/perl
package Package::Name 0.01;

sub somesub ( $param1, $param2 ) {
}

some modules are helping with this, and there is the new package version in 5.0.12 which allows exactly that syntax though I think it requires use 5.012; first, and Method::Signatures but it'll never be completely resolved, (in language).

3.) Poor variable choices

slurp a file

#!/usr/bin/perl
use strict;
use warnings;
open my $fh, "< foo" or die $!;
local $/; # enable localized slurp mode
my $content = <$fh>;
close $fh;

wtf is $! and $/? rewrite to be legible.

#!/usr/bin/perl
use strict;
use warnings;
use English '-no_match_vars';
open my $fh, "< foo" or die $ERRNO;
local $INPUT_RECORD_SEPARATOR; # enable localized slurp mode
my $content = <$fh>;
close $fh;

and lest not forget that the '-no_match_vars' must be there if you don't want to take a performance hit.

How 'bout no direct way to create an anonymous scalar?

#!/usr/bin/perl
my $scalar_ref = \do{ my $anon_scalar };

couldn't they have come up with something?

#!/usr/bin/perl
my $scalar_ref = <>;

oh and how about how perl is thread unfriendly because all the variables (including special ones) are global by default. At least now you can use my $_; to lexical scope that and use local on the others.

4.) really ugly syntax

MooseX::Declare is a much nicer syntax. Also I wish for -> to be replaced with . (personal preference doesn't matter much)

5.) Too much TIMTOWTDI or Too many best practices Seems like you have to read 3-5 books just to figure out all of how you should be doing things.

6.) Previous (no longer applies). Un-sane releases. 5.10.0 had features 5.10.1 had features no set time 'till the next release. Now it's yearly feature releases with quarterly updates.

7.) Ivory Tower perspective. community problem, seems to be a large number of devs who want high barriers to entry and thinks it's ok to treat n00bs ( or really anyone who disagrees with them ) disrespectfully.

8.) Insane Version Numbers/Strings Perl has floating point version numbers and they're ugly. Oh and the dev's don't know that not all downstream deals with version comparison the same way. Not really a language problem

0.012 # simple
5.012001 # semantic 
4.101900 # time based + version (for multiple versions in a day)
0.035_002 # prerelease

all valid versions in perl.. can't we just use like...

0.12 # simple
5.12.1 # semantic
20100713 # time based (just use the date and be careful not to need to release more than 1 a day)
0.35-beta2 # prerelease

addition

9.) No obvious way to reinstall all XS modules after an upgrade

xenoterracide
  • 16,274
  • 24
  • 118
  • 243
  • The whole thing with the existence of match variables causing a performance hit always struck me as being an irritating misfeature, especially as it is a problem of Perl's own making. If only the language compiler could determine that a particular RE match wasn't captured and use the faster code automatically. (One basis for doing that would be identifying that the match vars are never used before the next RE is matched, which is amenable to compiler-level theorem proving.) – Donal Fellows Jul 16 '10 at 07:59
  • Perl 5.10 has the /p flag so you can use capture variables per match rather than globally. – brian d foy Aug 13 '10 at 11:10
  • The "explicitly enable"-thing is required to make updating versions a trivial thing. Nobody would update if all their scripts blew up everytime. – Thorbjørn Ravn Andersen Sep 08 '10 at 21:10
  • @Thor *sorry for shortening your name* I don't believe that, because I don't believe that most of these features have overlap in most programs. Even if they did I don't believe people would shirk at an upgrade if the fix was as simple as adding 'no feature 'feature'; to the top on the rare occasion that something did break. We punish people for using modern perl, and reward those who don't. Just my 2 cents. I'm really curious... have you ever seen the function 'say' anywhere? How many places do you think having that would break things? – xenoterracide Sep 09 '10 at 01:40
  • @Thor oh and things break every time I upgrade perl, due to the PITA of rebuilding XS modules. – xenoterracide Sep 09 '10 at 01:41
  • @xenoterracide, I don't do Perl anymore, but I know that if a release used in production breaks programs we don't install it without _extensive_ retestning in production. Which we don't want to, so it doesn't happen as fast. Don't you have mission critical code in production? – Thorbjørn Ravn Andersen Sep 09 '10 at 06:36
  • @Thor you don't do extensive testing before doing a release on a new version of your platform for *mission critical* code as is? ... Basically I just don't believe that we shouldn't be able to add new keywords to perl indefinitely... if they wanted to go through some inverse of deprecation. e.g. first release you have to use `use feature`, next release `use version`, and then after that it'd be just available. I'd be fine. – xenoterracide Sep 09 '10 at 20:11
  • @Thor also if you had *mission critical code* that you knew worked on `5.8` why wouldn't it be good enough to put `use 5.008;` at the top if that meant no features from future versions would work after that (unless explicitly imported). – xenoterracide Sep 09 '10 at 20:24
  • @xeno, plenty of options. I still maintain that if minor update breaks programs, it will result in less people updating. – Thorbjørn Ravn Andersen Sep 09 '10 at 22:19
  • @Thor from 5.10 to 5.12 is not a minor update. – xenoterracide Sep 10 '10 at 06:56
5

F#

  1. Type inference is limited.

    1. It propagates forward only.

    2. F# won't try to infer an object type based on the methods and properties used: you'll get "lookup of indeterminate object type" errors when it doesn't have a clue.

  2. One cannot mix floats and ints: 1 + 2.3 is a type error.

  3. It's a little awkward to have to create a builder object in order to define a monad or computation expression. In Haskell or Scala, you can define the monad operations directly on the monadic object.

  4. Though the #light syntax is preferred, the indentation rules are sometimes not very intuitive or become cumbersome.

namin
  • 37,139
  • 8
  • 58
  • 74
  • "1 + 2.3 is a type error" -- is F# derived from Fortran? – Windows programmer Dec 10 '08 at 03:44
  • 2
    No, F# is not derived from Fortran but from OCaml. Like F#, OCaml doesn't automatically convert from ints to floats. Unlike F#, the + operator is not overloaded in OCaml: it's + only for ints and +. for floats. – namin Dec 10 '08 at 04:56
  • In Fortran, even though the + operator was overloaded, it was + only for ints and + only for floats, no mixing allowed. (Vendor extensions often allowed it with automatic promotions.) – Windows programmer Dec 11 '08 at 00:46
  • 1
    Yes, F# is exactly like Fortran in this respect, then. – namin Dec 11 '08 at 11:37
5

Python

  • __init__
  • some libraries are awkward, like smtplib
  • 'self' has to be in the method declaration !!!
  • (for pre-3.0) somewhat poor unicode support
  • lack of inline try-catch
  • no direct reference to "this"/current module (instead have to use sys.modules[__name__])
hasen
  • 161,647
  • 65
  • 194
  • 231
  • I don't mind `self` in the method, there is no other way to distinguish a method from a function other than context otherwise. I suppose `met` could be made a keyword tho ... – Brendan Feb 07 '10 at 20:59
5

Python (3.1)

  • The weird out-of-order T if C else F syntax for conditional statements.
  • bytes literals look too much like str literals. We should have had something like x'414243' instead of b'ABC'.
  • str is UTF-16 on some platforms and UTF-32 on others. (Although at least it's an improvement over 2.x strings.)
  • Having the same operator for addition and concatenation. This hurts with types like numpy.array.
  • Runs slowly.
dan04
  • 87,747
  • 23
  • 163
  • 198
  • Re: #5, numpy also decided to use the np.concatenate() (16chars!) function to achieve concatenation, leads to stupid long lines in my scripts ... – Brendan Jan 08 '11 at 13:03
5

PHP

  1. No constructor overloading
  2. Inconsistent function naming (str_replace, but strtolower)
  3. define() does not replace the global variable literally like C++ does.
  4. When combining with XHTML, statements like the if-statement must start out with no indentation, even though the XHTML is indented if you want to keep the XHTML indentation consistent.

Ex:

You must type:

<?php
if($x == NULL)
{
?>
                     <p><?= $x . ' is null' ?></p>
<?php
}
?>
  1. Error catching is awful

(not sure why SO changed #5 to #1 again but whatever)

Logan Serman
  • 29,447
  • 27
  • 102
  • 141
  • 5
    Your example code is pretty shocking there... you break out of the PHP section to output some text, but then you break into PHP again to output a string. I'd suggest `

    =$x?> is null

    `. Also, you can do ` [HTML] ` which is a bit more readable.
    – DisgruntledGoat Jul 10 '09 at 12:48
  • Place a space after escaping out of PHP and the following new line will be honored as legitimate whitespace. So will the space, which is annoying, but it at least lets you keep sane indentation in your templates. – eyelidlessness Jul 23 '09 at 05:58
5

C:

  • Lack of distinction between function pointers (executable) and data pointers (you really don't want to execute this).
  • Extreme unreadability. Making code look like it does what it does is orders of magnitude more difficult than making it do the task in the first place.
  • Lack of clear support for lisp-think. Doing functional things is possible, barely, but it's not clear.
  • Serious inconsistency between libraries about how error codes are returned.
  • Antiquated string handling. The strings aren't strings, they're null-terminated blobs. This is all manner of wince-worthy.

Lisp:

  • () involves hitting the shift key. Every time I'm doing a lot of lisp, I swap it and [].
Kim Reece
  • 1,260
  • 9
  • 11
4

I can't believe it, my favorite Python pet peeves still haven't been mentioned:

  1. (Prior to 3.x) Relative imports look like absolute imports.

    import foo
    

    Does this import foo from the directory you're standing in or from the sys.path?

  2. Zipped eggs, leading to a sys.path full of shite. Zipped eggs means you can't use grep and find (to among other things debug problem 1)! Fortunately, there's pip. Use pip.
  3. Some of the included batteries are unpythonic. It grates to use them.
  4. Might be the fault of distro's and packagers, but still: sourcefile-encoding set to fscking ASCII on install/compile. WTF? Means I have to put the "# coding: UTF-8"-stuff in every single .py I ever make.

Py3k fixes several of my other pet peeves, by for instance insisting that strings are unicode and that 8-bit-stuff are treated differently...

kaleissin
  • 1,245
  • 13
  • 19
  • Source encoding used to default to `latin-1`, then to `ascii` after Python 2.3 or 2.4, and now to `UTF-8` in Python 3! – u0b34a0f6ae May 26 '10 at 08:27
4

C++:

1: Header files.

Linking your code is harder than compiling it. Also, the requirement of templates to have the full source in that translation unit is absurd. It's over in that other file there .. the one you compiled two seconds ago. Go look there. Stupid compiler.

2: Empty standard libraries.

I mean, yes, there's std::thread in C++0x, but no std::socket or anything of the sort. The primary reason there's no cross-platform code is because you have to learn a new library for every function that you want to perform on more than one platform. Without OS headers or OS functions provided as standard, C++ is only good for pushing bits around.

3: No multiple returns or return value overloads

double x, int y, char z = func(); is just as valid as void func(double x, int y, char z);. Please. The only reason ever given for no return value overloading is because we "might" write ambiguous code. Might! Please, give me grief when I actually write ambiguous code, not before.

4: No reflection

It's ok to make reflection compile-time. It really is. Not having any makes writing a lot of libraries difficult, at best, and seriously annoys me. I could abuse the preprocessor but..

5: Duck typing on templates

Yaargh. Please, concepts and proper template error messages. It's practically impossible to use a library like Boost, just because if you get it wrong, you're shooting in the dark.

Community
  • 1
  • 1
Puppy
  • 144,682
  • 38
  • 256
  • 465
4

Python

  • Errors/Exceptions are vague when debugging
  • I don't use it at work
  • using __init__, __repr__, __str__, etc in classes
  • Can't simply compile an executable (.exe or otherwise)
  • Some other thing that I haven't tried doing yet, but I'm sure will bug me

And to all those C-ish language programmers, self makes more sense to me than this, because the object is referring to its self

dragonjujo
  • 358
  • 1
  • 2
  • 10
  • 1
    You should look at py2exe — http://py2exe.org/ — it allows you to make an executable file with all the required dependencies. – Paul Fisher Nov 23 '08 at 17:51
  • py2exe still requires the manipulation of a half-dozen dll's and such. The bottom line is no matter what, there's an installer. This makes python a real hard sell for me for desktop stuff. (still using tcl/tk for this, with starkits) – SingleNegationElimination Feb 23 '09 at 05:03
  • 1
    Why do you want an exe-file ? Java and C# require an installation of runtime files aswell...and noone complains about this. The real problem is that few people have python installed on their machine – smerlin Mar 22 '10 at 19:35
4

Lua:

  • Metatables are sooo confusing until they "click"
  • Lack of assignment operators like a += 20 is a pain
  • No integrated object oriented solution means everyone and his dog uses his own flavor
  • The syntax used for commenting (--) precludes the possibility of pre- and post- increment/decrement operators
  • Not possible to have any sort of pre-emptive multitasking system without hacking the C side
RCIX
  • 38,647
  • 50
  • 150
  • 207
4

Python:

  • Slow for number crunching. This wouldn't be much of a problem except it...
  • Doesn't come with an easy way to include C code with your program that automatically gets compiled when imported.
  • We still have to live with stupid integer division rules until py3k takes over.
  • We still have to live with goodies like imap and izip being in a separate module until py3k takes over.
  • We have to do a lot of work before py3k can take over.
Theran
  • 3,776
  • 20
  • 31
4

Emacs Lisp

  • There is not enough of a commercial market to be coding in elisp full time
  • GNU Emacs vs XEmacs incompatibilities
  • Nested functions in Scheme are neat, I wish elisp had the concept [1]
  • The do loop or some other facility for simply looping over a list is not standard (granted, you can now mapc with a lambda) [1]
  • There should be a shorthand for (function (lambda (...))) [1]

[1] Of course, one of the beautiful things about Lisp is that it's not hard to fix these things in your own code with a one-liner. Still it irks me that it's not built in.

Good question; I'm a bit embarrassed that I couldn't come up with better things to hate, but honestly, your honor, there is not much to hate.

4

Self

  • No real code browser, instead hundreds of small windows flying around.
  • Only a research project, not stable enough, no active community.
  • No decently fast version for Linux or Windows. Only Mac OS X.
  • No support of standard keyboard commands.
  • Oh! And the documentation on writing native plugins is so outdated!
nes1983
  • 15,209
  • 4
  • 44
  • 64
  • self? as in .. yourself? or what? – hasen Jul 22 '09 at 22:02
  • Well, Self is a generalized Smalltalk, which is a programming language. It's called Self after the keyword. See http://research.sun.com/self/language.html – nes1983 Jul 22 '09 at 22:28
  • 1
    Woot, you are into self? I am a huge fanboy of self. Unifications of methods and class (to say so), never seen that elsewhere, except BETA. – akuhn Jul 23 '09 at 20:13
4

C# (well, part of it is the VisualStudio IDE, I guess):

  • No covariance (yet), like Class<D> cannot be used in place of Class<B> even though type D derives from type B.
  • Graphic designers don't support generic based inheritance (or inheritance from abstract classes), even though the inheritance itself works just fine if you work around the designer problems by adding extra inheritance levels just so designers always see concrete non-generic variants of your code.
  • No constructor inheritance
  • No constructors in where clauses of generic type parameters
  • VisualStudio seems to have a tendency to mysteriously check out files (like project files and/or unit test definitions) when opening a solution, even though the files do not seem to actually get altered.

Could be different list if you ask me again tomorrow. Even though the covariance and designer trouble will be in my top 5 until they are solved (with variance added to C# 4.0, this seems to have happened for at least one of them...).

peSHIr
  • 6,279
  • 1
  • 34
  • 46
4

Oracle SQL

  1. The DUAL table.

  2. Can't GROUP BY an alias.

  3. I can never remember the syntax for analytic functions and so I forget/am too lazy to use them.

  4. Lack of combined LIKE and IN conditional operator. (After 10g there's a REGEX_LIKE operator that could do the trick, though.)

  5. Awkward concatenation syntax.

SQL isn't really my favorite language, but it's one of the top three I use everyday. There are probably more items, but these are the ones at the top of my mind.

I have a whole slew of problems with SQL*PLUS. I wrote a Perl replacement that does what I'd like from the command line and I use sql.el in Emacs for interactive SQL sessions. These tools help me work around my SQL*PLUS issues.


Speaking of which:

Perl

  1. "Only perl can parse Perl." (But this is mostly an issue in syntax highlighting, which I don't prefer to use much anymore for any language.)

  2. I'm sometimes surprised by "the simple (but occasionally surprising) rule...: It looks like a function, therefore it is function, and precedence doesn't matter." (From perlfunc(1))

  3. Dereferencing complex data structures can be confusing at times. I can't decide if this is a true flaw in Perl or just a consequence of having really powerful data structure facilities. Either way, I can normally get it right by taking a few minutes to think about what I'm doing.

  4. No option to cause system calls to raise their errors like the DBI module. (Thanks to brian d foy, I now know the autodie module on CPAN does this, but I'd like it built-in.)

  5. Warnings and strictures not enabled by default in scripts. (The -e option would turn them off for command line use.)

Again, there are bound to be more things, but these are issues I've noticed recently. I'd add the need for =over and =back and the quirky L<...> syntax in POD, but maybe that ought to be a separate list.


Now for the trifecta:

KornShell

  1. Sourcing a file with arguments replaces the values of the parent script's arguments. (Executing . file arg1 puts arg1 in $1.)

  2. ksh is not an ideal interactive shell and defaults to vi key-bindings, rather than emacs. (My solution is to use bash for interactive shells.)

  3. Common utilities (such as grep) are implemented differently across different platforms thereby preventing perfect portability. Some useful commands need to be installed on some platforms and are part of the OS core on others.

  4. The syntax for conditionals is overly heavy. (if [ ... ]; then ... fi)

  5. Although it is Turing Complete, you are eventually going to want to move up to a more expressive language like Perl.

One solution for #4 is to get used to short circuit evaluation:

[ ... ] && ...
Jon 'links in bio' Ericson
  • 20,880
  • 12
  • 98
  • 148
4

D

  • we have in operator, but no !in operator?
  • dynamic array 'length' property - ya canna do

    array.length += 512;

  • no exit statement - as in python's sys.exit(), etc. Sure, you can call C's exit, but unflushed output don't get flushed
  • associative array literals + string literals suck

    string literals found as is inside an associative array literal are interpreted as static, thus this

    char[][char[]] hash = ["hello":"world","goodbye":"angels"];

    doesn't work without some extra casting due to different length string literals despite
    a. I didn't ask it to be interpreted as static arrays
    b. static arrays aren't allowed in associative arrays anyways

  • cyclic dependencies disallowed (want to port that java lib? Have fun redesigning the class hierarchy)

Someone check me on these; not sure if they are all still relevant.

Ellery Newcomer
  • 1,594
  • 1
  • 11
  • 23
4

Java

  1. checked exceptions
  2. type erasure
  3. missing operator overloading (e.g. for BigInteger/BigDecimal)
  4. missing regexp/date/durations/complex literals
  5. poor support for immutability
dfa
  • 114,442
  • 31
  • 189
  • 228
4

First post, so take it easy on me :) ... Awesome community site, btw!

I tried reading all other C# replies just so mine doesn't overlap

C# ... In no particular order:

1) No fallthrough for cases in switch statements. And if there is no fallthrough ... why does one have to explicitly type break; anyway? It's just retarded and confusing since it implies the ability to not have the break;!!!

2) Can't declare a variable with the same name in a child scope, but you can declare a variable by the same name as a class variable? Either allow both or disallow both. Otherwise, it doesn't make sense.

3) No optional/default parameters in functions

4) Exceptions in finally{} should be implicitly caught for every line. Or at least, just the NullReferenceException exception. For instance, after accessing a db, one should always clean up. So, the finally block should look something like this:

finally
{
  if(par1 != null)
    par1.Dispose();
  if(comm != null)
    comm.Dispose();
  if(conn != null)
    conn.Dispose();
}

It would be so much cleaner if it could be written as:

finally
{
    par1.Dispose();
    comm.Dispose();
    conn.Dispose();
}

But, no ... you have to check if you are accessing a null object, otherwise it may throw a NullReferenceException from the finally block .. and who really needs exceptions in the finally block anyway?

5) Generics: you can specify new() to be able to instantiate your generic objects, but that object needs to have a default constructor. Why can't you specify a signature instead so one doesn't need to create empty constructors if it doesn't already have them and just use the constructors it does have.

Rado
  • 8,634
  • 7
  • 31
  • 44
4

Haskell.

  1. The Prelude is imported by default.
  2. The scope of type classes is universal.
  3. Modules are not first-class.
  4. Types cannot depend on values.
  5. Monad does not unify with Functor.
Apocalisp
  • 34,834
  • 8
  • 106
  • 155
3

Objective-C / Cocoa / Cocoa Touch:

  • Lack of namespaces
  • Difficulty using primitive values with any of the interesting and powerful techniques of Cocoa, e.g., distributed objects, notifications, KVO
  • Inconsistency with the use of the shortcut dot syntax for accessing properties, often having to use the full length accessors
  • No GC on the iPhone, and generally GC came rather late to an otherwise highly dynamic language
  • Inconsistent library support, at least in Cocoa Touch; some very basic things have only recently gotten high level support, e.g., audio handling.
  • Lack of blocks!
Alice Isabelle
  • 618
  • 3
  • 11
3

Haskell (with all GHC extensions, not just the base Haskell'98 spec).

There's exactly one thing that I hate about it: it's not mainstream.

Pavel Minaev
  • 99,783
  • 25
  • 219
  • 289
3

My favourite is really C#, but there are already a ton of answers for C#, so I'll go with my next "favourite":

T-SQL

  1. The GO statement, and the fact that you need it for all manner of DDL/DML scripting, and the fact that it also breaks transaction semantics, making it far more difficult than it needs to be to write an atomic script, which you really need to have in order to upgrade a production database.
  2. Inconsistent semicolon semantics. 99% of the syntax doesn't need it, MERGE statement has to end with it, WITH statement has to begin with it... make up your mind!
  3. WITH CHECK CHECK / WITH NOCHECK CHECK. Uuuu-gly.
  4. Optional parameters in UDFs aren't really optional. Caller must specify DEFAULT (and don't even try using NULL instead). Compare to SPs where they are truly optional.
  5. "...may cause cycles or multiple cascade paths." HATE HATE HATE HATE HATE HATE HATE HATE HATE HATE HATE
Aaronaught
  • 120,909
  • 25
  • 266
  • 342
3

TCL

This is my absolute favourite language for doing almost everything. Over the years it has evolved (slowly, very slowly) to address most of the things that annoy me. And the language is so flexible it's easy to implement syntax sugar to cover things that still annoy me. But there are things about the language that can't easily be changed just breaks its Zen:

  • Arrays (of the associative kind, what Perl calls hash) don't have proper value semantics. This makes them awkward to pass to and return from functions. Also, this means that they can't be nested. For this reason dicts (dictionaries) were invented but too late, the nice array access syntax:

    $array($foo)

    is now forever taken by stupid arrays for backwards compatibility. We're now stuck with:

    dict get $dict $foo

    which is much more verbose and to me feels less readable.

  • No real closures. Though it can be emulated somewhat by globals or namespaces but that defeats the reason for closures in the first place. Although, I can't really see for now how closures can be implemented in a pure value semantics system.

  • Teacup is hard to use and is not at all intuitive compared to all other repository tool out there. This is more ActiveState's fault than tcl-core and doesn't really break tcl's Zen when coding but it is still very annoying.

slebetman
  • 109,858
  • 19
  • 140
  • 171
  • I agree on the first two points. I've got some plans for where to evolve arrays that give them more purpose, I've seen some ideas for syntax for dicts (though I'm not sure that I agree with all of them) and I would like closures and have ideas there (the main problems are how to do introspection and how to pass them through lambda values given our strict value requirements). And I also really want both true GC and UDP support. (Teacup is Someone Else's Problem.) – Donal Fellows May 04 '10 at 09:08
3

C++

(Except for lambda functions, I've avoided things that will be available in Cpp0X)

  • Doesn't force the use of "this" to access member variables, ::GlobalFunction to access the global namespace.
  • Everything in (to be more specific, the lack of lambda functions in algorithms, will be fixed in 0x thou)
  • Taking care of dependencies/header and source files
  • Stupid names on basic data types (should be named uint8, int16 etc)
  • The const_cast functionality
Viktor Sehr
  • 12,825
  • 5
  • 58
  • 90
3

C/C++

  1. Lack of integral SWAP functionality
  2. Template Syntax
  3. You can not #define a #define (no multi-pass)
  4. Structure packing incompatibilities between compilers
  5. char is signed or unsigned ?

Java

  1. Immutability on the edge
  2. No ref keyword like C#
  3. try/catch blocks everywhere
  4. Poor runtime performance
  5. All string related stuff

Python

  1. No "main" (I'm used to it !)
  2. underscored keywords
  3. Limited thread support
  4. "self" instead of "this"
  5. Lack of C/C++ like syntax
Malkocoglu
  • 2,522
  • 2
  • 26
  • 32
  • 4
    I noted this in an earlier post, but in Python, "self" isn't a keyword, so you can call it "this" if you want; you can have a method like: def my_method(this, whatever): this.whatever = whatever. Of course, coming from an ObjC background, I think "self" is nicer than "this" anyway. :) – mipadi Nov 13 '08 at 14:26
  • I am not very fluent in Python yet, so thank you for clarification... – Malkocoglu Nov 14 '08 at 08:22
  • 4
    Python: `def main(): ...` solves the 1st point. – jfs Nov 26 '08 at 19:22
  • 3
    ... the idiom i've seen in python is "if __name__ == '__main__':\n #your code here" to represent 'main'. it seems to work well enough, and is ugly enough to be found by code search :) – Aaron Apr 15 '09 at 03:23
  • 1
    If I understand your comments correctly you really should learn a LISP-family language. Take a look at Scheme (the easiest to learn) or Clojure (the most "modern".) – finnw Jun 12 '09 at 23:46
  • C++ has integral swap. `int a, b; std::swap(a, b);`. – Billy ONeal May 26 '10 at 02:22
  • @Billy: Well; it generally requires the use of stack, because it uses a temp variable to do the swap. Bu in fact; in ASM, you can do a swap without using a temp variable regardless of the size of your variables. When I wrote integral, i actually meant "as a function of the language/compiler" – Malkocoglu May 28 '10 at 07:28
  • @Malkocoglu: Most any compiler is going to be smart enough to do that when it's available in hardware, if it would benefit performance. On modern hardware I'd be willing to bet the swap instruction gets translated into the same thing as effectively what `std::swap` does, and therefore isn't much (if any) of an optimization. – Billy ONeal May 28 '10 at 12:53
  • @Billy: I have not come accross a compiler that does what you say when the type is not a POD but somewhat big struct. For small datatypes & structs; you are right, it does not use the stack. But for big structs, they always use the copy to/from stack code as I examined their ASM output. – Malkocoglu May 31 '10 at 07:43
3

Erlang

  • doesn't have static inferred typing like one found in Haskell. This can lead to runtime errors and one have write code carefully or use dialyzer(1) to discover discrepancies. Dynamic typing is also considered to be slow;
  • is almost unknown compared to C, Java etc.;
  • 's lists(3) module is pretty lean, sometimes I lack useful functions for list processing (like ones in Data.List in Haskell for example);
  • makes me put , at the end of an every statement within clause, and . in the end of the latter.
YasirA
  • 9,531
  • 2
  • 40
  • 61
3

Erlang is absent from this list. Among my favorite languages, but a few flaws for sure:

  • Syntax. This includes the 3 terminating tokens (,;.) and aesthetics, but more generally on how the semantic meaning of the code is expressed in text. An example is on how all lowercase tokens are atoms, so to refer to a function you can't just name it, you have to fun my_function/1, and ?PRECEDE_CONSTANTS_WITH_QUESTION_MARKS. Coming from Scheme, Haskell, etc. you just wish you could use a name.

  • Library support is lame. This is mostly external libraries, but even the old standard library. Newer versions of Erlang have sensible POSIX regexes, but the old one had a pretty horrible library for basic string manipulation. You also never know when you're getting the value, or {ok, Value}.

  • Related: non-uniform tools for building and distribution. Ruby has gem and rake, RSpec. Perl has CPAN. I'm unaware of decent equivalents in Erlang.

  • The few Erlang specific tools are pretty strange. Mnesia is a great database, but coming from SQL you have lots of trivialities to learn. Same with the documentation @spec, which has a strange way of describing signatures.

  • Often the functional paradigm hurts when you just want that little bit of mutation. Supposing you want a Hash Table, you can't just hack it as in Scheme, or SML. ets and dets alleviate some of the pain, but not much.

Sixth, bonus:

  • Import and export syntax for modules is a pile of fail, not unlike Java's 80+ lines of import statements.

All that being said, Erlang is a joy ^_^

pablo.meier
  • 2,339
  • 4
  • 21
  • 29
3

R

Not my favorite language, but I use it a lot and there is plenty to complain about...

  • S3 objects are just glorified lists and S4 classes still keep all data exposed to user
  • The assignment operator can be <- -> or =, see Mike Dewar's rant
  • my.var is a very confusing variable naming convention for an OO language, see Google's style guide
  • I should not have to regret using a loop
  • Cryptic error messages
DrewConway
  • 5,407
  • 7
  • 35
  • 32
  • I think the looping thing is a community issue more than a language issue... related: apply() has the be the most opaque and frustrating language construct I have used. – JD Long May 25 '10 at 21:36
  • As you say, the `.` character in a variable name is not special and is completely ignored by the parser. Except that it's critically important to S3 method dispatch! Who thought that was a good idea? – Harlan May 25 '10 at 21:37
  • JD, sorry, that is what I meant (it being a community thing). I love apply, but sometimes I just want a loop, and don't want to feel dirty doing it. Harlan, see, there you go talking about something I had no idea about. – DrewConway May 25 '10 at 21:39
  • Some base library functions have strange interfaces that make sense if you're working interactively, but cause nasty bugs if you're writing longer code. Worst example: `sample(10:12, 3)` gives three numbers between 10 and 12; `sample(10:10, 3)` gives three numbers less than or equal to 10! Who thought that was a good idea? (And no, the fact that the behavior is documented is no excuse!) – Harlan May 25 '10 at 21:42
3

Scala is my favourite language. Five things to hate? Easy:

  1. Takes a long time to learn properly. I know you can write Scala as a 'better java'. That is what we used to say about C++ and C too. I agree this is an inevitable consequence of the deep ideas in the language. But still ...

  2. Methods vs. Functions: def f(x: Int) = x*x defines a method f, not a function f. Methods are not functions despite a lot of early Scala tutorial material blurring the distinction. The language tries to blur it too because if you supply a method in some places where a function is expected it is accepted. Do we have to have both methods and functions? Yes it is fundamental. But it was initially confusing to me.

  3. Composing classes or objects from mixins in the 'cake' pattern is prone to NPE's. e.g. trait X { val host: String; val url = "http://" + host } is a mixin that will NPE on instantiation, or not, depending on its position in the class declaration. The compiler could tell you if it will fail but doesn't. (In 2.7 anyway.) It is hard to diagnose the problem in complex inheritance graphs.

  4. Arrays in 2.8 rely on implicits to mesh with the main scala collection types. But implicits are not applied everywhere. An Array can be supplied where a Seq is expected. But an Option[Array] cannot be supplied where an Option[Seq] is expected. I know there are no completely 'right' ways to handle java Arrays.

  5. Type erasure. Enough said.

Arnold deVos
  • 81
  • 1
  • 3
3

C#.

What I hate most:

  1. No multiple inheritance - imagine you could provide whatever GUI framework base class (Control, Window, whatever) with MVC - related stuff, etc... framework / base class agnostic!

  2. No "friend" keyword... I know, the RAD - victims would abuse it for all kinds of stinky code and for hilarious malpractices, but it would be nice for the OOD - guys to enforce the law of demeter

  3. No language integrated DBC features, there are the Contracts, but I would rather have that Spec# - style with a general purpose "!" - postfix operator

  4. No AOP (I don't get it... this language has attributes, it would have been SO EASY to add interception code in the compiler!)

  5. No weak event delegates - the observer pattern becomes nothing but a memory leak bait as it is now... :-(

  • 1: if you need multiple inheritance, consider interfaces (there's sooooo much that is confusing with multiple inheritance); 4: you can get a very nice AOP library – RCIX Jun 02 '10 at 04:38
  • 4: Just got into AOP, and C# would be an awesome language for this! I really wish they would add something in soon for this. 5: Totally agree. I've been slowly converting everything to RX and IObservable, which seems more comfortable. – drharris Jun 02 '10 at 06:41
  • @RCIX I KNOW about interfaces, but this is not the point. For many tasks you don't only need the interface but also the behaviour to be able to code things in an understandable way. Of course one can use the strategy - pattern (for example) to implement MVC, but the better way would have been to be able to add, say, the full data context handling to a System.Windows.Forms.Form by adding a generic base class - oh, and I use PostSharp.NET. It's amazing. @drharris I totally agree. It's not understandable to me why they didn't expand attributes to interception. That would perfectly solve it. – stormianrootsolver Jun 02 '10 at 09:43
  • Ah, but that's a rare case compared to the number of times that yo don't need it, and it brings in all sorts of crazy problems -- for instance, if you have class C which inherits from A & B, and both have a Foo method defined, what (non arbitrary) setup do you use for determining which Foo gets called? – RCIX Jun 03 '10 at 07:48
  • If you ask me, the compiler should fail with an error if one tries to inherit from two classes with colliding member names. I do, however, believe that this should rarely by the case, given well educated developers who know how to separate concerns and observe the law of demeter. People who only write code to earn a living (Morts, approximately 90% of developers around) will always give us hell, multiple inheritance or not. I guess the best way to solve that would be to only allow Elvis and Einstein types to work on software. – stormianrootsolver Jun 07 '10 at 11:44
3

Five things I hate about all languges (that I know of at least):

  1. Does what I say/type, not what I mean
  2. Will undoubtedly meet people who think they are experts in the language, but just make a mess of it (e.g. people who insist that removing comments/unused local variables will speed up execution time for a program)
  3. Unless the language is obsolete, then it will probably continue to evolve (either the actual language, or the concepts behind using it effectively) requiring you to actively develop with it so as to not fall behind.
  4. Can't modify the lexer/compiler (add in own context sensitive grammar)
  5. No perfect language (every language is missing some sort of useful feature that usually is either impossible to simulate, will unavoidable have an ugly interface or just require far too much time to implement and get it right)
Grant Peters
  • 7,691
  • 3
  • 45
  • 57
  • Lisp has do-what-I-mean flags. – mpez0 May 26 '10 at 16:57
  • So lisp can figure out that I meant to initialize a variable to 1, but out of habit I wrote 0? (recently did this and made a very hard to track bug, was involving networking so it could work depending on packet losses/ordering) – Grant Peters May 26 '10 at 17:05
3

Another vote for C++ here... still my favorite with a few close followers - C and Python. Here's my current hate list in no particular order:

  • Plethora of integer types inherited from C - way too many problems caused by signed vs. unsigned mistakes
  • Copy constructors and assignment operators - why can't the compiler create one from the other automatically?
  • Variable argument madness - va_list just doesn't work with objects and I'm so sick of problems created with sprintf(), snprintf(), vsnprintf(), and all of their relatives.
  • Template implementation is required to be fully visible at compile time - I'm thinking of the lack of "export" implementations or at least usable ones
  • Lack of support for properties - I want to have a read-only member like "a.x" that can be read publicly and only assigned internally. I really hate the "val=obj.getX()" and "obj.setX(val)". I really want properties with access control and a consistent syntax.
D.Shawley
  • 58,213
  • 10
  • 98
  • 113
3

Perl 5:

  1. All the really good stuff nowadays seems to require mod_perl, which has low availability everywhere I want to go.
  2. Some really incredible functionality can be encapsulated in modules, but what is under the hood is often fragile or frightening: source filters, typeglobs, whatever Moose is doing...
  3. DateTime is brilliant but still made some very bad design decisions (not returning a stopwatch duration when subtracting two DateTime objects)
  4. Dual-lifed modules in core and on CPAN still cause conflicts
  5. module authors still put interactive stuff in their module configuration scripts so that they can't be automatically installed
skiphoppy
  • 97,646
  • 72
  • 174
  • 218
  • 1
    None of that has anything to do with the actual language of Perl :) – brian d foy Dec 27 '08 at 12:19
  • Yeah ... Perl's a pretty good language ... :) I'll think and see if I can come up with some more language-specific answers. – skiphoppy Dec 31 '08 at 14:47
  • Okay, here's a real one: even when I do a test compile with perl -c, perl still can't tell me that it's going to blow up on an undefined subroutine. That really sucks. – skiphoppy Jun 04 '09 at 22:28
  • Why would you want -c to tell you that? Perl's a dynamic language. That means perl can't know everything you are going to do at runtime. That's the point. :) – brian d foy Nov 12 '09 at 12:35
3

.NET framework (the libraries)

  • Nested types rarely used (e.g. MessageBoxButton should be MessageBox.Button)
  • Mutable structs (Rect, Point)
  • Too much stuff in System namespace
  • Too many different notions of equality (Object.Equals, Object.ReferenceEquals, operator ==, operator !=, IComparable.CompareTo() == 0)
  • Arrays have mutable members but immutable length.

And one more:

  • XmlSerialization doesn't work with immutable types
Jay Bazuzi
  • 45,157
  • 15
  • 111
  • 168
  • As far as equality goes, it could be worse. There is no === operator in C# like some other languages, and Object.ReferenceEquals exists because == can be overridden (it's also nice for null handling). – Matt H May 11 '10 at 04:46
  • One more from me: Everything I want to fix is sealed. HttpContext and System.CodeDom being sealed both drive me absolutely crazy, for two completely different use cases. – Jacob Krall May 26 '10 at 07:15
3

C#

Most of my gripes have to do with assuming C++ conventions were automatically the best choice for C#

  • No statics allowed in Class interfaces. It's still part of the class. Why can't it be part of the interface?! I've had to create such stupid hack-y work-arounds for this.
  • Case sensitivity. I know it would ruin legacy apps at this point but why wasn't case-insensitivity not the rule from the beginning

Bonus one for .NET (not C# specific)

  • Compiler not smart enough. In .NET 3.x, the compiler can figure out "var" at compile time so why not other common optimizations? We all know the string vs. StringBuilder / immutable vs. mutable thing. Why doesn't the compiler convert it for you when in many cases it's obvious that StringBuilder is better than multiple concat.s? i'm sure there are tons of other optimizations that the compiler could do for us by default (with option to overrule) and save us tons of time.
Dinah
  • 52,922
  • 30
  • 133
  • 149
  • Hmmm, a more intelligent compiler would be nice, however i do find the vb.net (background) compiler slightly better than the c# one. I think both language dev teams need to talk to each other more :p – Pondidum May 28 '09 at 09:19
  • @Andy: I couldn't agree more. It seems to be that they are 2 brilliant teams with different strengths. Combine them and imagine the results! – Dinah May 28 '09 at 13:37
  • 2
    var is not an optimization. String vs. StringBuilder will depend, an it will almost never matter in practice. – erikkallen Nov 11 '09 at 11:21
3

C#

  1. The foreach command bombing out when an object in the collection being enumerated changes,
  2. UI controls spitting the dummy because they were accessed on the wrong thread. Surely all the dispatcher.invoke calls can be moved into the CLR plumbing,
  3. PInvoke, marshalling etc.,
  4. The wasted two years I spent learning remoting,
  5. It's not as sexy as Ruby.
sipsorcery
  • 30,273
  • 24
  • 104
  • 155
  • +1 - Totally agree with Point 2. It is a real pain and they havent fixed it in WPF (which uses even more threading) I feel your pain with remoting as well :) – Russell Sep 11 '09 at 07:40
2

C++ lack of good refactoring tools, lack of checked exceptions

Java lack of templates, lack of const keyword

quant_dev
  • 6,181
  • 1
  • 34
  • 57
  • You don't have `const` keyword in Java, but you can acomplish the same just declaring a method, a variable, or even a Class! using `final` keyword – Lucas Gabriel Sánchez Sep 10 '09 at 04:24
  • 1
    Not true. "final" for methods and classes has different meaning than "final" for variables. For variables, "final" is not the same as "const" in C++, see http://stackoverflow.com/questions/502430/passing-const-variable-to-method-in-java/502467#502467 There is simply no "const correctness" in Java, you can declare an array as "final" and modify its contents. – quant_dev Sep 10 '09 at 06:52
2

PHP

  • Almost every standard function is in the global scope
  • Inconsistent function argument order
  • Inconsistent function naming
  • Case insensitive functions
  • Script may behave differently depending on the php.ini file
  • Being able to use undefined variables
  • In some cases having to assign a result to a variable before it can be used in a function

And far more subjectively:

  • Dynamic Typing
Yacoby
  • 54,544
  • 15
  • 116
  • 120
  • The purpose of config files is to change the behavior. Why is that a problem? And can you give more details about the "Terrible error catching" please? – selfawaresoup May 23 '10 at 11:53
  • @Tech Regarding the config files, I meant the php.ini file. Things like magic quotes make it harder to write code that works everywhere. I can't remember what I meant when I said "Terrible error catching" (Hence I have removed it from the answer) – Yacoby May 23 '10 at 12:01
2

Common Lisp

  • Lack of standard libraries for more modern features (sockets, threads, ...)
  • Could use a standardized UI that maps to the native windowing system
  • Scheme's ability to assign a lambda expression to a variable and use the variable directly as a function call looks neater that APPLY for FUNCALL. Side effect of having multiple name spaces, I guess
  • Standardized source-level packaging system for libraries so that they could be easily used from multiple implementations

I wonder what a strongly-typed lisp would be like

  • 1
    I assume by "strongly-typed" you mean strongly *statically* typed (most Lisps avoid implicit coercion and such). It would probably look a lot like PLT's typed Scheme. – Zak May 23 '10 at 12:53
  • yes, sorry about that! i had been looking into haskell, and really liked it's type system (well, whatever i understood so far). i'll take a look at typed scheme, thanks for the tip – Gautham Ganapathy May 25 '10 at 13:35
  • 1
    > I wonder what a strongly-typed lisp would be like You mean like Qi? –  May 26 '10 at 07:06
2

C#

  • Lack of multiple dispatch based on the runtime type of the method arguments. dynamic should solve most of this, but it hasn't been released yet.
  • Interface implementation is declarative not structural. I really like the way Google's Go language is doing types
  • Making asynchronous method calls is really bulky (and I'm pretty sure all threads are OS threads, not lightweight threads)
  • No macro system. I'm not talking about C-style macros here; I'm talking LISP/Scheme style macros
  • Operators are static methods and their signatures are overly constrained (and you can't create new ones).
  • Robert Davis
    • 2,255
    • 2
    • 21
    • 21
    2

    I use Java, and my biggest beef is the inefficiency of string operations. when you use the + operator. Seriously, can't the compiler figure out how many strings I'm adding and then generate the StringBuffer stuff in the background for me?

    Often code that uses + is more readable than a sequence of StringBuffers operations.

    Also, I hate the redundancy between native arrays and the collection framework. The syntax for .toArray() is extremely ugly.

    Uri
    • 88,451
    • 51
    • 221
    • 321
    • If you use "+" for String concatenation within a single statement, it is converted to StringBuilder.append() by the compiler. However, this doesn't happen across multiple statements. – Dónal Nov 11 '08 at 22:38
    • I was referring to the multiple statement situation. I would like to be able to write a series of concatenations of variables and constant string literals, and have the compiler figure out which literals to combine at compile time and which ones to then automatically add the stringbuffer stuff for. – Uri Nov 11 '08 at 23:25
    • I only see one thing, the question asked for five. – Brad Gilbert Nov 12 '08 at 04:42
    • Actually, there were two.... My other beefs were already mentioned by others, so this is the delta :) – Uri Nov 13 '08 at 02:15
    • 1
      You should probably use StringBuilder rather than StringBuffer, if you don't have multiple threads accessing it. It's faster. – rlovtang Feb 07 '10 at 22:13
    • 1
      I really don't like this kind of micro optimization. Most of the time, the compiler is clever enough to use StringBuilder, and when it's not I usually don't mind the extra microsecond anyway. I prefer readability, and optimize when there is need for it. – rlovtang Feb 07 '10 at 22:25
    2

    Objective Caml

    1. Lack of namespace facilicty.
    2. Wordy class and object nortation.
    3. Complex build system.
    4. Inconvenient to make infix.
    2

    C#

    • Reference types are nullable by default; in-language null keyword is untyped.
    • Lack of discriminated unions
    • Exceptions as default, non-exceptional error handling method - there's not much of an alternative.
    • archaic switch statement syntax and limitations
    • Needless distinction between constructors + static methods
    • Static methods can't be part of an interface
    • Lack of by-shape interface implementation rather than explicit interface implementation - leading to numerous language design hacks such as the linq query syntax, foreach, collection & object initializers -- none of which can be flexibly reused. For example, the object initializer syntax may be nice, but plays poorly with immutable objects.
    • Cannot inherit "interface" of a class independently of implementation - leading to code duplications and overarchitected code that provides interfaces, abstract base classes, a few common implementations, and no way to pick and choose the bits of each to use. Also; leads to too many code that's tightly coupled to a particular implementation since it's common to explicitly refer to the implementation type rather than an interface.
    • Cannot multiply inherit via composition since a classes "interface" is tightly coupled to it's implementation; effectively lack of mixins.
    • The above limitations of interfaces lead to a proliferation of virtually identical interfaces that don't overlap naturally in any kind of type hierarchy. IComparable vs. IEquatable vs. IComparable<T> vs object.Equals vs. operator == etc. etc. By extension, making a custom type that satisfies all these things is a lot more work than necessary (in particular for collection classes). Obviously, the language designers realize this, hence the various workarounds for things like linq, foreach and collection initializers which work by-shape rather than by-interface.
    • Redundant use of parentheses and braces rather than layout-is-structure.
    • Return values can be ignored, limiting the effectiveness of type inference.
    • Enums aren't a normal type and can't have methods. Also, enum values aren't typesafe and may be initialized to 0 despite not having a 0 value. Mixing metaphors by lumping flag and non-flag enums together.
    • Lack of proper value type support. Value types can't be inherited, have different constructor semantics, and perform poorly due to CLR limitations. Also, confusing semantics regarding value types: some values are really values (and can't be modified), and others are really non-aliased, non-null references (variables). This gets particularly confusing with regards to the next issue:
    • Semantic distinction between fields and properties, particularly in conjunction with lack of mutability modifier (ala C++'s const)
    • Can't specialize generics
    • Cannot provide default generic type parameters (e.g. factory generics)
    • lack of typedef makes generics a pain to use (using is a limited but good-to-know substitute!)
    • Can't genericize over things other than types (e.g. functions, plain values, or names). This means you can't do something like make a generic implementation of a dependancy property leading to, well, nasty implementations of things like dependancy properties and the overuse of code-snippets and poorly readable code as a result.
    • Limited capability to specify generic type requirements e.g. generic sum method that takes both int, double and a bigint (without tricky and often slow hacks).
    • An interface method implementation or virtual method override cannot return a more specific type or accept a more general type; i.e. limited co/contravariance support even in C# 4.
    Eamon Nerbonne
    • 47,023
    • 20
    • 101
    • 166
    • Whoof!!! Thats a really long list!! – bragboy May 23 '10 at 12:12
    • C#'s pretty practical and my primary language - but after using a more niche language for a particular subproblem I'm often left wondering why C# has some of these limitations - particularly since some of these issues result in the overall language being rather more complex than less complex - risking C# growing towards the C++ end of the spectrum in terms of complexity. Honestly though, I don't think it'd be good thing for C# to actually address most of these issues. Better to fix em in a new language than deal with an ever more complicated compatibility scenario. – Eamon Nerbonne May 23 '10 at 16:45
    • One that I hate is the difference between `(Class)` and `as Class`. Mainly to do with the whole `null`able-or-not thing. – Nick Bedford May 26 '10 at 00:16
    2

    Five things I resent in Nemerle:

    • Local functions can't yield
    • Ability to compile a lambda sometimes depends on whether it gets inlined
    • Inconsistent value/reference type semantics for tuples
    • Occasional ambiguity between array indices and type arguments
    • Lack of general adoption
    Don Reba
    • 13,814
    • 3
    • 48
    • 61
    2

    Clojure

    • Lack of built-in syntax for optional and keyword parameters in function definitions. Sure, you can add it easily enough, but that means library writers don't use it. Pervasive destructuring hasn't proven to be a good substitute yet
    • Lack of method combination (before/after/around methods of the sort found in Common Lisp)
    • Too much reliance on Java interop, e.g. there's no built-in file IO
    • Sometimes I want static typing. This one isn't pure hate; I usually prefer dynamic, and attempts to mix the two have been largely unsatisfactory
    • There's no built-in fast binary serialization format for the built-in data structures, though I hear people are working on it
    Zak
    • 1,157
    • 8
    • 15
    2

    Python, again:

    1. No switch keyword. And NO, dictionary is not a replacement for it. Not even a bunch of elif statements.

    2. Inconsistent line break handling. Why can I do:

       test = (1,
               2,
               3)
      

      And not:

      from itertools import cycle,
                            islice,
                            izip
      

      Why can't I do:

      if stuff \
         and foo \
         or bar:
          return "Formated string with %(arg)s" % \
                 {'arg': "bloody slash"}
      

      without using slashes?

    3. There is not one obvious and only one way to do it. Python fails on its motto just like Java failed on "Write once run anywhere".

      # what somebody from an another language would do
      if not test.has_key('foo'):
          test['foo'] = 0
      n = test['foo'] = test['foo'] + 1
      

      vs

      # what an agnostic beginer would do 
      try:
          test['foo'] += 1
      except KeyError:
          test['foo'] = 1
      n = test['foo']
      

      vs

      # what you end up after looking for dictionary default value in the python doc
      test.setdefault('foo', 0)
      n = test['foo'] = test['foo'] + 1
      

      vs

      # what I would do
      n = test['foo'] = test.get('foo', 0) + 1
      

      And the worst is that they don't do exactly the same thing. There are subtle differences.

    4. Choice between spaces and tabs. There should be no choice. Pick on, set it in stone and stop fighting.

    5. Why can you do that:

      test = {}
      test['foo'] = 0
      

      but not:

      test = []
      test[] = 0
      

    P.S: " ".join(l) is fine people. Stop complaining about it, it's not obvious but with the iterator pattern in mind, it's just the right way to do it.

    Bite code
    • 578,959
    • 113
    • 301
    • 329
    2

    Common Lisp

    • conditions aren't classes (since classes came later), even though their interface is almost identical
    • some of the names are just weird, e.g., flet / labels (only difference: scope), and defvar / defparameter (only difference: behavior when already defined), or any of the bit-twiddling functions (dpb, ldb, etc.)
    • packages are ... really hard to get right -- every time I think I understand them, they don't do what I want
    • built-in data structures and functions aren't as generic as they could be (e.g., why can't I define my own hash function portably?)
    • multiple namespaces for functions, variables, etc. (I'm not opposed to this in principle, but CL made it too complex; Norvig has said he can't tell from the spec but there appear to be at least 7 namespaces)
    Ken
    • 756
    • 4
    • 7
    2

    Python:

    1. Global Interpreter Lock - Dealing with this complicates parallel processing.
    2. Lambdas functions are a bit clunky.
    3. No built-in ordered-dictionary type.
    4. Depending on how Python is compiled, it can use either UCS-2 vs UCS-4 for the internal Unicode encoding, many string operators and iterators may have unexpected results for multi-byte characters that exceed the default width. String slicing and iteration depend on the bit width rather than checking and counting characters. (Most other programming languages do similar things as well and have similarly odd behavior with these characters.)
    5. There are inconsistencies surrounding GUI frameworks for Python.
    Lara Dougan
    • 791
    • 4
    • 13
    2

    Haskell

    1. Sometimes the type system feels backwards. What if I don't want the compiler to infer types for my variables? What if I want the opposite, where it does constraint checking on said variables? For example, instead of inferring the type of the elements of a list, it instead makes sure that they all belong to a particular typeclass. This is a subtle but huge difference that makes it difficult for me to program UIs. It can be done, but it takes more effort than it does in some other languages. Haskell rocks for the non-UI parts, but the UI I leave to an untyped language.

    2. Allowing the construction of infinite values leads to some really frustrating errors sometimes.

    3. NoMonomorphismRestriction.

    4. Bytestring handling bites me in the ass sometimes and you don't know it until your program crashes because you mixed them up improperly. Something is wrong here, when we are losing type information that should have prevented this.

    5. Typeclasses should be automatically derived for trivial cases, like witness types, but there's a strong potential for abuse there.

    • 2
      Re #1, do you mean there are type constraints that you want to impose that you can't using the likes of `foo :: SomeTypeClass a => [a]`? – j_random_hacker Jun 01 '10 at 13:40
    2

    C#

    I know its stupid, but I'd like datatypes to convert to what I want on their own, without me having to add (int) or Convert.ToInt32 or whatever. It would just save me time. And it annoys me that if I write something to output an int and then it turns out that I need a long, then often I have to go through and change everything I've done to make it work. Just do it for me!

    Sorry, couldn't think of five, but I'm new to it, so maybe I'll come back and add more later :P

    Sir Graystar
    • 703
    • 1
    • 7
    • 17
    2

    Five things I hate about C++

    • Link times. With distributed builds I can rebuild our entire project in the same time it takes our linker to run.
    • No standard way to prevent reordering of memory operations. Using write-combined memory typically requires abuse of the volatile keyword. Preventing read reordering (often critical for optimization when dealing with SIMD math pipelines) is typically accomplished via injection of a null ASM block in the middle of a routine.
    • Multi-step macros to work around stringification issues:
    #define STR_LINE2(x) #x
    #define STR_LINE(x)   STR_LINE2(x)
    #define LINE_NUMBER STR_LINE(__LINE__)

    • It's just generally painful to do string manipulation.
    • Proliferation of non-standardized printf variants (vsnprintf_s vs _vsnprintf_s).
    Vorlauf
    • 69
    • 5
    2

    C++

    • cryptic error-messages when templates are involved
    • lack of template constraints (many cases can be worked around with template metaprogramming, but this will result in unreadable code (at least for average programmers) in most cases)
    • pointer to member-function syntax
    • c++ standards committee should release offical standards more often (or at least release separate updates to the standard library itself), i mean really TR1 was released 2005, and we still dont have a shared_ptr, bind and alike in the standard library.
    • -
    smerlin
    • 6,446
    • 3
    • 35
    • 58
    2

    Regarding C#:

    1. I hate that there is no keyword to specify which exceptions are thrown from a method like in java. Its a much better way to document exceptions than using an XML comment.
    2. I would also want a much better syntax for generic constraints like oring and anding of constraints.
    3. Why a method can't return more than one value?
    4. Lack of support for aspect oriented programming in the language.
    5. Why can't you annotate each one of the property accessors with an attribute?
    6. Lack of builtin regexp support like in perl.
    Ikaso
    • 2,268
    • 19
    • 26
    • +1 for exceptions documented on the method itself. It sucks having to go to the API to see what could possibly be thrown from some call I make to ensure I handle all the cases. Even better: a code snippet that can add catch()es for all exceptions that can be thrown. – drharris Jun 02 '10 at 06:24
    2

    Python

    1. Standard library disobeys their own style guidelines in many places. (PEP-8)
    2. Py3k's super keyword is full of unwanted magic (you can't assign it to a different name, works without self, why do we have this explicit parameter at all?)
    3. Unicode support is incomplete in Py2k and sucks in Py3k (standard input in unicode, no binary data! WTF? Creating a new WSGI standard is hacky.)
    4. The GIL. Very limited multi-threading support (with CPython)
    5. PyPI (Python Package Index) sucks. Envious glance at rubygems
    passy
    • 7,170
    • 5
    • 36
    • 38
    2

    PHP:

    • Absurd assert() function... it runs eval() on the code inside
    • ?> tag removes any newlines following it ?!
    • Strange handling of numeric strings (try them as array keys)
    • Painful unicode support that seems no longer will be resolved by PHP 6
    • Low cost of entry means 95% give PHP programmers a horrible name - and trying to find someone in the 5% to hire is crazy.
    2

    Python

    1. There is no Django for Python 3.
    2. Static typing. Yes, dynamic typing is great thing, but sometimes I do want to make it static.
    3. Proper unicode support (fixed in Python 3)
    4. Construtors naming. I hate all this underscores __in__ my code.
    5. Threads are not very efficient
    Peter Mortensen
    • 30,738
    • 21
    • 105
    • 131
    Davinel
    • 940
    • 4
    • 10
    • 20
    2

    Scheme:

    • Lack of users/small community
    leppie
    • 115,091
    • 17
    • 196
    • 297
    • No dynamic scoping, no bignums or complex numbers in some implementations, non-portable type declarations, no native hash tables. – Daniel Cassidy Dec 07 '08 at 02:21
    2

    Lua

    I love programming in Lua, but here's what burns me:

    1. There's no way to write down an API in the language---nothing like a C .h file or Java interface
    2. The language has first-class functions but somebody forgot to tell the people who designed the libraries.
    3. The syntax for writing a function is way too heavyweight.
    4. Syntax is split between statements and expressions.
    5. The expression form is impoverished: there's no 'let' form, there's no true conditional expression, ...

    Despite all of which I will insist that Lua is fabulously great :-)

    Norman Ramsey
    • 198,648
    • 61
    • 360
    • 533
    2

    Scheme

    • Lack of static typing
    • No static function overloading (due to the above) leading to long names for field accessors
    • No unified object system
    • Kinda slow
    • Relatively small community
    Henk
    • 3,193
    • 2
    • 17
    • 12
    2

    EL - Expression Language, the ${...} and #{...} thing in JSP pages and JSF 2.0 Facelets which is used to pull data up from the underlying Java code.

    • All the fun things, like method calls with parameters and annotation based naming is only present in the EL in Java EE 6 which is only available in Glassfish v3.
    • It is a royal pain to 1) get the right jars for an earlier Servlet 2.5 container, and 2) getting them to work without interfering with any previous implementation available in the container.
    • Having only an earlier version of JSF like 1.2, takes away the method calls and leave you to work with f:setPropertyActionListener - http://weblogs.java.net/blog/2009/07/22/say-sayonara-spal - which, trust me on this, is not very nice.
    • The EL parser has no idea of where the snippet it is to parse and interpret came from, so you tend to give everything an id so you at least can identify which tag made it grumpy.
    • Eclipse gives a warning at every EL method call as it is JSF 1.2. only too.
    Thorbjørn Ravn Andersen
    • 73,784
    • 33
    • 194
    • 347
    2

    C++:

    • Lack of symbolic import.
    • Over-obsession with C compatibility.
    • Ridiculously complicated preprocessor.
    • Template errors are nearly incomprehensible.
    • No garbage collection.
    cgranade
    • 11
    • 1
    2

    Javascript;

    1. the dynamic binding of "this" is very confusing and dangerous if you don't know exactly what you're doing.
    2. a function declaration requires the keyword "function". It's not the typing I object to, it's the reading it when I want to do something slightly clever. Hrm now I think of it maybe that's a plus. Discourages me from doing clever things.
    3. As a result of number 2, it's often less code (in terms of characters) to just copy/paste a code segment than to declare it as a function, if it's a fairly short idiom. This unfortunately promotes bad practice, especially in my own code.
    4. Javascript makes motions at being a functional language by having first class functions and closures, but there's no way to verify referential transparency in a function, at either runtime or compile time. Without this, some architectures become either risky or bulky.
    5. Its fantastically bad reputation, and thus my inability to say "I program in javascript" to anyone without being laughed at.
    Breton
    • 15,401
    • 3
    • 59
    • 76
    2

    R (R-Project for statistics)

    1. Terrible, terrible string support
    2. Surprisingly difficult for some simple descriptive tasks, like cross-tabulation
    3. Large data set manipulation is done in-memory.
    Gregg Lind
    • 20,690
    • 15
    • 67
    • 81
    2

    By far the thing that I hate most about my favourite language is that my choice keeps changing. Every time I think I've found The One, I find five (or more) things that I hate about it. And then the grass looks greener over there...

    WReach
    • 18,098
    • 3
    • 49
    • 93
    2

    Perl

    I love this language, and I don't want to add things that have already been used, but no one has mentioned this yet, so I'll throw it on the pot. When I used this feature, I found it to be the most horrible experience of my life (and I've worked in assembly language):

    • The write() and format() functions.

    They have the single worst, ugliest, most horrifying syntax imaginable, and yet they don't manage to give you any more functionality than you could already achieve with some (infinitely prettier) printf() work. No one should ever try to use those two functions to do any output, simply because of how bad they are.

    I'm sure someone will disagree, but when I looked into them, hoping they would solve my problem, I found them to be a "world of pain" (to quote the Big Lebowski), and hope that Perl6 has either done away with them or, better, completely rewritten them to be somewhat more usable and useful.

    Chris Lutz
    • 73,191
    • 16
    • 130
    • 183
    • 1
      I used them quite a bit when I first learned Perl for automating reports. The brilliant thing about format/write is that you can see what the report will look like (more or less) from the format string. But the mechanism is unwieldy to say the least. There are better solutions these days. – Jon 'links in bio' Ericson Feb 19 '09 at 07:39
    • 1
      format() paginates and applies headers,footers, and page numbering which you'd have to do on your own with printf. format() can also handle line wrapping, etc. – brian d foy Feb 19 '09 at 07:44
    • @brian d foy: Good points. I ran out of space to mention an alternative I use that does these things: . If you need plain text, pdftotex works well. – Jon 'links in bio' Ericson Feb 19 '09 at 08:43
    2

    C

    1. bit fields -- they aren't well specified by the language and how they work is compiler dependent and architecture dependent.
    2. It's often hard to find where a particular symbol is defined in a large mass of code, esp. if that symbol is produced by a macro. Which reminds me...
    3. The preprocessor is a rather ugly hack, amenable to all sorts of abuse.
    4. lack of standard sized integers (remedied by uint*_t lately, but there is lots and lots of old code floating around out there with custom typedefs or #defines for DWORD, WORD, BYTE, etc.)
    5. Lack of something akin to Perl's cpan.org (would love to be wrong about that one.)

    Edit: While thinking about a CPAN for C, I thought... what would I call such a thing, and thought of "ccan", and googling it, I came across this: http://ccan.ozlabs.org/

    It seems to be as yet in its infancy though.

    smcameron
    • 758
    • 4
    • 7
    • 8
    • Bit fields are awesome! I don't target multiple compilers and architectures, so I wasn't aware they weren't portable. Understandable, I guess. (And if C didn't have unions I'd say bit fields were just ok.) – Jon 'links in bio' Ericson Feb 20 '09 at 19:59
    • If only C was still "sexy" - we have the technology to solve all these problems now. But not enough programmers care. – finnw Jun 12 '09 at 23:48
    2

    I'm going out on a limb since I can't really use it full time, but I'll try anyway!

    Perl 6

    1. func("frew") != func ("frew")
      • It annoys me, but there is good reason for it. In Perl 5 print (5 + 6) * 10 still gets me every now and then
    2. It may be easier to parse than Perl 5 in a lot of places, but it still kills my editor sometimes
    3. It still has a lot of the line noise Perl 5 which scares a lot of people. That means it's harder to get them excited etc.
    4. There are no libraries yet.
      • This will be a non issue if Perl 6 does indeed end up supporting Perl 5, but that may be a burden not worth bearing.
    5. There's no REPL, or what rubyists would call irb.
      • A solid interactive Perl 6 with tab completion, color coding, etc, would make using and learning it so much nicer.
    6. Currently the documentation is basically the English spec. Not exactly an easy read.
    7. I know it's a stupid cliche, but it's not out yet!
      • (I am allowed to complain because I am helping :-P)

    The first three are the language; the rest aren't really the language itself but the fact that it's not out yet.

    brian d foy
    • 129,424
    • 31
    • 207
    • 592
    Frew Schmidt
    • 9,364
    • 16
    • 64
    • 86
    • 1
      Only two has anything to do with the language. The rest are about the tools, and those things change. So, only three more to go. :) – brian d foy Feb 23 '09 at 18:56
    2

    C

    • It's so flexible and powerful that it's really easy to write really awful, or downright dangerous code (or, if you prefer, "with great power comes great responsibility").
    • '=' for assignment, and '==' for equality; easy to confuse in 'if' statements.
    • The implementation of a number of fundamental parts of the language are compiler-dependent; e.g. the size of the basic types, order of bits in bitfields, padding and byte order in unions.
    • Bitfields aren't parameterisable (i.e. you can array of ints, but you can't have an array of bits).
    • String handling could be improved.
    Steve Melnikoff
    • 2,620
    • 1
    • 22
    • 24
    2

    Python

    • No statements in lambdas. GRRRR
    • foo( a for b in c if d ) feels wrong, it surprises me every time I get away with it. Shouldin't it be foo( (a for b in c if d) )?
    • Can i have a dict comprehension?
    • map and filter operators have special syntax in list comprehensions, how about something for reduce? or sort?
    • Just by having a yield statement in it, a function is magically transformed into a generator, and its interface changes completely. Also, that generator cannot do any work before the first next(). at least, not without using a function that returns a generator.

    JavaScript

    • No brief syntax for making modular code libraries. You have to call a function that returns a dictionary of public methods. And you have to edit that in (at least) two places every time you alter the interface of your module.
    • Creating closures involves returning it from a function that returns a function from ('sup dog) yo' function. Clutter!
    • for each ( foo ) syntax and behavior feels like an afterthought.
    • Knowing when your code will actually run (and in what order) is more of a dark-art. The only way to get it right for sure is put everything (yes, that too) in one big file. and even then you still need to wait for a document.onload
    • Am i missing something? is there no trivial way to get json serialized values without building them by hand? (yes jQuery can do this, sort of).
    SingleNegationElimination
    • 151,563
    • 33
    • 264
    • 304
    2

    VBA (because you thought your language was bad)

    1. Whitespace inside a line is rigidly enforced.
    2. Statements just end, and require a " _" to break to the next line, but not every line can be broken.
    3. No ++,--,+=,-= statements. Seriously?
    4. Arrays can begin at any index, not just 0.
    5. Some types (i.e.: fixed-point "Decimal" value) must be subtypes of Variant, and aren't available as their own type.
    6. != and <>.
    7. "=" is used as both comparator and assigning, instead of splitting into "=" and "==".
    8. "Option Explicit".
    9. UI hasn't been updated since 2000.
    10. Office2k7 didn't upgrade to VB.NET
    11. Most object models are non-sensical and overly verbose.
    Andrew Scagnelli
    • 1,584
    • 4
    • 18
    • 26
    • I haven't used VBA much, but the `=` for comparison and assignment sounds horrible! I use == all the time in math expressions, and I'm guessing something like `x=x+(x=0)` is a syntax error (or unpredictable)(Though I'd never actually use *this* example). – Ponkadoodle May 27 '10 at 04:43
    2

    c#:

    1) static methods must be a member of a class

    2) static extension methods can only be added to static classes

    3) The implementation of interface functions are not marked with something like 'override' to show they are from a base class or interface (making it hard to ensure you're overriding the method you expect (with correct signature) with just code review).

    I just have 3. I guess thats pretty good.

    Frank Schwieterman
    • 24,142
    • 15
    • 92
    • 130
    2

    Python:

    I am still a moderate user for python, so my complaints might just well be lock of knowledge or mis-usage. Comments are welcome. I do love this language.

    1. Poor thread support and GIL. If you'd like to take use of multicore platform, most of the python programmers would probably recommend multiprocessing or some sort, don't use threading. It wouldn't give you the performance you are expecting.
    2. property only for instance variable. _class_var = property(classmethod(some_method)) just wouldn't work. How can I get a property wrapped class variable?
    3. no access control. All access controls are syntax mangling. Like private is __private, protect is _protected, etc... And hope that everyone programs python follows the naming convention. Come on, we can do better than that.
    4. I agree the python philosophy of being simple and clear syntax but some simple and clear syntax not being supported seems lock of good judgement, in my opinion. Such as, a++, ++a, a-- and --a, self-de/increment, what's wrong with those? foo = (a > b ? a : b) unary operation, what's wrong with those? (I know py2.6 has something similar introduced, but given the massive support of almost every other language for those simple syntax, why reinventing the wheel? why not just follow the best practice? Shouldn't a good thing just keep in its good "form"?)
    5. Program to interface. Python has no interface or abstract class concept (py3k has something called abc), everything is concrete. Providing an "interface" or "abstract" keyword to build class skeleton and guard class inheritance and extension wouldn't be a bad idea I think. It helps on top-down design. Currently, I just have to fill the each of methods with NotImplementedError, quite a tedious job.
    6. I have to add this. version less than 3.x has str and unicode types. This is a true nightmare. It makes ascii and non-ascii/unicode mixing most likely to fail (bad, bad)

    I saw people complains about speed. I don't get that. Its an interpret language, code not compile to machine code until runtime, that's just the nature of it. You can't compare speed from an interpret language to a compiled one. As far as I can see, among the interpret/scripting languages, python isn't slow.

    jimx
    • 1,012
    • 2
    • 12
    • 12
    • 4. You miss both ++a *and* a--? Heavens... If you get those, may I have inline assembler back please? 6. Ah, you're only used to 7-bit ASCII I take it. The mixing of ASCII and unicode *will* bite you sooner or later, badly, and in a way hard to debug. Explicit is very much better than implicit in this case. – kaleissin Oct 30 '09 at 13:54
    • agreed. that's why I said its a nightmare because you can't 100% sure when you are dealing with pure ascii and when you are dealing with unicode. Luckly is that py3k treats them all unicodes with utf-8 encoding as default (instead of ascii). And that, we are all talking about just unicodes... ++/-- do not seem to be very evil to me.. :) short than i += 1. the thing is i += 1 is a statement which can't be used in expression, where ++/-- is expression. – jimx Nov 15 '09 at 00:10
    • for #4: foo = a if a>b else b --That probably looks better when surrounded by parenthesis. I like that syntax because you can read it as "foo equals a if a is greater than b, else b", foo = (a > b ? a : b) is harder to decipher. – Ponkadoodle Feb 07 '10 at 22:00
    • You can create class properties, but it can be non intuitive. See my question here: http://stackoverflow.com/questions/2173206/is-there-any-way-to-create-a-class-property-in-python – Jason Baker May 25 '10 at 17:30
    • The problem is that ++ and -- can be used in expressions like `a=b*++a+c[a++]`, which IMO is hard to predict the resulting value of a. I have no problem with just `a++` (even though you're only saving 1 character). But if it was chosen to allow the later and not the former, it could be more confusing to programmers with background knowledge of a language that has full support for pre/post increment. – Ponkadoodle May 27 '10 at 04:52
    1

    C#

    1) Lack of practical ability to write generics for value types. For example, any idiot (well most idiots) can write a routine that calculates the standard deviation of a list of int, float, double, etc in C++, it is straightforward to write, easy to read and performs as fast non-generic code. I think if you can write something in C# that is close to hitting any one of these 3 without being ridiculous on the other 2, you are a really great programmer.

    2) Covariance and contra variance, although this is being added to 4.

    3) Extremely poor documentation of LINQ (alright, not really part of the language).

    4) Trying to use foreach/iterators when I want to do the same thing every time except something slightly different the last time (such as concatate a bunch of strings with commas between them and the word and between the last two). If I write it with an IEnumerable, it is hard to write and read, and with a for (int i=0 i < ...) it isn't much better and it is less efficient.

    5) I know I am going to get complaints about this, but lack of checked exceptions. This does not need to be implemented the way it is in java (The framework developers do make some very good points on why they didn't do this), but I would be happy with a compiler warning users who don't like checked exceptions can turn off.

    Brad
    • 1,360
    • 4
    • 18
    • 27
    • If you want to concatenate strings with commas do it differently in the first iteration (you prepend the strings in all but the first iteration with a comma). That's IMO a lot easier than doing it different in the last iteration. – helium Jan 04 '10 at 16:09
    1

    Quenya

    • Community is too small. It's next to impossible to get a good language-immersion program going when there's no easy to find another speaker nearby.
    • Irregular verbs. Yes, I know English and Spanish mentioned them, too, but Quenya was invented. Why does there still need to be irregular verbs?
    • No Unicode support. I have to have three different Tengwar fonts on my computer before I can read most messages, and several of them are poorly kerned. This wouldn't really be a huge issue given the existence of a Romanized transcription, but Tengwar is so beautiful, you don't not want to use it.
    • Not all concepts can be easily referenced in Quenya, leading to annoying circumlocutions, or resorting to Sindarin, Númenórean, or (Manwë save me) Klingon to get my point across.

    1

    C#

    The number one all time pet hate of C# has to be:

    (1) Events have strong references to all listeners thus preventing garbage collection of anything that listens to an event. If you want to see the problems this has caused just search on the net for all the people who have tried to solve the problem by creating some sort of "weak referenced event handler".

    (2) Needing to check if an event equals null before you call it seems like something that should be handled by the language.

    (3) The XML serializer has no way of reading/writing comments in an XML file. Not great in an environment where XML files are modified both by hand and by the tool written in C#. Can be worked around by just using a raw XmlDocument, but would be nicer to be able to abstract that away to a class.

    (4) The build process doesn't let you directly access things like xsd files, instead you need an intermediate step where you create a C# partial class. This also causes issues with XAML files where you need to rebuild twice sometimes to get changes to flow through properly.

    (5) No support for CPU intrinsics like MMX and SSE 1,2,3,4 and thus these valuable CPU features go unutilised when running C# apps.

    Others that didn't make my top 5:

    (6) Can't tag fields as properties, all properties have to be explicitly implemented from the get go:

    E.g. currently has:

    public class MyClass {
        private int someInt;
    
        public int SomeInt {
            get {
                    return someInt;
            }
            set {
                    someInt = value;
            }
        }
    }
    

    Would like

    public class MyClass {
        [IsProperty(public, get, set)]
        private int someInt;
    }
    

    (7) No support for multiple return values e.g:

    public int, string, double MyFunction()
    {
        ....
        return x,y,z;
    }
    
    
    public void TestMyFunction()
    {
        int x, string y, double z = MyFunction();
    }
    

    (8) No support for covariant return types

    I have some gripes about the generics implementation, but I'll cut it there. I think C# is a great language for doing all the GUI, networking and configuration plumbing and is my number one language for getting things up and going quickly in a way that can be supported in the long run.

    John Stewien
    • 1,046
    • 9
    • 5
    1

    Python

    Ones that I just don't understand ...

    • math.ceil() and math.floor() return floats, not integers (probably to avoid an integer overflow in the underlying C function - but why not cast to a Python long?)
    • len() is a function not a method
    • reload() is very limited, does not reload a module 9 times out of 10, only reloads an imported label if it is a module - i.e. cannot do from bar import foo; reload(foo) if foo is not itself a module
    • Mutable default arguments have a single reference (why not a new instance each function call?!)
    • All these underscored variables - if they are so private, how come we see inbuilt ones so much in code? Get a namespace!
    • Strings are not mutable - maybe there is a good reason for this but I have come across many situations where I would like to tweak one particular character ...

    Ones that make sense based on the implementation but are annoying ...

    • array.sort() does not return an array (I suppose it happens in-place)
    • List/generator comprehensions don't define a new scope (Is just syntactic sugar for a for loop, right?)

    and a couple that are fixed in Python 3

    • Integer division by default
    • global can only refer to the top level namespace
    Brendan
    • 18,771
    • 17
    • 83
    • 114
    • 2
      For #2, I believe len(instance) just calls the method instance.__len__() – Ponkadoodle Feb 07 '10 at 22:13
    • @wallacoloo Sure but in terms of syntactic sugar, `__len__()` should just be aliased to `len()` – Brendan Feb 08 '10 at 12:13
    • I completely agree with you. I'm just saying that if you ever truly need it as a method, you can use it as a method. – Ponkadoodle Feb 08 '10 at 19:21
    • I don't really know too much python but I imagine floor and ceil return floats for the same reason C# does. `Math.Floor(double.MaxValue) > int.MaxValue` returns true in C#. – Robert Davis Mar 22 '10 at 20:18
    • In C#, that would be the case, in C too (which CPython is written in) however Python int's are automatically cast to arbitrary length 'longs' when the int limit is reached - this effectively means a Python programmer almost never has to think about integer overflow. It seems to me that the CPython is built on the C implementation of `floor` and `ceil` and the step of converting to appropriate Python variables was not implemented. – Brendan Mar 23 '10 at 16:49
    • +1 for #4, my biggest annoyance with Python. – missingfaktor May 04 '10 at 07:42
    • the `math` module is just a very thin shell over C's math.h. – u0b34a0f6ae May 26 '10 at 08:24
    1

    Scala:

    • standard library weirdnesses: it does not always show best practices, and is way underdocumented
    • the hard-coded FunctionX, TupleX classes
    • lack of properties: getters and setters are separate, which violates DRY, and makes things such as FRP nearly impossible
    • need of = _ to initialize properties
    thSoft
    • 21,755
    • 5
    • 88
    • 103
    1

    My 5 for Delphi:

    1. Procedures and functions aren't necessarily distinguished from variables if not parameterized (eg, I can have statement such as x := GetPositionOnScreen; instead of x := GetPositionOnScreen();)
    2. Try/Finally and Try/Except needs to be nested (stated once before, but it's still one of mine as well).
    3. Not case sensitive.
    4. Can have a multiple objects (functions, global variables, local variables) named the same and Delphi will happily try to figure out what you mean. names should be unique.
    5. Odd if condition rules. a single conditional check doesn't require a () around it, but if I do multiple checks, I need a () around each one, and sometimes multiple nested sets for bigger checks.
    6. No inherited includes. If I need to reference functionality from the Windows unit in a base and an inherited form, I have to include Windows in both.
    Tom A
    • 1,662
    • 2
    • 23
    • 41
    1

    Python: Array part-selection doesn't give you what you asked for.

    a[1] gives you one element
    a[1:2] gives you one element, not [ a[1], a[2] ]
    a[1:3] gives 2 elements

    I hate that, but maybe that's just because I mostly work in Verilog.

    Marty
    • 6,494
    • 3
    • 37
    • 40
    • Okay, you only have four more to go! – brian d foy Nov 11 '08 at 23:01
    • That one counts for all 5 in my book! – Marty Nov 11 '08 at 23:18
    • It makes sense when you do [0:2] or a[2:4], it is much better than PHP's array_slice(). – too much php Nov 11 '08 at 23:36
    • I remain unconvinced, Peter! You get 2 elements for both of those, which is exactly the behaviour which annoys me. I would (and did) expect that [2:4] would return elements 2 to 4 _inclusive_. – Marty Nov 11 '08 at 23:45
    • I believe it's easier to understand in a graphic manner: [0:2] -> |0 1 |2 3 4 5 6 7 -> [0,1] [6:7] -> 0 1 2 3 4 5 |6 |7 -> [6] [6:] -> 0 1 2 3 4 5 |6 7| -> [6, 7] [-3:-1] -> 0 1 2 3 4 |5 6 |7 -> [5, 6] The numbers represent a limit rather than a specific location: [2:8] -> 0 1 |2| -> [2] – I GIVE TERRIBLE ADVICE Nov 12 '08 at 00:14
    • Here's the trick I learned: subtract the first number from the second number. That tells you how many elements you're slicing. So [5:6] will contain one element because (6 - 5 == 1) and [12:87] will contain 75 elements because (87 - 12 == 75) – benjismith Nov 12 '08 at 05:42
    • At least it is consistent with the range() functions, so you can put a mental alert like "watch out! the last element will be left out" – Mario F Nov 12 '08 at 13:33
    • 2
      @Marty: It is a standard practice to left out end element when defining a range, e.g. in C++: `iterator.end()` is pointer *after* the last element; in C: `for (int *p = a; p != &a[n]; ++p)` here's `&a[n]` points to next to the last array element. See Dijkstra's article http://is.gd/6fIZ – jfs Nov 26 '08 at 15:59
    • If it was inclusive, it'd prevent many good python idioms. First off, s[0:len(s)] would actually give *more* elements than exist (Though most builtin types will actually treat it like s[0:len(s)-1]). Also, how do you select 0 items? maybe s[2:1]? What about s[0:-1]? Currently, it will not return 0 items, but instead return all but the last element. And yes, I do often take slices of length 0 from arrays (when the indices are calculated from variables) – Ponkadoodle May 27 '10 at 18:49
    1

    C++

    1. It takes so much time to make a simple snippet of code.
    2. for(std::vector::const_iterator iter = [...]
    3. vector.remove() doesn't remove.
    4. vector.push_front() doesn't exist.
    5. header files
    6. No lambda
    7. No automatic empty virtual destructor if there is at least one virtual function.
    user35978
    • 2,302
    • 1
    • 13
    • 14
    • Boost solves at least #2 and #6. For the rest, I agree with you. – Martin Cote Nov 14 '08 at 19:56
    • 1
      #3, it does. It just doesn't delete. #4 use deque. – Jasper Bekkers Nov 18 '08 at 20:08
    • #7. The reasoning is that you may not want a virtual destructor if e.g., your derived classes do not add any non-POD members. Explained here: http://www-igm.univ-mlv.fr/~dr/CPP/c++-faq/virtual-functions.html. I think it should force you to declare a destructor as "nonvirtual ~ClassName()" to let it know that you have thought this through though. – Neil G May 20 '09 at 21:04
    • 2. for_each(v.begin(), v.end(), foo); 3. std::vector has no remove member function. Perhaps you mean std::remove_if()? Use the member function erase to erase elements from containers, and remove_if to move elements to be erased by a predicate. 4. Thankfully, because then it wouldn't work as a linear array, or it would make the allocator much more complex. 6. Use Boost's lambda. –  Nov 25 '09 at 08:18
    • #4 cant be implemented effectivly for a vector. So dont blame C++ for that, but choose a container class which fits your needs. – smerlin Mar 22 '10 at 19:41
    1

    C#

    • Generic parameters are invariant C# 4.0 introduced covariance and contravariance for generic types
    • Overridable class members must explicitly be marked as virtual

    Java

    • Missing unsigned numeric data types
    • Primitive data types aren't objects
    Enrico Campidoglio
    • 56,676
    • 12
    • 126
    • 154
    • Primitive data types aren't objects: what is the problem with this? Since Java 5 you have autoboxing/unboxing – nkr1pt Nov 13 '08 at 14:33
    • Well, .NET everything is an object, including the primitive datatypes (the only difference is that they are allocated in the stack). The advantage of this approach is that behavior (methods) can be added directly to primitive types, instead of having to use a separate "utility" class like in Java. – Enrico Campidoglio Jan 08 '09 at 21:17
    • Autoboxing sucks. Make everything an object. Allow access to primitives in rare cases. The problem is objects can't override many operators like - and * etc. So can't make it work on Integer objects. What about Java's Generics. Can't cast when using generics, have to ungenerify objects. Its stupid. – Dmitriy Likhten May 25 '10 at 19:08
    1

    Python:

    • speed
    • static analysis (lack of)
    • anonymous functions limited to one expression
    orip
    • 73,323
    • 21
    • 116
    • 148
    1

    Ruby:

    • Significant whitespace. For the interpreter, end of line = end of statement, unless it looks like the statement ought to continue (or you explicitly escape the newline).
    • Slow
    • Online documentation not as good as Python's (in defense, Python's is excellent)
    • Did I mention slow?
    Joshua Swink
    • 3,380
    • 3
    • 29
    • 27
    • 3
      If you want fast Ruby, have you tried maglev? Languages are never slow. Only their implementations can be slow. :) – brian d foy Nov 14 '08 at 03:19
    • @brian, most languages have only one implementation. This applied to Ruby until recently, so yes languages *can* be slow. – finnw Jun 12 '09 at 23:50
    1

    Rewrote this after some more thinking ...

    Five things I hate about PHP although I love it (in no particular order):

    • Inconsistent naming and parameter order in the built in functions.
    • Object oriented approach to arrays thanks to the SPL but sadly not to strings (yet).
    • No real concurrency in PHP itself, only via the hosting webservers multiprocessing
    • No asynchronous calls like in JavaScript
    • Opcode caching only via extensions. Not really bad but just annoying.

    Those are the language features (or lack of) that annoy me but the much bigger problems are these more people/community related things:

    1. The fact that a lot of people who use PHP, don't know anything about programming and good practices in general and produce really messy code. JavaScript has the same problem.

    2. The huge amount of tutorials/book that teach really bad practices and style. This may be the main cause of #3.

    3. The bad reputation it has developed mostly because of #3 and #4.

    selfawaresoup
    • 15,473
    • 7
    • 36
    • 47
    1

    Having to assume we have a language. Do we?

    Niklas Rosencrantz
    • 25,640
    • 75
    • 229
    • 424
    1

    C#

    I'm very happy with C# but these two really annoy me:

    • Constructor-based initialization for immutable classes is less convenient, less intuitive (when you read the code you don't understand what you assign to what), has less IDE backing than inline object initialization. This makes you lean towards mutable classes inevitably. I know this has been mentioned before, but I strictly have problems with initialization syntax for immutable classes.

    • switch is too verbose. Whenever I see a situation where a switch would be proper, I'm really inclined to use an if..else if.. just because it's more terse (~30% less typing). I think there should be no fallthrough for switch, break should be implied, and case should allow comma separated list of values.

    Sedat Kapanoglu
    • 46,641
    • 25
    • 114
    • 148
    • Sorry for the ignorance, but what is the problem with constructor-based initialization for immutable types? – devoured elysium May 25 '10 at 18:31
    • First you have to write one and write all redundant assignment statements in it. On the other hand, mutable classes support inline initialization syntax by assigning properties just after constructor directive, much easier. Second, with parameterized constructors it's hard to know what you assign to what. Inline initialization shows you that. .NET 4.0 cures this partially with named parameters. In many functional languages, constructors of immutable classes actually act like "member definitions" at the same time, saving you *a lot*. See F# or Scala. – Sedat Kapanoglu May 25 '10 at 18:54
    1

    Java is slow according to many but I agree to a certain to degree of usage.

    Java is dramatic. They have lots of classes just for a single thing you wanted to do. But you know flexibility property XD.

    Java is hard at first but fun as always.

    When you are writing a simple code for printing "Hello,World!" PLEASE DO NOT USE JAVA! XD I'm sure I am justified.

    Java is a mixture so don't say it is purely an OOP language.

    There's many more but I am only restricted to five XD. Thanks!

    Richeve Bebedor
    • 2,138
    • 4
    • 26
    • 40
    1

    C#

    1. No easy way to check if a type is Numeric
    2. It means you are probably stuck using most of the microsoft stack, IIS and MSSQL
    3. Instead of being a specific tool for a specific problem, C# tries to be a language for every paradigm.
    4. Lack of community. Sure, there are starting to be open-source frameworks and libraries for C#. The same ones that have been available to Java developers for years.
    5. Hard to find good help. The internet is littered with poor examples of how to solve problems with C#. This goes back to problem #3.
    CountCet
    • 4,545
    • 7
    • 30
    • 39
    1

    JavaScript

    From the ECMAScript 5 spec:

    • 7.6.1.2 Future reserved words:

      class, enum, extends, super, const, export, import

      In strict mode: implements, let, private, public, interface, package, protected, static, yield

    • 11.9.4 The Strict Equals Operator (===) vs. 11.9.1 TheEqualsOperator(==)
    • 11.9.6 The Strict Equality Comparison Algorithm (NaN === NaN is false)
    • 8.5 The Number Type - No real Integers, everything is a float.
    • 4.2.1 Objects - prototypal inheritance

    OK, I kinda enjoy the last one, but it's 7 kinds of confusing

    • Prototype inheritance is great but you have to know what you're doing :). JavaScript is great instrumentaion language but for implementing some logic I prefer something more type-checked and use only thinh JS layer around it. – Rostislav Matl May 26 '10 at 08:35
    • Yeah, the thing that always messes me up about it is setting the inheritance chain, but this is a sweet way to do it: http://closure-library.googlecode.com/svn/docs/closure_goog_base.js.source.html#line1206 – thejefflarson May 26 '10 at 14:49
    • All those things make good sense to me... How come some people find those concepts so difficult/annoying? I love the loose and strict comparisons and using instanceof. Also having numbers as floats means they just work like real life. And prototype inheritance is my favorite feature... Having reasons in your post on why they annoy you would be nice. – balupton Aug 27 '10 at 00:53
    • I don't see the need to defend #1. == is a superflous operator, as it does type coercion and is almost never what you want. I do think that while it's correct, having an impossible value (NaN, null, undefined) not equal another is not pragmatic. I agree that god intended numbers to be floats, but checking bounds on float math (ji-theta) to make sure that we have acceptable values for operations gets real old real fast. And the last one was a joke, but I do find it confusing (and awesome). These are all letters of love to a language I would code in almost exclusively if I could. – thejefflarson Sep 01 '10 at 15:59
    1

    VB .NET, but only because VB6 poisoned an entire generation of programmers

    I work in a VB .NET shop that used to be a VB6 shop, and every person working here who used to be VB6 developers stubbornly refuses to learn anything about .NET. They code as if it’s still VB6, and their apps suck just like VB6 apps did. My boss actively discourages any use of LINQ because she fears it’s too difficult for others to understand, which is true because nobody wants to understand it.

    I think we would have all been better off if MS just went with C#, which kills me to say because I think curly braces are far inferior to VB’s verbose closing statements.

    Bremer
    • 407
    • 3
    • 11
    • I agree (and I'm coding in VB.NET). If you look around forums and boards you find a lot of code written in VB.NET which looks like VB6 or even VBScript...the people just think "It's the same as always" and just refuse to learn anything about the framework or the new features. It goes even so far that someone told me that OOP is "hard to write, read and understand" and VB6 would be way easier. For some reason I only see this behavior in the VB-Community, and in my opinion dragging the VB6-Namespace along was the worst decision Microsoft made with VB.NET. – Bobby Jun 01 '10 at 13:54
    • I agree that they went a little too far in backwards compability, bringing in a lot of junk that shouldn't belong in a modern language. What makes me sad is they can't really fix it now, they missed their chance and like you say C# has it's own problems. We have a few die hards writing vb6 code using .net but not too bad. I remember 10 years ago the old-timers were writing cobol/fortran programs in VB6, now that was some really awful code to maintain. Everything in 1 function and lots of gotos! – dwidel Jan 13 '11 at 17:22
    1

    Ruby.

    1. Strange scoping rules - variables, constants, and methods each behave differently from each other. The rules change also depending on which keyword you used to create a closure. Or on whether you're in a class, eigenclass, object, module, or module's self. Then there's instance_eval, which changes the rules to a different set of rules. And they change again when a module is "included" or "extended", which themselves do different things to scope. And some sets of rules can't be emulated by metaprogramming, so you have to use eval. Unless you're on ruby 1.9, where all of this is different.
    2. Namespacing is basically useless. If you have Foo::File, then the stdlib File is probably broken for all of Foo.
    3. require statement is broken. If two files require eachother, the behavior of those files can change dramatically depending on which is loaded first from elsewhere.
    4. libraries change APIs dramatically and suddenly, so you have to require specific minor revision numbers of all of your dependencies. For every single ruby application on your system.
    5. The rubygems package system overrides "require" rather than putting files in the search path - because why use a system when you can replace it?
    jes5199
    • 18,324
    • 12
    • 36
    • 40
    1

    Python 3

    • both tabs & spaces allowed for indentation
      And you'd think people learn from the past (Makefile). Just pick spaces and forbid tabs. YAML got it right.
    • lack of popular third-party libraries
      The standard library is great, but a lot of what makes Python 2 so powerful lies in the third-party realm. Python 2 got this right :-).
    • IEEE floats
      Floating points in programming languages are confusing because they're different from the way we use them in math. Instead, the number operations should be viewed as expressions that are only converted to a decimal point format when needed (i.e. printing to a screen). Maple and Mathematica did this right I think.
    • the character set for identifiers is too restricted
      list.empty? is better than list.is_empty or even len(list) != 0. Similarly, process.kill! would be better than process.kill. Ruby and lisp got this right.
    • when calling a function you must always write parentheses
      It would be nice if we could omit them in unambiguous cases. How is it again? dict.items or dict.items()? Ruby got this one right, too.
    Tomas Sedovic
    • 42,675
    • 9
    • 40
    • 30
    1

    Python:

    1. No standard GUI toolkit (the community goes round and round about this but never seems to settle on anything).

    2. The evolution of tools and methods to distribute and install Python apps and libraries has been, well, rocky. (Although lately this seems to be moving closer to getting fixed.)

    3. CPython is still slow as interpreters go (although PyPy is looking pretty good these days, if it becomes the "standard" Python this problem goes away).

    4. You can't subclass built-in classes (e.g., list and dict) without overriding a lot of methods, even if all you want to do is a simple hook into an event (e.g., to hook into an item being added to or removed from the list, you need to override delitem, append, extend, insert, pop, and remove--there's no subclassable "change" event notification, nor any "protected" methods that factor out common code used by all the above methods).

    5. Up until virtualenv was invented, keeping separate Python environments for different purposes on one machine was a real pain.

    1

    Java - no support for composition on language level

    Rostislav Matl
    • 4,294
    • 4
    • 29
    • 53
    1

    Ruby

    1. No type inference
    2. Methods/functions are not first-class objects
    3. Scope of variables is not lexical although scope of block variables is lexical
    4. def inside def
    5. the difference between super and super()
    1

    Java:

    1. Very inconsistent.
    2. Graphics APIs are sometimes a pain to use
    3. NullPointerExceptions don't tell you what's null
    4. Programs I write sometimes don't work on a different JVM which is a huge pain and contradicts Java's "Write once, run anywhere" statement.
    5. Swing isn't as good as it should be.
    TomLisankie
    • 3,785
    • 7
    • 28
    • 32
    1

    I feel that a favorite language is impossible to choose. Dynamic typing and static typing can't quite be compared, so I'll just list which of which I use

    C++:

    • Template metaprogramming syntax is ugly. An implicit ::value would make it much more concise
    • ->. Why can't the compiler figure out that I'm doing a ptr.thing and just do -> for me?
    • I hate whitespace. So the whole vector<vector<int>> has to be vector<vector<int> > makes me get the jitters and then I can't focus whenever I see that line of code and I end up trying to figure out a way to use int[][] or something
    • Macros. I personally love the concept of macros. But with C++, I that the system is a hack
    • I'm a hater of ;

    Python:

    • Strings being immutable. Makes it so I can't just do string[4]="b"
    • Lists being implicitly copied by reference. Which leaks into [[0]*width]*height issues
    • Lack of tail recursion (I had to rig IDLE to not spit out 1000s of error messages whenever I mistyped a recursive function)
    • Dictionaries keys not accepting lists/dicts
    • Lack of deep scopes. When I do a list comprehension, I don't want the variable in it to affect the outer scope
    Sam Harwell
    • 97,721
    • 20
    • 209
    • 280
    Demur Rumed
    • 351
    • 3
    • 9
    1

    I can add another one for Python:

    Given a list l = [l1, l2, ..., ln], then repr(l) = [repr(l1), repr(l2), ..., repr(ln)], but str(l) != [str(l1), str(l2), ..., str(ln)] (str(l) = repr(l)). This was decided because there could be obscure entries in the list like l = ["foo], [bar,", "],["] and str(l) would return "[foo], [bar, ], []" which "could confuse users". However, this makes str impossible to use for just dumping data, since list kills the "just dump data in a readable format". Augh!

    Jon 'links in bio' Ericson
    • 20,880
    • 12
    • 98
    • 148
    Tetha
    • 4,826
    • 1
    • 16
    • 17
    1

    MEL (Maya Expression Language):

    • Single dimensions arrays: Forcing me to manually sync two or more lists, or use delimited strings to simulate more complex data structures. Naturally, they're immutable too.
    • Single threaded and slow: Causing the entire Maya application to hang while it completes a task. Bonus points for not being able to kill long operations, instead having to close and re-open Maya.
    • Script sourcing paths aren't recursive: Meaning every directory you want to store scripts in must all be added to the script path.
    • No namespaces: Forcing the inconsistent use of naming conventions to make sure global procedures don't collide.
    • Modal commands: Each command is modal, meaning the Create, Modify, and Query operations are all handled by setting flags. This also forced the developers to cause most of the commands to return arrays
    • Inconsistent command style: Most array commands actually return arrays, but the Tokenize command has to take an array as a reference which it then populates, rather than spitting out an array. This among other inconsistencies.

    These and several other reasons are why AutoDesk adopted Python as a secondardy scripting language, which brings up a few other annoying factors:

    • Not all MEL commands are supported: Most are, but every now and then you find yourself having to use the mel() function to execute some arbitrary code. What's worse is all the annoying escaping you have to do to it.
    • Inherited the modal command style: Gotta use the same create=True, query=True, edit=True stuff.
    Soviut
    • 88,194
    • 49
    • 192
    • 260
    1

    C is my favorite but it is also horrible.

    • It has the worst pre-processor ever. Why didn't they use something like m4?
    • The whole header vs source file model is broken. Pascal got it right with units.
    • It needs case ranges in the switch statement.
    • Unions and casts from void* break the type system. This makes garbage collectors impossible.
    • No nested functions. GNU C has this, but it should be standard.
    • No boundary checking for allocated memory. There are tools that discover this but they don't detect errors where a piece of code miscalculates an address and writes to an allocated region which isn't related at all. I hate the whole pointer arithmetic.
    • No bounds checking for arrays.
    • Too many issues regarding portability. Even wchar_t differs across platforms.
    1

    REBOL

    REBOL is among my favorite languages. I can't say that I have a favorite, though Haskell ranks pretty high as well.

    1. Its odd syntax scares off many developers before they even give it a try.

      use [email rules url] [
      
      
      ; A small DSL that sends email to people about URLs.
      rules: [
          some [
              into [
                  set email email!
                  set url url!
                  (send/subject email url reform [ "Check Out" url ])
              ]
          ]
      ]
      
      ; Global context
      notify: func [ [catch] dsl [block!] ] [
          unless parse dsl rules [
              throw make error! "You screwed up somehow."
          ]
      ]
      
      ] notify [ [ a@b.com http://www.google.com ] [ b@c.com http://www.yahoo.com ] ]
    2. Recursive dialects are very easy to validate with PARSE but very difficult to evaluate. (Stacks can be helpful here.)

    3. REBOL has very poor integration with many popular technologies, particularly XML. I suspect this is partly arrogance, because the REBOL BLOCK! datatype can do almost everything XML can do. However, the real world has XML in it.
    4. No Unicode.
    5. Thanks to AltMe, REBOL's user community is very insular. I can understand why they want to use AltMe. It's written in REBOL and shows off its strengths. Unfortunately it also puts them off on their own little island.

    The upcoming REBOL 3 will hopefully fix many of these issues, except for the last one.

    Gregory Higley
    • 15,923
    • 9
    • 67
    • 96
    0

    C#

    5. The null-coalescing operator

    The ?? operator allows you to write:

    x = y ?? z;
    

    instead of:

    x = (y == null) ? y : z;
    

    I like this operator, but I want another one:

    x = y ??? y.foo() : z.foo();
    

    instead of

    x = (y == null) ? y.foo() : z.foo();
    

    I use this kind of thing all the time, and I find it annoying to type the == null part.


    4. Equals should have better support

    I have having to start every Equals(object obj) method with: MyClass other = obj as MyClass; if (other == null) return false;

    You should only have to write:

    public override bool Equals(MyClass other) {...}
    

    And the language should take care of providing the Equals(object obj) method.
    NOTE: other should be guaranteed to not be null.


    3. Cannot use ternary operator with different types

    This doesn't compile, and I think it should!

    string foo = "hello";
    int bar = 4;
    object baz = foo == null ? foo : bar;
    

    2. Lack of namespace private

    I like the internal protection, but I wish there was a protection which would only allow access from within the same exact namespace. This would be nice to better control access in large class libraries.


    1. No multiple inheritance

    I really only use implementation (class) inheritance for default implementations of an interface, but there are plenty of times when I want to do just that.

    tster
    • 17,883
    • 5
    • 53
    • 72
    • 2
      Your first one is actually easy to implement with the null coalesce operator: x = (y ?? z).foo(); I also tend to do this alot with ToString and an empty string: x = (y ?? "").ToString() – Pete McKinney Jan 07 '10 at 13:56
    0

    HyperTalk:

    • Died long long ago
    • No simple assignment (you can't just say a := 3, you have to say put 3 into a
    • No nested functions
    • No real data structures, just strings. To make "lists", you delimit items with the itemDelimiter and escape them manually. You can also get lines and words like get word 2 of line 5 of txt

    As an aside, I think one of the coolest features unique to HyperTalk is the special it variable:

    ask "How many years old are you?"
    answer "You are " & it*12 & " months old."
    
    Joey Adams
    • 41,996
    • 18
    • 86
    • 115
    0

    Python

    • No namespaces.
    • Pseudo-private attributes / name mangling (mostly with getattr).
    • Filepath manipulation is spread across multiple modules. Stringing together os.path calls is ugly, difficult to read, and in most cases, violates DRY. Common filepath operations still don't have convenience functions, like getting a list of files in a dir. The path - type module to fix this was rejected.

    ([f for f in os.listdir('/file/path') if os.path.isfile(os.path.join('/file/path', f))])

    • Python documentation (I'm very, very, very grateful there is documentation at all, and that it is formatted so nicely, but I hate wading through 5000 lines of quick-start usage examples to find the individual function documentation for particular modules (I'm looking at you optparse and logging)). Built-in types are documented piecemeal in nearly 10 different places.
    0

    Lua

    • If you do foo.bar(1,2) then 'self' is nil inside the bar method. You must remember to do foo:bar(1,2) instead. I'd rather have that switched ('self' should be defined by default unless you use the ':' operator, or you call a function that isn't a method).
    • Variables are global by default. I'd rather ditch the 'local' keyword and have a 'global' one instead.
    • Undeclared variables are assigned the nil. I'd rather receive an error message. You can sidestep this by manipulating the global env's metatable, but I'd rather have it implemented by default and be able to deactivate it.
    • Multiple returned values on parameters are not handled very nicely. Say you have a function foo() that returns 1,2,3 (three values) and bar() returns 4,5 (two values). If you do print(foo(),bar()) you will get "1,4,5" ... only the "last" tuple is expanded on calls.
    • The # (table length) operator only works in tables indexed with continuous integers. If your table isn't like that and you want to know how many elements does it have, you need to either parse it with a loop, or update a counter each time you insert/remove an element from it.
    kikito
    • 51,734
    • 32
    • 149
    • 189
    • You can use an environment-based function to dodge #2 by creating a function that will automatically set all new files to their own env. This doubles as a file-cache. I'm surprised you didn't add "incredibly poor CAPI" to the list. – Puppy May 04 '10 at 09:59
    • Well, those where the 5 that bugged me the most. I don't use the C API. – kikito May 05 '10 at 08:22
    • re 1: the problem with that is that you have one data structure for everything (including classes) and a class is just a special table. Thus, you're just calling a function in a table to lua. Though having the environment set itself to whatever you're in (instead of a global scope) on function call would be nice. – RCIX Jun 02 '10 at 04:51
    • @RCIX: I'm sorry, I don't follow you. What does "you're just calling a function in a table to lua" mean? – kikito Jun 02 '10 at 07:14
    • Yea, i didn't word that very well. I meant to say, "to lua, "you're just calling a function in a table" – RCIX Jun 03 '10 at 07:46
    • I see. On point 1, I didn't mean that the "not self" behaviour should be eliminated from the language - I said it should be switched; so foo.bar(1,2) passes "self" and foo:bar(1,2) doesn't pass self. I believe that the first is the most common case, and should use the most common syntax. – kikito Jun 03 '10 at 10:09
    0

    I just discovered I cannot use Enum as a type constraint when creating a Generic method in c#.

    Microsoft has a good enough explanation as to why, but still. I'm MAD

    public static T MyFunc<T>(string arg) where T:Enum //wont work :(
    
    Midhat
    • 17,454
    • 22
    • 87
    • 114
    0

    JavaFX

    • Type inference sometimes doesn't behave like you would expect, so you often need to explicitly declare the type.
    • def behaves likes const in C and not final in Java
    • you can insert a value in a sequence by accessing an index >= seq.length, which should actually throw a compiler error (according to the reference).
    • if you assign null to a String, it defaults to "". If you assign null to an Integer, a compiler error is thrown (in contrast to what the reference says).
    • handles CheckedExceptions the same way as RuntimeExceptions
    helpermethod
    • 59,493
    • 71
    • 188
    • 276
    0

    C#

    • Cannot create a reference (var &t = struct)
    • No local scope destructors (IDispose comes close but its not the same)
    • ToString, i almost dislike that every object has it but it turns out i dislike everything using it like string.format does. I rather have things that accepts a certain type (like ints, floats, text, chars only). So instead of passing in any object i need to pass in something with a implicit typecast or interface. I ended up writing something like this to safely escape text for html which worked great.
    • Cannot use a virtual typecast (blah)obj; does not work if obj does not inherit/has an interface of blah. Simple workaround is to supply an interface with a convert function.
    • Has no local creation. Instead of writing var o = new Item(); i would like to write (something like) Item o() (with an automatic dispose if it has one).
    0

    VB.NET

    1) If Not x Is "foo" (instead of <> "foo")
    2) "OrElse" and "AndAlso" short circuit (instead of simply "Or" and "And", which act differently)
    3) Nothing (instead of Null)

    Techgration
    • 516
    • 4
    • 16
    0
    • The length property is easily confused with the length() function; use size() instead
    • The syntax to interpolate variable in selector strings('" +$.month+ "') stinks
    • $(event.currentTarget) does not always work for bubbling and capturing
    • attribute syntax works ("[class='foot']") in places where selector syntax (".foot") returns nothing
    • Contains selector ([class~=done]) sometimes fails where JavaScript (this.className.search("done") > 0) works
    kennytm
    • 510,854
    • 105
    • 1,084
    • 1,005
    0

    Python:

    • no delimiter signaling the end of blocks introduces ambiguity such that automatic indentation will not work with poorly formatted code.
    • no macros (decorators don't count)
    • no library auto-fetch like haskell's cabal, or perl's CPAN
    • can't declare variables const (yeah it's possible to role your own but ... )
    • meta-programming is nerfed
    • almost forgot the Global Interpreter Lock
    drhodes
    • 1,009
    • 1
    • 10
    • 17
    0

    I have only one but I believe it worth sharing.

    CSharp / .NET

    We have Length property to get number of elements in array and Count property to get number of elements in collection. It looks more stranger if you consider the fact that CLR automatically adds IList, ICollection, IEnumerable to zero-based one-dimenssonal arrays behind the scene.

    I believe CLR team and BCL team had hard times discussing this subject ;)

    Andrey Taptunov
    • 9,367
    • 5
    • 31
    • 44
    0

    Object Pascal:

    • There's a lot of jumping back and forth in the file you're editing since the interface and implementation are split into two parts but still jammed into the same file.
    • Dynamic indexing of arrays, strings start at 1, you specify the starting index when declaring fixed arrays and dynamically allocated arrays always start at 0.
    • Classes and objects (not to speak of interfaces) are bolted on top of the language and among other things can't be stack allocated like records can.
    • When calling functions without parameters the () are optional, leading to a lot of pain when you are dealing with function pointers or trying to refer to the result of a function using the function name.
    • Parameter lists can't handle fixed array types or function pointer types without external type definitions.

    This is just the language, the sorry excuse for a standard library and flaky IDE deserve their own lists.

    0

    Objective-C 2.0

    Sticking strictly to the language and runtime, and not the libraries, and not in any particular order:

    1. Lack of cVars.
    2. No modules. I'm not terribly unhappy with a lack of namespaces, but modules would be nice to have.
    3. Ivar-based property syntax requires declarations using the variable name in 3 places. It's fairly hideous.
    4. C heritage. Anything to hate about the C language, except for OO and GC, is present.
    5. Objects can't live on the stack. Not a problem with Obj-C so much as what it does to programming practices in other languages. I find it strange when I get a return value on the stack in C++, for instance. If I'm not actually looking at the library documentation when I write the code, I'll assume that every function returns a pointer, which often makes for some siginificant cleanup later.
    icodestuff
    • 340
    • 1
    • 11
    0

    Python:

    1) line continuation syntax: "...\" works, but "...\ " does not, and that trailing space is generally invisible, without unusual eol-marking by editer.
    2) a bare 'raise' is invisible in the stack trace, as the stack trace looks like the previous raised exception.
    3) slow
    4) poor integration into web-servers (mod_python: dead, mod_wsgi: limited scope of operation). This is complicated by 3], requiring daemonization or some sort of memory-persistance to perform well.
    5) overly tolerant of mixed tabs and spaces, allowing changes to control flow to sometimes remain hidden. (maybe fixed in recent versions)

    Rdbhost
    • 929
    • 2
    • 8
    • 20
    0

    The lack of a preprocessor in C#.

    I know they left it out because some folks can abuse it, but I think they threw the baby out with the bathwater. Code generation is regarded as a good thing, and in C++ the preprocessor was my first-line code generator.

    Mike Dunlavey
    • 40,059
    • 14
    • 91
    • 135
    • 1
      -1, it's essentially a bad thing. That another language has it, does not mean it is a good thing to include in C# – oɔɯǝɹ Jul 12 '09 at 20:55
    • @oɔɯǝɹ: Bad thing? Who told you that? Professors will say anything. I was one. Just because the inventor of Java thought it was too hard to do and found a way around some of its uses, does not mean it doesn't have some really good uses. One thing these kinds of people don't tell you is how to think for yourself. – Mike Dunlavey Jul 13 '09 at 12:25
    • You want C's preprocessor? It's just a simple text replacer. If anything I want real lispy macros like you can find them in Nemerle (a very C#-like language for .net as well). – helium Jan 04 '10 at 15:34
    • 1
      @helium: no contest. Lisp macros are the best. – Mike Dunlavey Jan 04 '10 at 19:40
    0

    Lua:

    • The built-in error system is absolutely horrendous

      You can implement a try-catch system by modifying the Lua interpreter; but it has no compatibility with the errors that are thrown by the built in functions.

    • The fact they have __newindex instead of __setindex as the setter

      ... and __newindex is only fired when the key doesn't already exist. If it does, no metamethod is called at all.

    • No good type comparison system.

      There's the type() function but it only handles the basic types (all tables are tables). It really needs to have a metamethod for type comparisons. I've implemented this before with an 'is' operator and a __type metamethod and it works really nicely.

    • It's a bitch to define new keywords.

      You can do it, but the code inside Lua isn't well documented so it's kind of trial and error to find out how to get the result you want. This is a major issue when you want to implement the things I mentioned above yourself (not so much __setindex though, that's an easy modification).

    • I can't use it in a web browser.

      Yeah not really a problem with the language itself, but damn, would I love to be able to use Lua instead of Javascript... :)

    June Rhodes
    • 3,047
    • 4
    • 23
    • 29
    0

    C

    • String handling
    • Memory management (making a decision about who should allocate and who should free it)
    • No namespaces (the biggest)
    • No lists/arrays and other basic DS in standard library


    JavaScript

    • Using a variable without var automatically makes it global
    • Semicolons are not mandatory
    • Comparison operators "==" and "===" and confusions about their usage
    • No proper support to work on binary data
    • Again.. No namespaces
    • Variables don't have block scope. (Quite irritating coming from C world)
    Manish
    • 1,985
    • 2
    • 20
    • 29
    0

    Java:

    • No procedural coding, it compiles into procedural code, So let me Use it!
    • No multiple inheritance, trying to do the same thing with 15,000 intefaces suck.
    • Date class, do I need to say more.
    • That I cannot use polymorphism to it full extent. Java will not override with different parameter types being to trigger.
    • I cant think of a fifth reason,if I do i'm come back and edit this post.
    WolfmanDragon
    • 7,851
    • 14
    • 49
    • 61
    0

    Python:

    1) It's a scripting language and not a fully compiled one (I'd prefer to be able to compile binaries—I don't care about bytecode). This is very annoying if I have to use very many libraries (i.e. everyone who uses my program has to install all the libraries, and this basically means no normal people will be able to, or have the patience to, properly set it up—unless I do a ton of work that should be unnecessary). I know ways to make binaries, but they don't always work, and I'm guessing they bundle the interpreter in the binaries anyhow (and I don't want that). Now, if I could get a bytecode compiler that would include copies of all the files that I imported (and only those) to be placed in my program's folder, that might be a suitable compromise (then no one would have to download extra libraries and such). It would also be nice if the compiled python files could be compressed into a single file with one specified as the file to run the program before this is done.

    2) It seems a bit buggy at times; there have been a few times when code that was supposed to work simply did not (there were no programmer errors), particularly code relating to such as "from moduleX import *", and other import-related issues, as well as some issues pertaining to global and local variables.

    3) Maximum recursion depth could be higher. There has been at least one time when I felt that I needed it to go higher.

    4) No switch statement (let alone one that allows for numbers, strings and ranges)

    5) The newer Python versions seem to be doing away with a lot of useful string operations, and they don't seem to have simple documentation on how to do the same things without them.

    6) Forced automatic garbage collection (I'd like to be able to do it manually, although not necessarily forced to do so).

    7) No pre-made Timer class without the use of a GUI (well, there might be one, but after all the searching I've done, it's sure not convenient to find! I actually did find something, but it didn't work at all when I tried it.) By a timer, I mean the sort that will execute a specified function every x seconds, with the ability to turn it off when desired, etc.

    8) People in the community who give examples rarely tell what modules they imported, and how they imported them.

    9) There's not a lot of support for integration with Lua.

    10) There doesn't seem to be a way to add an extra function to a particular instance of a class (and not the entire class at large), unless you dynamically add an object variable to that class with the object having the needed function (but still, you have to make another class just for that).

    • for #10: if c is an instance, and f is a function, then c.newFunction = f.__get__(c) -- Just don't forget that f needs to have 1 extra argument (self) – Ponkadoodle Feb 07 '10 at 22:10
    • 3. sys.setrecursionlimit(limit) -- 4. Thank god for no switch statement! -- 5. You mean the string module? All those operations are available as methods on string objects. -- 6. gc.disable() Believe me, you don't want to do it manually. Just one session of debugging gc problems and you'll know what I mean. -- 7. +1 Though pyqt does this pretty well with QTimer. -- 8. You must not have been looking on SO. -- 9. ?? -- 10. Sounds like a terrible idea, but you can add staticmethods to instances at runtime. For bound methods, this could be done with overridden `__new__`, or `__metaclass__`. –  May 04 '10 at 09:06
    • You can easily add a method to a class with `Class.method = some_method`. I just tested it with IronPython, and I think it works with CPython as well. – Bastien Léonard Jun 01 '10 at 13:59
    -1

    VB.NET

    • Weakly typed by default (Option Strict fixes this, but it's not on by default)
    • Does not require parentheses on methods (myFunction instead of myFunction() and so on)
    • Does use parentheses for array definition/use (myArray(12) instead of myArray[12])
    • Does not support direct incrementation (i++)
    • Does support legacy On Error keywords and the whole VB6-Namespace
    Bobby
    • 11,419
    • 5
    • 44
    • 69
    -1

    C# 4.0

    The "dynamic" keyword, ripe for abuse. If you want/need to use Reflection, use and make it obvious that you're using it, don't try and disguise it with dynamic.

    Chris L
    • 669
    • 2
    • 10
    • 21
    • 1
      -1: there are very valid uses for dynamic (and goto and var and break and for and if and...), plus that's not 5 things. – RCIX Jun 02 '10 at 04:36
    -1

    Python

    • slow
    • I finally got used to the print statement, and now there's this print function??? (py3k)
    • never got py2exe or cxFreeze working
    • not standardized (minor nitpicking)
    • recursion depth only 100 (iirc)
    Andrew Szeto
    • 1,199
    • 1
    • 9
    • 13
    • The default recursion limit is 1000, try: `sys.getrecursionlimit()`; and you can change it with: `sys.setrecursionlimit()`. – Don O'Donnell Dec 28 '09 at 07:59
    -2

    Things I hate about Python:

    • there's no compiler
    • it's not taken seriously

    Things that annoy me about Python:

    • (self,
    • no private
    • breaking compatibility


    Five things I hate about PHP:
    • "working as intended" when it's plainly a bug
    • no goto
    • bugged references (foreach $arr => &$val ... foreach $arr => $val)
    • no multiple inheritance
    • no compiler that really works without having to sacrifice a lamb to a dark god
    Peter Mortensen
    • 30,738
    • 21
    • 105
    • 131
    o0'.
    • 11,739
    • 19
    • 60
    • 87
    • 1
      The goto thing got me amazed. Can you explain why not having it is a bad thing? – kikito May 07 '10 at 14:49
    • 1
      `goto` is sometimes useful. Many people don't know how to use it, use it in a bad manner, abuse it, or blindly teach other people that `goto` is the Dark Lord Satan. It isn't. It's just a tool, which you have to know to use properly, that's all. Anti-goto crusaders are just retarded people that don't know how to do something hence want nobody to be able to do it. – o0'. May 07 '10 at 15:36
    • 1
      The goto operator is available as of PHP 5.3. http://php.net/manual/en/control-structures.goto.php – nico May 12 '10 at 19:00
    • What's wrong with the references. You put an "&" in there and it's a reference. Without it, it's not. Where's the problem? – selfawaresoup May 23 '10 at 11:46
    • they are bugged: http://bugs.php.net/bug.php?id=29992&edit=2 – o0'. May 24 '10 at 17:13
    -2

    SAS

    • Never has own ideas (every thing is borrowed).

    • Greedy for huge datasets.

    • Uses Java, but never learned what it is to be an object.

    • Steals Perl, but hide it in its data step.

    • Lie always with statisticians!

    Peter Mortensen
    • 30,738
    • 21
    • 105
    • 131
    john
    • 2,572
    • 11
    • 35
    • 51
    -7

    Perl represents a horrid language.

    1. No "public" or "private" or "protected" declarations/definitions.
    2. The "my $variable_name;" does not declare a global outside of a subroutine.
    3. The "my $variable_name;" gets accessed by subroutines but "use strict;" or other "use " creates warnings.
    4. Function prototypes end up unexplained, undemonstrated, unwanted, or some other excuse.
    5. Overzealous symbol use ends up "cool and quick" when reading globs of symbols.
    6. When one gets hot they like to stay hot, and need nothing to cool them.
    7. After a week of Perl, I end up unable to write a function and prototype it.
    8. What exactly is a module and does it actually NEED a ".pm" extension?
    9. If you want to create a public variable and access it from inside a subroutine, how do you accomplish this without creating a warning?
    10. Where do you find some neat scripts that teach one some neat Perl?
    • The my variables specifically do not create global variables. That's the point. If after a week of Perl you can't write a function, you weren't using Learning Perl. A module is a library, and the .pm extension is automatically added to the filename that use and require look for. – brian d foy Dec 25 '08 at 21:21
    • It sounds like you nay be writing Java or C++ in Perl. You should write Perl in Perl, and leave Java to Java :) Since Perl isn't your favorite language, you don't pass this test :) – brian d foy Dec 25 '08 at 21:22
    • He didn't say Perl wasn't his favorite language. Just that he hates all aspects of it with a passion. Maybe other langagues are even worse. – Beska Apr 10 '09 at 13:27