General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
raianmr
ThePrimeagen
comments
Comments by "raianmr" (@raianmr2843) on "RUST Enums ARE Better" video.
Gawd knew Clojure and Haskell wud be too powerful if He made the popular đ
2
Because they breach contracts like interfaces? You might consume an implementation of a function from someone else's code trusting the type definition they've provided and writing your code as you would completely oblivious to the fact that, that function might just prematurely exit out throwing an exception without ever returning what it's supposed to return. This is exceptionally worse in the JS platform because you usually cannot read the source code of your dependencies from within your editor like you would in a saner language like Python. Most code written in these languages are just assume the happy path and leave detention of bugs to a plethora of tests which ironically almost nobody wants to write.
1
Because we care about PL research? Because pursuing better abstractions is a worthy goal in computer science? Because there's nothing about the use cases of these languages that prevent them from having niceties like these? Because these languages are openly developed and we all have a say in their evolution?
1
 @BurgerKingHarkinian TypeScript isn't 'bad' per se, it's just that there are a few hiccups in the language. All hosted languages (e.g., Kotlin, C++, F#) have them. The main issue here is that TS doesn't have support for nominal types, so it can't differentiate between a string | number and an Item which may be defined as a separate type composed from a string | number.
1
 @dealloc people who code in Java or JS for a long time lose their ability to understand that println stands for "print line", printf for "print formatted", and so on
1