Live data from Hacker News

TypeScript Seals My Penchant for JavaScript

cycligent.com

91–100 of 133 posts

Re: TypeScript Seals My Penchant for JavaScript

#91
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…

Well you don't have much choice for frontend for one. Typescript offers much stronger typing than Ruby, Python, Clojure and PHP as well.

Stronger typing than clojure? You gotta check out clojure.spec which is built into the language itself.

Re: TypeScript Seals My Penchant for JavaScript

#92
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…

Well you don't have much choice for frontend for one. Typescript offers much stronger typing than Ruby, Python, Clojure and PHP as well.

You have actually. For example ClojureScript compiles to JS.

Re: TypeScript Seals My Penchant for JavaScript

#93
post #57
post #38

Earlier quoted context omitted.

"Enterprise-level capabilities" doesn't mean anything still. Google is bigger than most enterprises, and they don't use any "enterprisey" stuff, not even in their Java.

Can people die from code written at Google?

Those exploding Samsung phones ARE running Android, are they not?

Re: TypeScript Seals My Penchant for JavaScript

#94
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…

Being able to reuse the code you wrote for the server in your client code and vice versa, is in my opinion not just a small feature, it can save you a lot of time and money. 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 b…

The code duplication is not necessarily the result of using two different languages. On the other hand you can use for example clojure for the whole stack (Clojure for backend ClojureScript for frontend).

Re: TypeScript Seals My Penchant for JavaScript

#95
post #88

Earlier quoted context omitted.

There is more to functional programing in python than lambda functions. Normal functions can be created and passed around.

Sure, but I think that is the point. You can do that, but its not as convenient and becomes harder to read. And besides, those are free functions you speak of, not closures. To emulate multi-line closures becomes even more obtuse.

I find it more readable than lambda function syntax personally. And still way nicer than messing around in JavaScript.

Re: TypeScript Seals My Penchant for JavaScript

#97
post #95

Earlier quoted context omitted.

Sure, but I think that is the point. You can do that, but its not as convenient and becomes harder to read. And besides, those are free functions you speak of, not closures. To emulate multi-line closures becomes even more obtuse.

I find it more readable than lambda function syntax personally. And still way nicer than messing around in JavaScript.

Sorry, I edited my comment and you may have missed it. How would you emulate multi-line closures in Python? A free function which you can pass to a higher order function is not a closure. I think you would need to create a functor, and that becomes even more verbose.

Re: TypeScript Seals My Penchant for JavaScript

#98
post #91

Earlier 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.

Stronger typing than clojure? You gotta check out clojure.spec which is built into the language itself.

Ah, I'm not that familiar with Clojure. Is that commonly used? Are there any good examples of complex properties you can capture with its type system?

Re: TypeScript Seals My Penchant for JavaScript

#99
post #44

I love JS/ES2016 how it is, I seriosuly don't see the advantage of typescript except maybe for a gigantic application

> 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…

It would have passed static checking if using UDL (Urban Dictionary Language).

Re: TypeScript Seals My Penchant for JavaScript

#100
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…

When you compare pip to npm, it's a no brainer, npm wins that battle. Pip is getting better but so is npm.

Js code looks a lot like python to me now as well, especially when referencing generators.

The speed of development is it's strongest advantage. However I do think that from an architecture point of view something like golang could be considered more sound.

Post reply on HN