It doesn't seem too long ago when Java Developers rushed to Ruby because it wasn't statically typed.
Now, TypeScript is better than JavaScript because of the opposite reason...
I've seen this sort of pendulum swing a few times in my career.
It doesn't seem too long ago when Java Developers rushed to Ruby because it wasn't statically typed.
Now, TypeScript is better than JavaScript because of the opposite reason...
I've seen this sort of pendulum swing a few times in my career.
IMO they were rushing away from:
1) Java's verbose syntax (not the type system itself; static typing and verbose syntax are technically orthogonal), 2) The J2EE + FooFactoryFactory mess that infected the Java ecosystem at the time, and 3) Enterprise software in general (a lot of Ruby was in startups, so fun greenfield development, away from the J2EE/enterprise mess).
For Java itself, the syntax is finally getting better (Sun really screwed that up, and let C# get way ahead in innovation), and J2EE is finally over AFAIU, so Java development is generally/in theory not as bad as it was when everyone left. </Stockholm syndrome>
Java has a particularly bad type system.
The simple truth is that today, statically typed languages have all the advantages that once used to be the exclusivity of dynamically typed languages, while the reverse is still not true.
In 2016, there is really very little reason to pick a dynamically typed language for any serious project.
Javascript is going to be around for a while because of inertia, but it's pretty much the last mainstream dynamically typed language we'll see.
Python's still pretty popular too
I partially agree. I think as type inferencing gets smarter, we're going to end up with languages that are statically typed by the compiler or interpreter, but that there will be few-to-no type annotations in the code. So yes, I think the future is static typing, but I think it's going to end up a compiler feature and not part of the language at all.
I wish this were true. I wholeheartedly agree that, all other things being equal, static typing is better than dynamic typing. If there were no other factors, I would choose static typing without a second thought. But there are other factors, and all other things are not equal.
I write ClojureScript every day. Its lack of static typing is a genuine source of pain. Every day. But when I compare it to Elm, which I'm quite interested in:
- JS interop. Maybe I suck at google, but it looks like it's not a first-class concern of the language or the community.
- Macros. Defining language features is great. It's the reason that a lisp can be small in terms of core language constructs (even if its standard library is enormous cough Clojure). In 2016, there is really very little reason to design a language without metaprogramming in mind.
- Community, which admittedly could and should and will grow in size and sophistication for Elm.
When I compare it to TypeScript?
- State. Welp.
- No seriously, why is everything mutable? It's 2016 and a language that was designed with concurrency and functional programming in mind from the start still hasn't caught on to mutability by default as a serious problem, and TypeScript inherits all this baggage.
- There's no simple clear path to even set up a TypeScript project. There's a million different ways with different tooling choices, and that fractured environment is evident whenever searching for answers. The world of JavaScript constantly bleeds through. If I want to know how to use TS, I need to know WebPack and NPM and Bower and who knows how many other things that are not even for TS.
- Forget metaprogramming.
- What is the TS community? Microsoft and a weird has-been cult team at Google? (Sorry guys, I did the Angular thing, and I watched it become a circus from the time Angular 2 was announced to the time your weird conference was more like a dance club than a tech conference.)
I could simplify this by calling out your last line. JavaScript rules the roost. You better play nicely with it, if you want to build a web app.
Honestly the web is going to be an increasingly fractured thing for many years. There's just too many ways to do things and they're all compromised in awful ways.
Postscript: I'm sorry this is so ranty. I mean no harm and I mean none of my criticisms to be taken as attacks. I want very much to do good work as a web dev and I'm just heartbroken that it's such a pain.