Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@rutee07 i was cringing all night over that, i cant imagine someone actually thought it be a good idea to do so.
-
What did you mean about writing a whole function instead of arguments? Can you give an example?
-
kpenc21326yBelieve me, after working with a real type system, Java, C++, C# etc. seem out of place... I mean, the whole languages. :D
-
@techno848 Yeah, OK. To be fair, there's no way I'm leaving the blame for that code at JavaScript's door.
Yes, it lets programmers hurt themselves, but whoever wrote that snippet was looking for pain. -
@platypus in my recent project i had to work with JS for maps api and have never worked with JS before so these things are surprising when i see them in every snippet i go through, even in the sample code from google had the same thing.
-
@kpenc i dont have much experinece with web technologies but both php and javascript were surprising for me.
-
@kpenc wait, are you saying Java doesn't have a real type system? I'd love to hear more...
-
kpenc21326y@franga2000 Of course it doesn't. Think about a value that must be of type X. Yes, it could be of type X, also might be Null. If a function returns the type X, the same thing applies, but also the function might never return due to infinite recursion for example, or it might throw. This type system gives a false feel of stability and security. Not to mention the verbosity.
-
kpenc21326y@samblaise read up on the Hidley-Milner inference and the ML family of languages type systems. Why are you arguing without informing yourself first?
-
@kpenc sorry, but you can't just go out and call all other type systems 'not real' because they're different from the one you prefer (I'm guessing Haskell). What makes a type system real? I could argue that the only 'real' type system is one that is explicit and unambiguous. Since HM infers all types, the programmer can not explicitly define them, making it not a 'real' type system.
This, of course, would be absurd.
Also, as I understand it, HM is defined only for lambda calculus and thus only relevant for functional languages. This makes your statement equivalent to "The language [type] I prefer is the only real language [type]". I hope you can see how this statement could be received poorly.
Is it just me or after working with languages like C and java, javascript's practises seems out of place ? Like readability can go to hell i will write a whole function instead of arguments.
rant