Switching back to Java after having spent a long time in JavaScript land with modern standards made me realize how great JavaScript had become. The biggest reason for JavaScripts greatness to me is JSON. I couldn't understand how Java developers put up with such bulky ways to deal with data. After some time in Java land I've come back to appreciating its strengths again though. Code completion is nice. I'm kind of ho…
JSON has its strengths and weaknesses, and while Java doesn't have first class support for it the Jackson libraries are excellent!
JavaScript is Good, Actually
61–70 of 369 posts
Re: JavaScript is Good, Actually
#62To me JavaScript is very similar to VBA. Based on its own merits it’s a pretty average language with lots of design flaws. But it has a monopoly for what it does (browser/cross platform vs ms office scripting) and most of its users never really got a chance to solve the same problems with a better language. And like VBA, it is probably the only language known to the bulk of it user base (semi-amateur web designers vs…
Re: JavaScript is Good, Actually
#63Earlier quoted context omitted.
Typescript is the only reason I would consider Javascript "good." Without the type safety and the refactoring tools that type safety makes possible, applications may be easy to write initially, but unbearably difficult and time consuming (read expensive) to refactor and maintain an application of even basic to moderate complexity.
What about: - easy accessibility of higher order functions (AKA functions as a first class object from the get go) - graceful inclusion/addition of concurrency-handling functionality despite the language being single threaded (this might be much more to do with the context javascript was to be used in) I agree with your sentiments on the value of type systems and compile-time type checking, but so many languages are…
C and Assembly are probably the only languages left where this isn't the case.
And even C has the blocks extension on Apple platforms, although I would take the "easy" part out of it given the lifetime semantics.
Re: JavaScript is Good, Actually
#64Semantics and configurability is what what makes a language great. JS doesn’t have function environments, i.e. every unlexical lookup goes to global/window and that cannot be redirected. It doesn’t have green threads (at least). There are generators, but one cannot just yield without marking all the functions generators too (async/await in modern terms). Stack traces are lost when generators throw(). JS has no good i…
Re: JavaScript is Good, Actually
#65Switching back to Java after having spent a long time in JavaScript land with modern standards made me realize how great JavaScript had become. The biggest reason for JavaScripts greatness to me is JSON. I couldn't understand how Java developers put up with such bulky ways to deal with data. After some time in Java land I've come back to appreciating its strengths again though. Code completion is nice. I'm kind of ho…
If you don't need to exchange the data with other apps, serialization in Java is actually quite decent.
Whereas javascript you can just go `require(myjsonfile)`
I love java, but Javascript is indeed great for some of these kinds of things :-)
Re: JavaScript is Good, Actually
#66Personally what I love about JavaScript is that it brought the basics of functional programming to the masses. Obviously it's far from pure FP, but I think it's much more at the heart of JS than it is say Python. The Scheme parts of JS are the good parts. I think some of the resurgence of FP is down to JS. The wealth of libraries available is pretty impressive [0] [0]: https://github.com/stoeffel/awesome-fp-js
One day I got curious about monads and spent over a month trying to wrap my head around it, which obviously set me on the path to Haskell which is now my favorite thing in the world.
Re: JavaScript is Good, Actually
#67As a long time JS dev I don't claim expertise in other languages, but every time I go back to check out new features in C++ or Java they feel more and more like JavaScript with types than "C with classes".
Actually C++ these days is moving more towards strong typing and immutability - imho the exact opposite of JavaScript...
Re: JavaScript is Good, Actually
#68I don't hesitate to say I like JS. These days I try creating any small experimental programs I need in JS and run them in FF instead of starting the whole build process with C++ code. If there is file i/o needed, I use an extention that I have created for this purpose. When necessary, converting this prototype into C++ code is not a big deal.
As for its flaws, well, which language doesn't have flaws. Part of being an experienced dev is to learn, respect and avoid the shortcomings of the technology you use, aka paying attention. Its arguable that some flaws in some systems are worse than some flaws in other systems since the design factor comes into play, but with something as pervasive and monopolistic as JS, there is a clear choice to be made - create something better for the community or shut up and live with it. I am sort of doing both. (To pull off the first one, I need some serious credeitials, which I hopefully earn in the near future.)
Re: JavaScript is Good, Actually
#69As a long time JS dev I don't claim expertise in other languages, but every time I go back to check out new features in C++ or Java they feel more and more like JavaScript with types than "C with classes".
Actually C++ these days is moving more towards strong typing and immutability - imho the exact opposite of JavaScript...
Re: JavaScript is Good, Actually
#70Personally what I love about JavaScript is that it brought the basics of functional programming to the masses. Obviously it's far from pure FP, but I think it's much more at the heart of JS than it is say Python. The Scheme parts of JS are the good parts. I think some of the resurgence of FP is down to JS. The wealth of libraries available is pretty impressive [0] [0]: https://github.com/stoeffel/awesome-fp-js