Live data from Hacker News

TypeScript Seals My Penchant for JavaScript

cycligent.com

71–80 of 133 posts

Re: TypeScript Seals My Penchant for JavaScript

#71
post #27

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…

For me, it's first class function support. Of course, there are other "real functional languages" like Scala, Haskel or whatever, but they very uncommon. JS is the only commonly (Clojure is very uncommon) used language with real first class functions and not some silly hack like Ruby/Python lamdas, procs, or blocks.

To be fair, it seems that Java 8 has first class functions. I can't say much about it since I didn't get a chance to play with it yet.

Re: TypeScript Seals My Penchant for JavaScript

#72
post #5

Earlier quoted context omitted.

But if you're going to transpile, why not transpile from a real language, not a Turing tarpit?

One answer is the strong compatibility story for existing JavaScript libraries. You can use d3 or three.js from TypeScript; that's a big advantage over something like Elm. Compatibility with JavaScript source (instead of libraries) is a disadvantage. The most dangerous parts of TypeScript are the JavaScript parts: arithmetic, bracket notation, etc.

Elm has ports to interop with javascript. it's really not that difficult

Re: TypeScript Seals My Penchant for JavaScript

#73
post #3

to 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."

What on Earth is "enterprise-level type checking"?

I took it to mean the age old type checkers that had zero inference and were more of an annoyance than anything. I'm a bit jaded though.

"Modern" type checking is mostly about not writing types and strong inference

Re: TypeScript Seals My Penchant for JavaScript

#74
post #56
post #27

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…

Best thing about JavaScript is the speed of development. Once you master it, all other languages & ecosystems feel verbose, archaic. Modern JS (ES2015+) combined with a code style (Standard, Airbnb) is beautiful, sometimes more so than Python. Bad modules isn't a problem inherent to JS. NPM has its faults, but the JS community is the largest, and the fastest moving of all. Everything you need already exists, and it's…

You mean the so-called "Standard" code style? Not many people use it. Why even list it...and first? Airbnb style is the most popular one by far.

This bears repeating whenever the so-called "Standard" js style is mentioned, lest any readers think that it's actually a standard that people use. It's not. Every time it's been introduced on HN, it's been roundly criticized for the name and the lack of semi-colons.

I'm not here to argue about semi-colons. But again, for anybody who missed it - the so-called "Standard" js style is NOT a standard, it's not even a de-facto standard and it's not even popular at all. Don't use it.

Re: TypeScript Seals My Penchant for JavaScript

#75
post #71
post #27

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…

For me, it's first class function support. Of course, there are other "real functional languages" like Scala, Haskel or whatever, but they very uncommon. JS is the only commonly (Clojure is very uncommon) used language with real first class functions and not some silly hack like Ruby/Python lamdas, procs, or blocks. To be fair, it seems that Java 8 has first class functions. I can't say much about it since I didn't g…

How are they a hack in Python?

Re: TypeScript Seals My Penchant for JavaScript

#76
post #27

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…

I used Clojure for three years before realizing that all of the dynamically typed languages you listed still have the same hard problems: making large code changes and reasoning about existing code. I also realized that in the real world, technical superiority is overrated, and the difference between these languages is overestimated.

Javascript is ubiquitous, runs in the browser + server, everyone I meet in the wild has to know it, and it has static typing options. It's not easy to shove those aspects under the rug to justify another language. It takes something else, mostly depending on just who I'm working with and then on what we're building.

Re: TypeScript Seals My Penchant for JavaScript

#77
post #75
post #71

Earlier quoted context omitted.

For me, it's first class function support. Of course, there are other "real functional languages" like Scala, Haskel or whatever, but they very uncommon. JS is the only commonly (Clojure is very uncommon) used language with real first class functions and not some silly hack like Ruby/Python lamdas, procs, or blocks. To be fair, it seems that Java 8 has first class functions. I can't say much about it since I didn't g…

How are they a hack in Python?

lambda bodies can only be a single expression

Re: TypeScript Seals My Penchant for JavaScript

#78
post #67

Earlier quoted context omitted.

> seriosuly Well, if English were statically typed, the compiler would have caught your spelling mistake before you submitted your comment. Types are valuable for any size application. They bring order to a chaotic world. If you don't do static typing, you have to do a lot more unit testing. You also have to type out a lot of code to convert your function arguments into the types that you actually wanted. So, you're…

> Well, if English were statically typed, the compiler would have caught your spelling mistake before you submitted your comment. Ha! I love seeing things like this on HN and think it's a perfect example to illustrate the power of static typing. Kudos!

I fail to see what typing and a typo have to do with each other to make that joke worthwhile.

Re: TypeScript Seals My Penchant for JavaScript

#79
post #53

Earlier quoted context omitted.

Just because a language has a feature does not mean you need to use it. We use JavaScript, but in 90%+ of our codebase we use it without 'this', without prototypes, without classes, and without other ugly parts.

You also don't use integers!

?

Re: TypeScript Seals My Penchant for JavaScript

#80
post #20

Earlier quoted context omitted.

It is just the second coming of Mozilla XUL, just that this generation hyping Electron was still on their diapers, so they haven't seen it coming and going away without living any trace of it besides Firefox and Thunderbird.

Can we have a rational discussion about web technologies without resorting to insults and ad hominem attacks on an entire "generation"?

Rational? This is a discussion about hating a language for silly reasons. They must let the hate out or they'll be bitter forever.
Post reply on HN