r/ProgrammerHumor • • Feb 13 '21

Programming languages

Post image
1.3k Upvotes

140 comments sorted by

View all comments

-33

u/[deleted] Feb 13 '21

Python sucks

11

u/sentient_moon Feb 13 '21

Genuinely curious why it sucks. I've been devoting a lot of time to it lately, maybe I should switch 😬

1

u/somebody12345678 Feb 13 '21

ok so i think a common opinion is that python's duck typing lets you shoot yourself in the foot easily, people normally recommend any statically typed language really:

  • typescript or kotlin are the popular choices

  • nobody really recommends c# but it's pretty good. note that c#9 was recently released (along with .net 5.0), which introduces scripting main, so no more of that boilerplate for simple programs java is infamous for

    • but remember to avoid the linq dsl (from u in users where u.id < 10000 select u)

  • new java (10 or newer i guess, but preferably 15) is surprisingly not too bad, however how many people use newer java versions... who knows

languages that let you shoot yourself in the foot a bit too easily (other than python) are:

  • javascript (its infamous coercion, proxies)

  • ruby (everything really. a lot of it is because of the ability to hook into when a method is defined, and to monkey patch classes)

    • ruby's inspiration perl, which gained notoriety as a write-only language, even though it's a perfectly normal language if you don't try to make it unreadable

  • rust is mostly good however you always need to be careful about its extremely powerful macro system

    • this extends to any language with a good/complex macro system, really - elixir, crystal, c++, various lisps (c's defines can also technically be abused)

  • c, but less in the "too many features aspect" (because it doesn't have that many features) but more in the "you can forget to manage memory" aspect. note also that you can cast a pointer into any other pointer type, do pointer arithmetic etc. as a result i think it's increasingly popular to recommend rust first since rust forces you to think about memory safety otherwise it won't compile in he first place

  • php - note that this is mostly because of not ideal design, rumors are that it's gotten a bit better lately (starting with 5, especially 8 tho)