6 ms·
YourLanguageSucks
- jakear 7y agoWhy is it that these lists seemingly always give JS a hard time for function scoped variable declarations, but never give Python the same treatment? Not to mention “nonlocal”...
- yedpodtrzitko 7y agoThe whole page, beside being really outdated, feels to be written by multiple people, each of them disliking different aspects of different languages, thus really inconsistent.
- jakear 7y agoSome are downright silly: > C#: You can't perform any operations, even simple arithmetic, with objects inside a generic method (e.g. T plus<T>(T t1, T t2) { return t1+t2; } Well... obviously.
- nmca 7y agoObviously? Surely that's just a type constraint.
- 1000units 7y agoYes, you have to specify the constraint for code that assumes the constraint to type-check.
- jakear 7y agoC# doesn't claim to have powerful type inference a la. Haskell, so there's no reason to expect it to extract type information from usage of parameters inside generic functions. If you need functionality inside the body, you gotta declare that functionality in the type constraints.
- moksly 7y agoProbably because everyone knows JavaScript, but not everyone use it by choice, giving you a higher than average ratio of people who both dislike and know the language. This is actually one of the reasons I think every language except for JavaScript sucks for open source web-development. Not that I particularly like JavaScript myself, but everyone knows how to use it. I work for a Danish municipality, we use a lot of open source software, but we’re roughly 10 developers and ops technicians that support 7000 employees and around 300-500 IT systems. As a result we can’t use every tech-stack. This is pretty standard for average sized muniplacities by the way. We don’t share tech stacks, but we do work together, and as you can imagine that leads to wasted resources. We’re a C# shop our direct neighbour does PHP, because of limited resources, we can’t utilise each others projects. That’s just a silly waste. Good luck convincing anyone to change their overall and often cohesive strategy for tech choices though. The one technology we can all use, however, is JavaScript and everything build within that ecosystem can be put to good use everywhere. So while the language sucks at a lot of things, it’s also the only universal web language that we’ve got.
- BinaryIdiot 7y ago> We don’t share tech stacks, but we do work together, and as you can imagine that leads to wasted resources. We’re a C# shop our direct neighbour does PHP, because of limited resources, we can’t utilise each others projects. That’s just a silly waste. Good luck convincing anyone to change their overall and often cohesive strategy for tech choices though. One suggestion, if you don't mind. When I did work for the DoD as a contractor, because of small business rules in government contracting we were pretty much forced to work with at least 10 other companies and all of them had their own preferences for tech stacks, their own expertise, etc. So we tried to go down the road of using things like thirft or avro so regardless of what language / stack you used, as long as you could interface with those on the same network (since we're talking about inter-service communication here) it was still pretty quick. It's not ideal but sometimes you gotta work with what you have. Sometimes you can find unique ways to bridge gaps across platforms to re-use work. One time a group we worked with tried to use a web app with multiple iframes as the communication bridge between stacks. It _worked_ but it was pretty hacky and slow.
- anonytrary 7y agoSimple -- because basically everyone is forced to use JS. If 10% of the people who use JS complain about it, and 20% of the people who use Perl complain about it, there are still more people complaining about JS.
- iCarrot 7y ago>basically everyone is forced to use JS What about Wasm and transpiling?
- anonytrary 7y agoWASM is interesting, but the market vastly favors JS. JS is simpler than WASM and transpiling, and any performance advantages WASM offers are relevant for edge case applications. A typical web-app will perform just fine with bloated JS these days.
- ajanuary 7y agoPython has UnboundLocalError. Javascript will use undefined, which may not surface as an issue until later down the line. It’s the combination of features that makes JS behaviour so surprising to people.
- jakear 7y agoIm talking about accessing variables in parent scopes. In python you have to explicitly declare the var as nonlocal, but in JS it just works. Now, I'm well aware that this was an active design decision made by both communities, and the "Pythonic" way wouldn't be to use `nonlocal` at all probably, but instead use a class or similar. However, I still consider its presence a wart of the language. (likely only because I am so much more familiar with JS!) Silly micro example to explain what I'm talking about: JS: const countUpFromN = (n) => () => n++ Py: def countUpFromN(n): def add(): nonlocal n n += 1 return n-1 return add Keep in mind that you only need nonlocal to write, reads will work fine. So you can use a variable a bunch in some scope, then suddenly have things break when you try to simply write to it.
- jakear 7y agoActually, I think an interesting exercise for evaluating a language could be determining "how much code change do small semantic changes require". For instance, if we were to start with passing a generator (in the "generates a value" sense of the word, not the other one), and try to convert it to passing a counter, how would that look? JS: foo(x => () => x) bar(x => () => x++) Py: foo(lambda x: lambda: x) def countUpFromN(n): def add(): nonlocal n n += 1 return n-1 return add bar(countUpFromN) Fairly damning to python IMO. I'd be interested to see examples of where small changes in Python require large changes in JS.
- 11235813213455 7y agonot to mention JS has let/const since 2015
- peteretep 7y ago"Perl 5 sucks because ... the regular expression syntax is horrid" So horrid that it's become essentially standard :eye-roll:
- nurettin 7y agopython sucks because: default parameters are only evaluated once.
- isoprophlex 7y agoYou can fix that/cheat around that by cleverly using a lambda as kwarg, I think... (Real hacky though)
- avip 7y agoThe common-sense approach would be not to introduce such defaults. def foo(bazzes=None): _baz = bazzes or [] ...
- dnautics 7y agoThen why doesn't the language prohibit having a default of anything mutable?
- stefco_ 7y agoPython is generally terrible at providing immutable types and workflows. No such thing as a constant, class variables are mutable by default, no built-in immutable dictionary class, etc. I use a linter to catch this sort of thing and subclass `collections.namedtuple(...)` whenever I need to at least try to abolish mutability. It's one of the worst things about the language. [edit] You can argue that there would be use cases for mutable defaults, and as with any edge use case you'd be right in asserting its existence. Unfortunately, I can't think of any solution (typing, changing function argument evaluation rules, etc) that wouldn't fundamentally change the language and break just about every sizable python library in existence. This looseness is baked deep into the language as far as I can see.
- yedpodtrzitko 7y ago- how does the language know a thing is (not) mutable? - how does it know you're not doing that on purpose?
- sschueller 7y agoWhat ever language the site was written in sucks as the site is now down...
- cuddlecake 7y agoTo be fair, a site can go down in any language...
- kev009 7y agoThe go section is great, it's such a derpy 1980s language: "Go's error type is simply an interface to a function returning a string. Go lacks pattern matching & abstract data types. Go lacks immutable variables. Go lacks generics. Go lacks exceptions" I've been searching for as succinct a criticism as this and now have it, thanks.
- jchw 7y agoThis is literally a list of reasons why Go is wildly successful. Go is a language that does exactly what it needs to and no more. If you want more, there are plenty of languages that have more syntax than users.
- kev009 7y agoAnd bless go for pulling all those users in!
- dnautics 7y agoThe defer interaction with named return values is going to give me nightmares. We have a senior dev whose software caused a memory leak in prod. One of our less senior devs (who has an engineering PhD in concurrent systems theory) immediately identified that the senior was trying to do clever optimizations for single threadedness that simply cannot work when concurrent... I wouldn't be surprised if his code is causing a goroutine leak. I am convinced that go is popular because it's comfortable to elder seniors and makes them think they can use their aging python/c/c++ skills in something flashy, new, concurrent, "supported by Google" and... Well at least it's genuinely safer. Disclaimer: I'm an aging dev myself.
- jchw 7y agoI started writing Go at age 23, for what its worth. (That was a just a few years ago.) I like Go because its simple. Obviously, that is also its downfall. Overall, I would still hold it as one of the best languages for writing various kinds of software (servers, CLI tools, and some odds and ends.) It’s true that you can write bad Go by trying to do things that are not a good idea, but I’m not sure what you’d expect. The Go ecosystem is damning evidence of the ease of writing pretty good code in the language. Disclaimer: I work for Google (but I do not work on Go and I did not work for Google when I first began writing Go.)
- factorialboy 7y agoWhat is Backbase? Google throws up a company and not a language.
- Lowkeyloki 7y agoSince there's not a section for x, that must mean that x doesn't suck. /s
- lwansbrough 7y agoClosure has the shortest section and is therefore, obviously, the best.
- deleted 7y ago[deleted]
- lwansbrough 7y agoThe site lists Microsoft being the defacto contributor to the C# language spec as a negative. Honestly I think Microsoft has been an excellent steward of the language, and their opinionated choices over the years have helped keep C# succinct while also capable and modern. I'm a bit of a fanboy, but when you compare it to the language that has been around longer and is a direct competitor (Java), C# really blows it out of the water for most common programming tasks (async, operator overloading, pair/triple returns in C# 7, var keyword, superior generics, to name a few.)
- kev009 7y agoYup C# is definitely in the king position for application programming right now. Between .net core, asp.net and xamarin you can target absolutely everything. The main impediment to better quality software is devs raised on Linux having irrational aversion to Microsoft still while thinking Google is either competent or benevolent.
- Gibbon1 7y agoI was very disheartened by the negative reaction of the Linux community to attempts to bring C#/Xamarin to Linux. Since if there was anything the Linux desktop really needed was simple ways to write GUI's for Linux. And semi cross platform GUI's. Both of which Xamarin could provide.
- thelazydogsback 7y agoAgreed. And: > C# sucks because: > You can't assign a new value inside a foreach loop > (e.g. foreach(int i in vec) { i = i+1; }). LOL
- zelon88 7y agoYou can't do this in a lot of languages. Python comes to mind too.
- thelazydogsback 7y ago
- sdfjkl 7y agoYay, Ada doesn't suck! :)
- soganess 7y agoI get this is tongue in cheek, but I really wish this was a little more focused. Something more along the lines: (1) Language x claims these as its design principles/goals: P1, G1, P2... (2) These y things subvert those aspirations. (3) Modus ponens &x suxxxorzzz_Aslang__ I'm not the biggest fan of Go for it's stripped nature or Rust for the complex babysitting the type system needs, but I much prefer both to C. so that is a win for me and hence both achieve that goal. Similarly, I love how expressive Scala is, that seems like an unspoken design goal of Odersky's. You can't get that without there being a million ways to do something.
- eafkuor 7y agoSo basically clojure is awesome
- nurettin 7y agoI heard nothing bad about Clojure. Mostly because there is not enough syntax to complain about.
- arijun 7y agoProbably a similar effect that moksly said upthread about javascript vs python: "Everyone knows JavaScript, but not everyone use it by choice, giving you a higher than average ratio of people who both dislike and know the language." The only people using Clojure are those who really like it. From my end, the worst things about Clojure were the JVM (making installation/configuration hellishly frustrating) and the poor error messaging (making debugging the configuration extremely difficult).
- ohazi 7y agoIn C++, std::map's operator[] will either return the element pointed to by the specified key, or if the key is not in the map, will default construct an object and insert it into that key's slot in the map. I really want to know who thought this was a good idea, because I've only ever seen this behavior act as a footgun.
- wruza 7y agoI’m not going to defend other js parts, but calls on 0.1 + 0.2 != 0.3 and the type of nan both present the author as a non-skilled programmer at least. Big numbers and exact decimal-point numbers are out of scope of almost any general purpose language core for a reason. It is up to a programmer to decide whether this reason is applicable or not, but not blindly dismissing. Math is a+b, engineering is “%.14g”.
- majewsky 7y ago> XSLT/XPath sucks because [...] It starts numbering from 1. Unlike every single other major programming language in use today. Does Lua count?
- zelon88 7y agoThanks for the read! I appreciate the thought and work you put into this. And now my obligatory gripes! Under the PHP section you claim "if an included file must return a value but the file cannot be included, include statement returns FALSE and only generates a warning. If a file is required, one must use require()." How is that a negative? That sounds like expected behavior to me and I can't imagine it working any other way. $error = include('script.php'); // Return FALSE and continue anyway. require('script.php'); // Die with error. How is that undesirable/wrong? It lets you do things like... $error = include('script-A.php'); if ($error == FALSE) require('script-B.php');
- SwiftyBug 7y agoAs I thought, Swift doesn't suck at all :)
- SwiftyBug 7y ago> Camel case sucks Why?
- devxpy 7y agoI wonder why anyone would be so cruel as to put so much content in a single webpage. Did they actually had the patience to write such a long article in a single file, or did they write it in multiple files, and then compiled it down to a single webpage for others to suffer?