Which language is the least bad?



  • During my brief years on TDWTF, I have watched every programming language or technical syntax I've been aware of (yes, even our beloved Go) being torn down.

    I would like to unify this forum's opinions and decipher the least bad programming language.

    Personally I'm interested in anything which can be used for a web service (which I think is all of them) but databases are good too (I don't need a list of WTFs on MySQL because I went to a seminar about them relatively recently, but if you fancy posting such for your own entertainment, be my guest).

    I'm most interested to hear the precise issues with PHP, Java, Node, Postgres and Mongo, but obviously anything you hate with a passion is good too.

    Warning: This thread may spawn a poll.



  • @Shoreline said:

    I would like to unify this forum's opinions

    How about starting with realistic goals?



  • Some people over here somehow seem to have the least of a dislike towards the CLR and related languages, which, thanks to the helpful development tools, I have to agree with.

    The System.Web runtime, however, may or may not be a legacy-compatible mess.



  • Yup, the answer to this is simple: C#
    The only question is can you go Microsoft or does it have to be *nix.



  • PHP has two main issues: it lets people who shouldn't touch a keyboard write code, and it was designed by committee (and a schizophrenic one).

    Answering the question in general, there aren't bad languages, only it might not be best suited for the task at hand.
    A good design in the hands of a good programmer results in good software.



  • Does the quality of the standard libraries count or is it just the language itself?



  • PHP has two main issues: it lets people who shouldn't touch a keyboard write code, and it was designed by committee who shouldn't touch a keyboard, especially not to write code.

    Answering the question in general, there aren't bad languages other than PHP, only it might not be best suited for the task at hand.

    FTFY



  • In this forum, the least bad programming language will be something by Microsoft, so probably C++ written in Visual Studio (C# is too much like Java).



  • Mono is viable enough unless you need to listen on TCP sockets as that part of Mono tends to crash and burn pretty bad under light load (i.e. 3000+ connections, using AcceptAsync/ReceiveAsync pattern).



  • platform independence is too hard though, although C++11 made some common tasks easier it's still not all that you need 😞



  • But ... there is only one platform you would want to run your application on.



  • Ok, I don't have much experience with Mono, but I presume it's not as good of a platform as .NET on Windows. Although it seems MS recently included them into the official development process, so we can expect improvements all around.

    Issues with PHP: Read this and forget PHP ever existed.

    node.js: Javascript becomes a problem in bigger projects. A bit of a memory hog.

    Java: Seems people don't like its formal verbose nature, although I have fond memories of it.

    Postgres: Has a bunch of nice features, but they all feel unfinished in some way. Otherwise, pretty good.

    Mongo: Doesn't scale as well as people hoped, it's nice to play around, but would you really trust your core data to it?


  • I survived the hour long Uno hand

    The problem with .net developers is that having been weaned by the helicopter mother that is Visual Studio, many of them never learned to think through a problem themselves. As a language, C#.NET is pretty nice (the conventions can be annoying for me personally but that's because I prefer to write Java-style), but I find it impossible in practice to separate a language from its developers (see: PhP).

    Java tends to be old enough that people used to The Ruby Way or The Javascript Way are habitually annoyed by not only the verbosity but also the lack of features. But Java 8 added a lot of them in, so maybe that's going to shake out soon



  • @Yamikuronue said:

    Java tends to be old enough that people used to The Ruby Way or The Javascript Way are habitually annoyed by not only the verbosity but also the lack of features. But Java 8 added a lot of them in, so maybe that's going to shake out soon

    I don't know, I almost feel like this verbosity may be a plus in some cases. Makes people stop and think what they're doing, instead of just blasting away reams of code in some high-level expressive language. May foster better architecture. On the other hand, if overdone, it may also lead to stuff like this.


  • I survived the hour long Uno hand

    @cartman82 said:

    I don't know, I almost feel like this verbosity may be a plus in some cases. Makes people stop and think what they're doing

    I agree wholeheartedly. But I work with a bunch of JS cowboys who shudder at the idea that they might need to declare getters and setters instead of making everything public all the time.



  • I forgot to ask about Python. How does python fare in all this?



  • @cartman82 said:

    Java: Seems people don't like its formal verbose nature, although I have fond memories of it.

    I really don't mind the verbosity. I just with it wasn't done with fucking camel case every-goddamned-where.


  • area_deu

    @boomzilla said:

    I really don't mind the verbosity. I just with it wasn't done with fucking camel case everyGodDamnedWhere.

    CCTFY



  • @Shoreline said:

    I forgot to ask about Python. How does python fare in all this?

    Python seems to be rare here, so you probably won't get many responses. But I will say that I use Python and I can't think of any problems with it. Although that's Python 3 I'm talking about.



  • @cartman82 said:

    I don't know, I almost feel like this verbosity may be a plus in some cases. Makes people stop and think what they're doing, instead of just blasting away reams of code in some high-level expressive language. May foster better architecture. On the other hand, if overdone, it may also lead to stuff like this.

    Yes, the verbosity is somewhat painful to deal with as a writing task, but for me makes reading code easier. I read code a lot more than I write code.

    I won't deny getting a bit of pleasure and accomplishment from decoding some clever C++ shenanigan (or coming up with my own), but that's not the same thing as productivity.

    I'm sure a C# partisan will come along and tell us it's a better compromise, and they may be right. I haven't done anything in C# for probably about a decade.



  • @aliceif said:

    @boomzilla said:
    I really don't mind the verbosity. I just with it wasn't done with fucking camel case everyGodDamnedWhere.

    CCTFY

    FLAGGED



  • It's hard to get a handle on a question like this. I think F# might have the lowest ratio I've seen of how often it's complained about to how often it's mentioned, at least above the threshold of languages I've heard of outside of "hey, here's a language you may never have heard of."



  • @Shoreline said:

    I forgot to ask about Python. How does python fare in all this?

    Python is about as non-WTF as you'll ever see from a dynamic language. It's syntactically clean, easy to keep in one's head, and not hard to learn, but with a community that's strong enough to herd the newbs towards correctness, a standard library that's more-or-less consistent (unlike PHP's mishmash) and supportive of best practices (the reason you don't hear about a PyUnit is because it's called unittest, and it's part of the standard library, see also the Python DB-API spec), and a type system that actually does something useful (unlike say PHP's or JS's).

    Only major gripes are how slow the Python 2 to 3 transition is (right now, it's definitely feasible to support both 2.7 and 3.3, and most of your mainstream libraries either already support 3.x or have a transition plan underway, but pre-2.7 Pythons are still far too common...), and people who pointlessly fly off the handle about Python using indentation as syntax. Do you really need to wear { } just to indent your code, folks? Deployment's also something of an issue, but that's more because people have built on the buttumptions of deployment induced in them by either C#, Java, or PHP, than due to an inherent fault of the Python ecosystem.



  • @tarunik said:

    and a type system that actually does something useful (unlike say PHP's or JS's)

    i.e. ending up with every implicit type conversion being a runtime error



  • @tarunik said:

    , and people who pointlessly fly off the handle about Python using indentation as syntax. Do you really need to wear { } just to indent your code, folks?

    There's nothing pointless about it. Python adds ambiguity and makes it more difficult to format code however the fuck I want to see it.


  • area_deu

    But formatting code your way is doing it wrong!



  • @boomzilla said:

    There's nothing pointless about it. Python adds ambiguity and makes it more difficult to format code however the fuck I want to see it.

    What do you mean by it "adds ambiguity"?



  • @Zacrath said:

    What do you mean by it "adds ambiguity"?

    You have to worry about spaces and tabs and what happens when they're mixed. I'm sure seasoned python devs have honed their whitespace skills so they rarely need to worry about this, but it's bullshit that I don't want to have to deal with.

    In (ObPedanticDickweed:most?) other languages, there is no ambiguity. It's either whitespace or it isn't.



  • I think C# holds up the best.



  • @NTAuthority said:

    The System.Web runtime, however, may or may not be a legacy-compatible mess.

    Someday I'm going to find the guy at Microsoft who decided that a 404 or 500 should throw an exception and strangle him with his own intestine. A 404 or 500 in response to a WebRequest isn't an exception, it's what you fucking expect to get from a fucking web server!!!



  • @boomzilla said:

    You have to worry about spaces and tabs...

    It sounds like you don't need to worry about linting code because instead of a linting error you get a syntax error, is that correct? I can imagine if you don't like the lint standard anyway, or python's syntactical standard, this could be a trigger of some kind.



  • @Yamikuronue said:

    Java tends to be old enough that people used to The Ruby Way or The Javascript Way are habitually annoyed by not only the verbosity but also the lack of features. But Java 8 added a lot of them in, so maybe that's going to shake out soon

    I quite like Java - what I don't like is that at work I have to develop for Java 1.4 because our stone age middleware simply doesn't run on anything newer.
    We also get the joy of Clearbasic which could populate an entire forum on its own with WTFs.



  • C# is easily the least bad language I've used. Python is #2 once I set up Notepad++ to use 4 spaces for indents instead of tabs...until then lots of "Unexpected indent at line 343" errors.

    Objective-C is the worst language I've used, and C++ is a close second. Strangely I don't mind straight C at all.



  • @Shoreline said:

    I forgot to ask about Python. How does python fare in all this?

    My impression of Python is that it's a very good language, but:

    1. The tooling suuucks. Python's been around since 1995, and I couldn't find a decent IDE for it in Windows. What. The. Fuck.

    2. All the libraries are redundant, disorganized, and out-of-date. My Python data puller app thing had to talk to a SOAP service. Go find a SOAP library that works in the current Python. There's like 4 that claim to, but AFAICT, zero that actually do. Finding the actual source for one is a horrifying maze of links to outdated web pages and search results, there seems to be no centralized place to find Python libraries or documentation at all. (Or they don't consider something as simple as SOA* support "core", which is fucking awful.)

    3. The Python 2 -> Python 3 thing is still the world's biggest clusterfuck of bad ideas.

    EDIT: oh right, someone mentioned up above but to reiterate: no compile-time error-checking. Yes, yes, I know that this applies to a shitload of languages, but in Python is feels much more annoying. If a good IDE with red underlines existed, this would be less of an issue. But as-is, every goddamned failure is runtime.



  • @Shoreline said:

    It sounds like you don't need to worry about linting code because instead of a linting error you get a syntax error, is that correct?

    I have no idea.



  • @boomzilla said:

    You have to worry about spaces and tabs and what happens when they're mixed. I'm sure seasoned python devs have honed their whitespace skills so they rarely need to worry about this, but it's bullshit that I don't want to have to deal with.

    In (ObPedanticDickweed:most?) other languages, there is no ambiguity. It's either whitespace or it isn't.

    You make a good point.
    Honestly, I can live with that, it's unlikely to ever be a problem. In fact source control can handle that problem automatically anyway.
    And tabs cause problems wherever they're used.



  • @boomzilla said:

    Yes, the verbosity is somewhat painful to deal with as a writing task, but for me makes reading code easier. I read code a lot more than I write code.

    I love verbose code. I will gladly read yourFiveWordVariableNames //and
    //Multi
    //Line
    //Comments

    If it explains your code!



  • const bool SET_THIS_BOOL_TO_TRUE_IF_YOU_WANT_TO_BYPASS_ALL_LICENSE_RESTRICTIONS_FOR_INTERNAL_DEV_OR_DEBUG_OR_SUPPORT_USE = true;

    setLicenseManagerState(SET_THIS_BOOL_TO_TRUE_IF_YOU_WANT_TO_BYPASS_ALL_LICENSE_RESTRICTIONS_FOR_INTERNAL_DEV_OR_DEBUG_OR_SUPPORT_USE);



  • @boomzilla said:

    You have to worry about spaces and tabs and what happens when they're mixed. I'm sure seasoned python devs have honed their whitespace skills so they rarely need to worry about this, but it's bullshit that I don't want to have to deal with.

    If your editor is smarter than Notepad, you only have to worry about it once, when you set your editor up. As a general rule, Python code is indented with spaces, see PEP8 for details.

    My experience with IndentationError (which is the flavor of error you get from Python when this stuff does bite you) consists of two things:

    • A bug in a templating library that I was using that forgot to include Python's version of an empty statement in an elseif block, a la the following invalid (or at the very least, nonsensical) C code:
    if (foo) {}
    else if (bar)
    else if (baz) {}
    else {}
    
    • And one time where I actually did mix spaces and tabs in the same indent due to switching computers and not having my editor set up correctly, which was oh, < 15 minutes of hassle, once. Also, if you really feel that's too much hassle, there's always the tabnanny to remind you.


  • @tarunik said:

    Also, if you really feel that's too much hassle, there's always the tabnanny to remind you.

    It is, and I have a simpler solution.



  • @KillaCoder said:

    I love verbose code. I will gladly read yourFiveWordVariableNames //and
    //Multi
    //Line
    //Comments

    If it explains your code!

    In that case you should love the code in this article.



  • @blakeyrat said:

    Someday I'm going to find the guy at Microsoft who decided that a 404 or 500 should throw an exception and strangle him with his own intestine. A 404 or 500 in response to a WebRequest isn't an exception, it's what you fucking expect to get from a fucking web server!!!

    At the same time it's impossible to write a main loop-based application (like, say, a game) and use non-blocking System.Net.Sockets.Socket instances and call ReceiveFrom without getting a 'would block' exception every loop iteration unless there's data.



  • Yeah whoever wrote System.Web and System.Net was a little fuzzy on what an "exception" is. Now we're stuck with it forever and ever.



  • @blakeyrat said:

    My impression of Python is that it's a very good language, but:

    1. The tooling suuucks. Python's been around since 1995, and I couldn't find a decent IDE for it in Windows. What. The. Fuck.
    2. All the libraries are redundant, disorganized, and out-of-date. My Python data puller app thing had to talk to a SOAP service. Go find a SOAP library that works in the current Python. There's like 4 that claim to, but AFAICT, zero that actually do. Finding the actual source for one is a horrifying maze of links to outdated web pages and search results, there seems to be no centralized place to find Python libraries or documentation at all. (Or they don't consider something as simple as SOA* support "core", which is fucking awful.)
    3. The Python 2 -> Python 3 thing is still the world's biggest clusterfuck of bad ideas.

    EDIT: oh right, someone mentioned up above but to reiterate: no compile-time error-checking. Yes, yes, I know that this applies to a shitload of languages, but in Python is feels much more annoying. If a good IDE with red underlines existed, this would be less of an issue. But as-is, every goddamned failure is runtime.

    1. I take it you've tried PyCharm, Wing IDE, and the VS Python plugin already?
    2. SOAP is the one RPC thing that the entire Python world hates with a passion, which at least makes the lack of libraries there understandable. Also, check out the Cheeseshop, it's Python's version of CPAN, (and it has those doc links you were after too). And yes, SOA support is considered important by the Python people, they just see SOAP as the dead wrong way to do it. XML-RPC support is part of the Python standard library, even.
    3. Agreed that 2 -> 3 is a mess, but I don't think Python would have been better off without the changes 3 brings (like Unicode-by-default: heck, the latest 3.x releases can handle non-BMP characters sanely, without screwing you over with surrogate pair shenanigans!).


  • I don't love it, but I prefer it to the majority of code I see here 😛


  • Discourse touched me in a no-no place

    @NTAuthority said:

    i.e. ending up with every implicit type conversion being a runtime error

    Which is why my least bad languages are Haskell and Ada, where every implicit type conversion is a compile-time error.


  • I survived the hour long Uno hand

    @loopback0 said:

    Java 1.4

    You poor thing. And I thought the fight to upgrade from 6 to 7 was bad!



  • @tarunik said:

    I take it you've tried PyCharm, Wing IDE, and the VS Python plugin already?

    Not sure about Wing IDE, but I tried the other two. I think I ended up eschewing PyCharm and just writing it in SublimeText, but honestly it was a few months ago and I no longer remember my exact complaints.

    @tarunik said:

    SOAP is the one RPC thing that the entire Python world hates with a passion,

    ... so the programming language doesn't support a pretty common protocol due to PERSONAL DISLIKE?

    Very professional.

    @tarunik said:

    Agreed that 2 -> 3 is a mess, but I don't think Python would have been better off without the changes 3 brings (like Unicode-by-default: heck, the latest 3.x releases can handle non-BMP characters sanely, without screwing you over with surrogate pair shenanigans!).

    The funny thing about Python is it "feels" like a modern language while you're coding, but then you come across things like, "oh BTW it don't do unicode by default" and you really get slammed in the face with, "oh right, this thing was designed in 1995."



  • @blakeyrat said:

    The funny thing about Python is it "feels" like a modern language while you're coding, but then you come across things like, "oh BTW it don't do unicode by default" and you really get slammed in the face with, "oh right, this thing was designed in 1995."

    Yeah, that's because Python learned a thing or two from its programming languages course that many other languages, invented later, didn't learn until much more recently.



  • @tarunik said:

    Yeah, that's because Python learned a thing or two from its programming languages course that many other languages, invented later, didn't learn until much more recently.

    Right but there's also a lot it didn't learn. Like, "stop that open source bullshit about not implementing a library because you personally dislike the protocol and make a programming language that's useful for actual problem solving in the actual world, idiots."


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.