Hacker News new | past | comments | ask | show | jobs | submit login
How I decide between many programming languages (drewdevault.com)
30 points by weinzierl 9 days ago | hide | past | web | favorite | 67 comments





Man, if one of Go's pros is "good package manager", I'd hate to see what terrible package managers he's experienced. Seems weird to call out Java package management as a con in comparison.

I love Scala's type system, though, I suppose if I didn't have a very good CS degree I'd hate it. I think it strikes a good balance between powerful and usable.


Scala's type system is it strength not a con, actually it is very beginner friendly just not in the way Drew thinks, it's just more high level, By that definition he could also call Clojure a Java derivative because it runs on JVM.

Java doesn't come with a package manager out of the box so most projects seem to go with Maven. If you've tried to understand a project with multiple pom.xml's then for me putting it in the con is a good call.

While this is true, it's not an inherent problem of maven, it's an inherent problem of dependency management is f*cking difficult™.

Maven is inherently bad too, though

In which way exactly? Having worked with many, many different package managers, I've come to appreciate Maven's way of doing things. Even though it has many drawbacks:

- XML structure is verbose

- Plugin architecture makes standard behaviour opaque

- Default HTTP with no package signatures is recipe for security problems

- "Stages" seem arbitrary and it's not always clear which stages are performed.

- Community seems to move to newer systems such as Gradle (and SBT for Scala).

But, there are also strengths. The configuration format can be extended easily using the plugin architecture. This provides a huge opportunity to extend the functionality.

It is battle hardened over time, which means it is very stable and it has a huge plugin architecture.


Well, I think you've covered the issues I was going to mention!

and Maven is super bloated due to too many downloaded dependencies. An Hello World example with Maven can download up to 50MB of plugins and useless things

> C++

> Pros: none

> Cons: ill-defined, far too big, Object Oriented Programming, loads of baggage, ecosystem that buys into its crap, enjoyed by bad programmers.

This is just rubbish. Fair chance the author wrote this with the help of C++ (your OS or browser maybe?). And I enjoy C++ and it's eco system as well, compared to other languages. So that makes me a bad programmer? I'm surprised people are taking this post serious.


Honestly most people I meet in real life (so not representing at all) who enjoyed C++ where technically skilled but had to fight with following problems:

- bad at keeping code simple

- to much focused on details instead of the broader picture

- bad as team leads due to missing some relevant management skills

- bad at producing solutions which where "just good enough" (instead of perfect)

Some of them where aware of their weakness and learned to improve on that areas, setting them on a path of becoming excellent software engineers.

Others where obvious about it or even in denial about it.

In a certain way they had been examples about how a person can be both a technical skilled programmer, as well as as bad programmer who on a subtile way accidentally makes it hard to produce a good end product in any reasonable amount of time.


'there is widely used software written in language x' != 'language x is good'

C++ definitely has its uses (and for a long time was best-in-class for many of them) but it is largely being superseded by other options (not necessarily Rust).


Just as an example it's really hard for me to do low level CUDA GPU programming in any other language.

I'm trying hard to use Julia, but understanding its PTX output is really hard for me, and also I don't know how to use the matrix multiplying GPU instructions.

Rust's PTX output is not supported, so I haven't really tried it.


I agree. Given that I do not like C++ and try to avoid it at all costs, it is unfair to say it does not have any advantage:

- It is available on a very wide range of platforms

- Several implementations are available

- It is updated regularly

- Etc.


>Fair chance the author wrote this with the help of C++ (your OS or browser maybe?)

Which OS would that be? Most OSes hardly touch C++, except at higher layers than the kernel.


Look, I'm wary of negative comments on HN myself, but this is just a bunch of

<Language I know way too little about>:

<Simplistic or incorrect summary of a few blog posts I saw a while ago>


I have tinkered with dozens of languages, yet, when I can choose a programming language and money is on the line, I always ask the following questions:

- Does it have a standard and a good track record for backwards compatibility?

- Is it memory safe? (Bound checking, no pointer arithmetic, etc.)

- Does the runtime have automatic memory management in the form of a tracing GC? How tweakable is it?

- Does it have kernel thread support?

- Does it have a centralized package repository?

- If typed, will the type system assist me in defining the business domain? Does it have type inference?

- If dynamic, will the development experience allow me to experiment, inspect and redefine stuff at runtime?

- Can I distribute my programs as a binary or dump everything onto an image?

- Can I go low level when it matters? How's the FFI experience and overhead?

- Does it run on the major operating systems?

Things I don't care about: Syntax, static vs dynamic typing / OOP vs FP religious wars, community size or "niceness", library count, logos, on-boarding experience aka the possibility of hiring cheap juniors.

Cute mascots are nice though. We need more of that.


What answers do you come up with for these questions?

No perfect answer yet but I am mostly programming in Go and Common Lisp these days.

I am looking forward to multicore OCaml and maybe I give F# a go.


The list may be entertaining, but displays little in the way of objectivity. For instance, OOP is a major con of C++ (even though many people write C++ all day without any of it) but isn't even mentioned with regards to Java and C#? Really?

Similarly, only Rust has "non-standardized, only one meaningful implementation" listed as a con, even if this is true for several of the others as well.

> OOP is a major con of C++

Not sure what exactly you mean by this, but many people use classes and objects all the time in C++, and see it as a pro rather than a con.


The linked article is listing OOP as a con of C++ without justification. I think that is what the GP is referring to, rather than stating their own opinion.

I was quoting the original article, not expressing an opinion on OOP.

Oh shoot, sorry for the confusion. I guess that's a sign I need to go to sleep...

It seems Drew DeVault is highly opinionated and the opinions are more than 10 years old.

Drew is also one of the most insanely productive programmers currently, serving as lead developer of Sway, wlroots and SourceHut and as CEO of sr.ht.

While I like and use his work, I do think there are hundreds of thousands of programmers out there that are as productive and have as much impact, just that they don't happen to do open source.

It’s under the “I don’t like line”, but I came away from this feeling like I should look into Ruby.

All the jobs which recruiters send me all day long seems to tell me to look into ruby. Or do loads of people start projects in ruby, then leave for something else?

I don't see quite as many ruby jobs today but they're still out there.

Ruby has been very focused on increasing performance the past few years. A few major teams ran away from Rails because it's really easy to build functional things in Rails that won't scale, which gets attributed back to Ruby performance. I think that was enough to scare people away from using ruby at all

GitHub and Shopify both use Rails, among many others.


One rule of thumb that's worth following is to never waste your time reading blogpost like this. If you ever saw a blogpost structured like this, just close the tab.

While a useful and entertaining comparison, I feel like a major difference is between "unicorn" languages (languages having only a single implementation and runtime/ecosystem) vs. standardized languages having multiple compilers/implementations such as C and JS (and LISP), though people are throwing JS's advantage of being standardized and one of the must ubiquitous languages around away by choosing not-quite-JS languages such as TS and coffescript before that as the first thing when they're about to start a project).

> Haskell and every other functional-oriented programming language in its class, such as elixir, erlang, most lisps, even if they resent being lumped together

Was nice talking to you, have a good day mate


"C ... statically typed"

C is just an assembler with macros, so I think this is a bold statement...

"Haskell and every other functional-oriented programming language in its class, such as elixir, erlang, most lisps, even if they resent being lumped together"

The set of problems I would try to solve in Haskell and the set of problems I would try to solve in Erlang are disjunct. And its not just about the language, it is the whole ecosystem around it.

"Scala ... Java derivative"

???

I'm not sure if this post was an attempt of some kind of humour or not.


> C is just an assembler with macros

No. Can we put this dumb meme to rest? 1972 C was just an assembler with macros. 2019 C has been a major focus of highly complex compiler research and engineering for decades.

Sure, if you write broken code, C will happily access illegal memory if that's what the input program tells it to. But it will do so efficiently ;-)


I thought this list was hilarious (despite some of my preferred languages being on the never use list). I'm surprised to see so many people taking it so personally/serious.

If this list really offends you, I would suggest you haven't been programming very long, you don't know many other languages (than the ones on the shit list), or both. Maybe the list is a little hyperbolic, but didn't you pick up on the tone?


What's the issue with Java package management? If that's a Java con, what should be said about Python's?

Is there any wide-spread language with a better package/library management than maven?

Bemusing, though lumping all functional languages together makes me balk a bit. There’s a big difference between static and dynamic functional languages. Haskell and Ocaml have a different feel than lisps/Elixir/Erlang with the latter group being much more practical in state management imho.

I mean, he lists "functional" as a pro and a con, using a fancy font for emphasis. Like another commenter posted: guy seems very opinionated, but his article lacks any profound stance on... anything? Oof

Among the other criticisms, Ruby hasn't been hip for a while. Bootcamps started offering nodejs, meetups are more diverse, fewer conference topics on Ruby. One major local conference had such low attendence last year they were going to cancel it this year.

It's a very low quality post.


I didn't mean this as a criticism of Ruby, either. I'm a Ruby/Rails dev and still enjoy the language, even if it feels like it's fallen out of favor

Interesting! I'd have put PHP and C++ at the very top of the list, then reverse the whole list. As a rule, I'd much rather start with a language that makes it easy to spot massive vulnerabilities, and then move towards a speedier and more volatile language where needed.

>I'd have put PHP and C++ at the very top of the list, then reverse the whole list.

I know what you probably meant, but if you put them at the very top of the list and then reverse it whole, they'll end up at the bottom again. Just saying.


No, that's exactly what I meant! I find PHP to be a bag of confused inconsistencies thrown together. While I have no disrespect to the people who put up with this on a daily basis, I'd never choose it for a new project. Similarly, C++ has never really appealed to me - its idea of OO seems misconceived, and it doesn't seem necessary - my current favourite for this niche is Nim

Thankfully, there's nothing mandatory about OO in C++. I mostly just use C++ as an incremental improvement over C - not "C with classes", but C with constexpr, a bit more type safety and a few other niceties. Nim is better in some ways, but often not really an option for me.

I respect this person a lot for the person's C programming skill, and open source involvement but I have to say I often end up disagreeing with his opinions about more "complex" languages.

Strange that the availability of developers who can actually be recruited for the given languages isn't listed as a factor.

He's a one-man-shop. Hiring doesn't matter under those circumstances.

Any programmer worth their salt should be able to adapt to a new language when they start at a new project/company. Hiring processes that target people who know language X are just dumb, except for very short-term/time sensitive work.

Seems like a lot of corporate environment has settled on:

"We hire programmers that can use myriad of different languages (except Lisp off course, no one want's to deal with Lisp) and then you also have to know Java because in fallback situation you'd be useless in their time constraint setting //goodbye" that kind of thing, did I get this wrong?


It's true that good developers can learn new things, but it can take years to learn the frameworks and ecosystems. I've seen projects fail due to a lack of skilled developers & having to either recruit contractors, or developers without the relevant background. Being a developer on one of these teams can be a real nightmare.

Sadly, hiring managers do not agree.

Easy.

The main platform language used by the target platform requested by the customer.


that's one tiny tiny benefit of classical OO, so many languages shared very similar constructs, you could think in "UML" (cough) and not worry about the language per se.

nice read, could maybe use a section, when to decide not to use any programming language, but just available system tools

TL;DR

Post: How I decide between many programming languages

Pros: Unintended humour

Cons: waste of time, exceedingly bad example of anything technical


Unintended?

"every PHP programmer is bad at programming, the language is designed to accommodate them with convenient footguns (or faceguns) at every step, and the ecosystem is accordingly bad. No, PHP7 doesn’t fix this. Use a real programming language, jerk."

This guy seems like a real open minded person who did his research and shared his opinion after making strong points. /s


PHP unique pros:

  - Cheap (almost every cheap/free hosting supports it without any extra config)
  - Easy (can other languages beat this out of the box: `$_POST["name"]` ?)
  - Wordpress
PHP things that are not unique but good:

  - Huge market (if you are into bootstrapping your business, there are lots of opportunities and low hanging fruit in PHP)
  - Lots of big open source projects to customize or work on top of (nextcloud, etc...)
Things that you need in order to appreciate PHP:

  - Have a product mindset

I'm still a bit surprised nobody ever used PHP as a target (think clojure/jvm, or whatever/js).

There's https://github.com/Scriptor/pharen though


yep, stopped reading after this. How can this be objective if you think that everyone is a "bad" programmer that uses this or that language, wtf.

Pros for PHP could be, it's templating capabilities with HTML, easy to use DB interfaces and the entanglement with the web/HTML/web-server in general. Nowadays you don't really write these kinds of apps anymore where your backend returns whole HTML Pages but that doesn't mean it's a bad language.


> How can this be objective if you think that everyone is a "bad" programmer that uses this or that language, wtf.

I get the feeling the author is either not trying to be objective, or is one of those people who confuses strident opinion for objective fact. "PHP is bad and everyone who uses it is bad" is a meme that some people take seriously... and one that also applied to javascript until Node.js appeared and it became valuable, interestingly enough.

I would say there are no objectively bad languages, just bad code (which can be written in any language), or languages which aren't used in an optimal way, since every one was created with a specific frame of mind and intended use case. PHP serves its purpose, and if someone doesn't want to use it, they can just not use it. Obviously PHP has pros, if it didn't, no one would use it.


Same. Also I'd add low entry barrier and maturity of interpreter.

Of course, this comes at a price. But saying PHP has no pros is quite subjective


Calling it “subjective” is being pretty nice. It’s just an obviously incorrect statement.

Tell it to companies such as Zalando (they started with PHP), Facebook, Magento and so on.

Facebook started with PHP - but quickly replaced the standard library, the interpreter, and then eventually the language itself (Hack still looks kind-of-like PHP, but is no longer compatible)

(Working with both vanilla PHP and Hack; I find the latter orders of magnitude nicer to work with - just for XHP alone, I wish I could switch my PHP projects to be Hack projects...)




Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: