Comment on: The Lie That Has Beguiled A Generation Of Developers
0 03 May 2016 13:30 u/horrido in v/programmingComment on: The Lie That Has Beguiled A Generation Of Developers
Based on a cursory Google search, it appears that experienced developers in the Unity community strongly recommend using C#. They hate UnityScript. Apparently, UnityScript is only there for beginners who know no other language than JS. So I stand by my assertion: no self-respecting game developer uses JavaScript (or UnityScript).
But that raises another question: what kind of game developer, or any kind of programmer for that matter, only knows JavaScript??? That strikes me as bizarre. Most everybody I know have experience in multiple languages. And if you know, say, Java or C++ or even Python, it's not a great stretch to learn C#. Why would anybody choose UnityScript?
Comment on: The Lie That Has Beguiled A Generation Of Developers
I think JS, among other languages, is one of the options in Unity.
This is not true at all: http://wiki.unity3d.com/index.php?title=UnityScript_versus_JavaScript
UnityScript and JavaScript are two very different languages. They superficially share a similar syntax, but there's a ton of semantical differences.
Comment on: The Lie That Has Beguiled A Generation Of Developers
Well, to be fair, I never said JavaScript was a completely garbage language. It's obviously useful for small things like enhancing your webpage with jQuery and writing relatively small applications where the language's shortcomings are tolerable. My overarching point in nearly all of my articles is that JavaScript is ill-suited for serious software engineering, esp. at scale, and that it is not the path to a healthy career in IT. Anybody who is serious about his career should be looking at Python (easy to learn), Ruby (easy to learn), Java (the enterprise standard), C/C++ (the foundation of all IT), or C# (the Microsoft/Windows standard). Why recommend a deeply flawed language to beginners over, say, Python or Ruby?
My point about SPAs and JS frameworks, in case you missed it, was that these are some of the things that have "beguiled" today's developers. They've been hyped up six ways from Sunday and made to look attractive and wonderful. These are presented as good reasons to use JavaScript, at least for front-end web development. I continually argue that you should use transpiled languages instead and keep JS coding to an absolute minimum. Remember what I said about making its shortcomings tolerable?
I agree with you about dabbling in any type of programming you might be interested in, up to a point. My issue is that, by virtue of the language's sloppy design, JavaScript also encourages bad habits. This is the reason why there is so much bad JS code out in the wild and why the vast majority of JS programmers today don't really know what the f*ck they're doing, according to Eric Elliot (https://medium.com/javascript-scene/javascript-training-sucks-284b53666245).
Comment on: The Lie That Has Beguiled A Generation Of Developers
For the front-end web, just about anything that transpiles to JS is better than JS. For example, Amber (Smalltalk), Brython (Python), ClojureScript (Clojure), Dart, Haxe and Scala.js (Scala). There are many, many choices.
For the server side, the usual choices are Java, C#, PHP, Python and Ruby. Go is becoming very popular here, too. There's no good reason to use Node and JS.
For concurrency, probably either Go or Elixir. They can handle high load.
For the financial industry and numerical processing, C++ and Python. Julia is a language to watch for.
For the games and graphics industry, C++ is the hands-down winner. Don't get sucked in to using UnityScript (a JavaScript look-alike) with Unity; if you must go with Unity, choose C#.
For mobile, your choices are more constrained: Java for Android and Objective-C or Swift for iOS. JavaScript can be used with Cordova or Phonegap, but I would recommend using a transpiled language. My personal favourite is Amber.
For rapid prototyping, Smalltalk is a great choice.
Comment on: The Lie That Has Beguiled A Generation Of Developers
Well, beauty is in the eye of the beholder. I think Smalltalk is one of the most beautiful programming languages in the world. Others might say the same for Scheme and Haskell. Many algorithms are beautiful, too. At any rate, ugly algorithms can be implemented in beautiful languages; only the implementation may be ugly. I have personally seen beautiful code, so this is not impossible.
The problem with JavaScript is that it has many more "warts" than any other language. Even PHP has cleaned up its act a lot with PHP 7, as has Perl 6. JavaScript is in a class all its own.
ECMA's TC39 committee has done very little to fix JavaScript's most egregious faults, such as weak typing and crazy coercions. You know those long lists of WATs and WTFs you find on the web about JavaScript? TC39 has only addressed a few items on those lists. It has a long, long way to go before JavaScript is usable for serious software engineering.
The front-end web may be consolidating, but it doesn't necessarily mean the future lies in JavaScript. When WebAssembly finally arrives, we will have a rich choice of alternative languages in the web browser. As these languages vie for supremacy, ecosystems will coalesce around them and the reliance on JavaScript's frameworks (regardless of which ones come out on top) will diminish.
In the meantime, we can use transpiled languages such as Amber, Brython, ClojureScript, Dart, Haxe and Scala.js to write our browser applications. In conjunction with jQuery, there is nothing that these languages can't do. Why use a crap language like JavaScript?
Comment on: The Lie That Has Beguiled A Generation Of Developers
C (and C++) are great languages. They underpin the entire IT industry. No other language can execute as quickly and give you direct access to hardware and provide a rock-solid foundation of reliability and express the most complex algorithms succinctly and offer a huge ecosystem to make you productive. My only criticism is that C++ is rather complicated; I prefer much simpler languages. I love C, though.
Comment on: The Lie That Has Beguiled A Generation Of Developers
It's not a contradiction; rather, it's an anomaly. What other language on Redmonk has this kind of strict dependency, i.e., JS to the web? Not Swift to iOS, since Objective-C is obviously an alternative, as is JS. Not Java to Android, since Java was popular long before Android and JS is also an alternative. Not C# to .NET, since .NET supports many other languages. Not PHP to the web server, since there are many alternatives such as Java, Python, Ruby, etc. JavaScript is a massive anomaly which distorts language statistics and our perception of the IT world.
Comment on: The Lie That Has Beguiled A Generation Of Developers
The IT industry must be warned about the danger of using JavaScript.
Most enterprises choose C++ over any other language to write their largest mission-critical software. So, no, I'm not kidding about reliability. Nobody chooses Forth, and Rust has not yet been proven in the field to the extent that C++ has. It takes years and years, and millions of lines of enterprise code, to prove a language. Rust has a long, long way to go.
C and C++ have had generations to optimize their compilers. No other language in wide use can generate faster native code, esp. Rust since it's such a new language. Yes, Fortran is also very highly optimized, thanks to its age, but except in scientific circles, hardly anyone uses this language any more. (Disclosure: in the 1980s, I was a bona fide Fortran guru.)
C++ is a wickedly complex language because it has tons of features. Consequently, it can be extremely verbose. Nevertheless, all those features are intended to help the developer write very complex programs. When it's done right, these programs can be relatively compact for the size of the application, which can be enormous. I didn't say C++ was the most elegant language, nor did I say other languages couldn't be more succinct at the same task.
The point is, C++ strikes a unique balance of all those qualities I mentioned. That's why it has withstood the test of time and why it remains the standard for writing large-scale, reliable, high-performance software.