I simply don't understand how can someone like javascript (or anything derived from it) when there are so many much better languages around. Can someone state some advantages for web development for example compared to ruby, python, or clojure? All I see is a slow tangled mess of dependencies and broken libraries with a package manager which lets you change already released modules and a language which is even more p…
Well you don't have much choice for frontend for one. Typescript offers much stronger typing than Ruby, Python, Clojure and PHP as well.
TypeScript Seals My Penchant for JavaScript
31–40 of 133 posts
Re: TypeScript Seals My Penchant for JavaScript
#32I simply don't understand how can someone like javascript (or anything derived from it) when there are so many much better languages around. Can someone state some advantages for web development for example compared to ruby, python, or clojure? All I see is a slow tangled mess of dependencies and broken libraries with a package manager which lets you change already released modules and a language which is even more p…
1. It's available in the Browser which opens a lot of possibilities. Yes, there are transpilers for other languages but it's not the same.
2. On the server side is really fast. In fact JavaScript is one of the fastest dynamic languages out there. Much better performance than Python (even with PyPy), Ruby or Perl.
3. With TypeScript you get amazing IDE support. Which is something that you just don't have with Ruby, Python or Perl. Yes, I'm aware of PyCharm, but it's not up to the things that you can do with VS and TypeScript.
4. I know the language has some design mistakes, especially around operators and other few things. But in the end the language is small enough and simple enough that it's easy to learn. And it's also easy to learn how to avoid the pitfalls of the language as well. So in the end that's not much of a problem. Besides that, even when the language is simple, it's still quite powerful because of its dynamicity, closures and prototype oriented programming. In the end you can be as concise as you are with Ruby, Python or Perl.
Re: TypeScript Seals My Penchant for JavaScript
#33I simply don't understand how can someone like javascript (or anything derived from it) when there are so many much better languages around. Can someone state some advantages for web development for example compared to ruby, python, or clojure? All I see is a slow tangled mess of dependencies and broken libraries with a package manager which lets you change already released modules and a language which is even more p…
I joined a company where the backend was written in PHP and the frontend in javascript. There was a ton of duplicate code, just because the backend and the frontend had been written in different languages. By using UMD modules and switching our backend from PHP to nodejs by building a custom isomorphic framework saved us a lot of time. We now don't have two development teams but just one, it's really great having everyone write (speak) the same language and makes hiring, sharing knowledge and training much more efficient.
Yeah javascript is not perfect, but I disagree that is totally bad and that you can't write good code with it.
We also use typescript because it is not just about types it does much more for us. For example allows us to write our code in ES6/ES7 (with core-js) and transpiles it on the fly (on save file) to ES5 UMD modules. Visual Studio and the nodejs tools make it easy to debug our backend code.
Re: TypeScript Seals My Penchant for JavaScript
#34Earlier quoted context omitted.
But if you're going to transpile, why not transpile from a real language, not a Turing tarpit?
Well Google already did that with Java and GWT, but it never caught on. I guess TS being a superset of JS itself might be an advantage...otherwise it is still a new language designed for web browser programming unlike Java. I suppose it is a fair question why they didn't just use C#.
ClojureScript uses the Closure(sic) compiler from GWT to compile Clojure/Java to JavaScript (not that I defend this technological train wreck).
> I suppose it is a fair question why they didn't just use C#.
This would have been superb, but I think Microsoft wanted to show that they "get" web developers; just mentioning C# causes the JS pundit get jittery because someone wants to limit the amount of write-only code he is able to spit out.
Re: TypeScript Seals My Penchant for JavaScript
#35Earlier quoted context omitted.
Well you don't have much choice for frontend for one. Typescript offers much stronger typing than Ruby, Python, Clojure and PHP as well.
If I were to start a new project today, I would use Elm[1] for the front-end. It's a very well-designed language (reminiscent of Haskell), specifically designed with HTML and DOM manipulation in mind. [1] http://elm-lang.org/
I mean is the time you and your coworkers will need to learn it, the increased difficulty to hire skilled elm developers, the increased difficulty to find good training courses for new junior developers you hire, the increased difficulty to debug the code compared to js, the lack of third party libraries ... really worth it?
Re: TypeScript Seals My Penchant for JavaScript
#36Re: TypeScript Seals My Penchant for JavaScript
#37to save readers the time I've just wasted, here are the two sentences about typescript in this sales pitch for cycligent.js: "I am able to keep the freedom and expressiveness of JavaScript to which I have become so accustomed while getting enterprise-level type checking and refactoring capabilities. Declaration of objects and interfaces is a dream."
Aka
"Of the two languages I know, Typescript is my favorite."
Re: TypeScript Seals My Penchant for JavaScript
#38Earlier quoted context omitted.
What on Earth is "enterprise-level type checking"?
Enterprise-level capabilities . I know the E-word is taboo here but aren't you people exaggerating a but on the trolling?
Google is bigger than most enterprises, and they don't use any "enterprisey" stuff, not even in their Java.
Re: TypeScript Seals My Penchant for JavaScript
#39Re: TypeScript Seals My Penchant for JavaScript
#40Earlier quoted context omitted.
Well you don't have much choice for frontend for one. Typescript offers much stronger typing than Ruby, Python, Clojure and PHP as well.
If I were to start a new project today, I would use Elm[1] for the front-end. It's a very well-designed language (reminiscent of Haskell), specifically designed with HTML and DOM manipulation in mind. [1] http://elm-lang.org/