Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
I love JS and TS, because it runs in browsers and browsers are everywhere.
But just like Python, it's just a bunch of convenience functions and somehow they blew up like crazy.
Can you elaborate the "lacks" and "hacks"? I'd love to hear more about it :)
I mean yes but same can be said about python
Most of the complaints are just because people who aren't used to dynamic typing are just bitching about not being used to dynamic typing.
It's a fine language with a few quirks like everything else, which is entirely understandable simply because of the nature of its politics. There isn't a single global entity without company loyalties that decides on the language spec.
If C++ were chosen to be the language of international browsers with intercompany politics it would've been just as fucked up.
For example if you have a monolithic API that has a route that leads to a costly computing task. Your containers may scale up too easily. You grab the code and run it in it’s own container as a micro service using express with plans to convert that to C++ later. Or maybe you decide to offload the work to the user web browser by lazy loading some front end code. You may decide to replace the code later but you handle a scaling issue with minimal rewrite cost and without service interruption.
I absolutely hated it when I learned it. Typescript adds a lot of sanity because it abstracts away lots of the annoying details. The flexibility is worth the cost in my experience.
Ziron381yI don't like languages that give the programmer too much freedom. People usually hate Java, but I love it because you have to adapt to it, not the other way around.
I call this type of language "easy to create, hard to maintain".
Typescript is indeed more "professional" in this aspect.
@Ziron "with great power comes great responsibility"
A far fetched analogy : English and French are complex languages where you can say the same thing in multiple ways. By opposition, Esperanto is very simple and has almost no exception.
The former are widely used (French is still the diplomatic language), the latter is almost never used.
You can write beautiful English as well as garbage. The same is not so valid with Esperanto.
In conclusion : it's not the language that is to blame, it is the people using it.
Ziron381y@react-guy @irene I totally agree with you guys. Every language can be messed up and dev discipline will ultimately dictate if the code is good or garbage.
My argument is that there are languages make it harder to mess up and there are languages that make it easier. Take Python for example: it forces you to indent your code, or it will not work. Great, one less thing that de programmer can mess up. People usually don't like these restrictions. They say things like "oh, this language is so boring because is forcing me up do do x" or "this language is awesome because I can write stuff in only y lines of code". People like this don't understand that some restrictions are good and make code more uniform across different devs with different backgrounds.
For example, you build a set which contains bunch of arrays that contains two element like[1, 2], [2, 3].
Now if you want to check if [1, 2] is in the set, normally you just check if it is in the set, you would expect it is hashed or something like that.
But nonono, in this particular example, what it stored is somehow a reference of that object, and even when the values are the same, it is not considered to be in the set. This throws me off so much and I just manually hash it and put it in set.