Hacker News new | ask | show | jobs
by noir_lord 3242 days ago
TypeScript does to me (and technically I suppose it is a different language), where it gets interesting is that TS made me a better JS programmer since I could express stuff the way I wanted to and then look at the output.

The only transpiler I've seen that gets close in terms of quality of output is BuckleScript, that thing is damn near magic but TS has the momentum and adoption.

TypeScript has been so good and caused me so few problems that I actually look at ways of moving more bits to the frontend, it makes it pleasant to work and I think (personally) the highest praise you can give a language is that it's pleasant.

1 comments

Typescript with TsLint is a godsend on larger codebases. It makes JavaScript into a pretty solid language for big projects.

Without it you frequently run into objects passed to you after going through 10k lines of code and it becomes a wicked game to figure out which properties the object actually has at that point.

JavaScript, even ES6, is IMO crap for large codebases.

Does this object have the property I'm looking for? Did somebody overwrite it with the wrong type 5000 lines ago? Why is the prototype chain broken? Where's my damn inline documentation.

My company has abandoned JavaScript wholesale with great relief. If it was a physical object we would have tossed it off the balcony.

Typescript is essential for large codebases / many devs.

> My company has abandoned JavaScript wholesale with great relief. If it was a physical object we would have tossed it off the balcony.

I would like to do the same with our gigantic SPA-ghetti.

There's no time like the present to start! Typescript's allowJS compiler option and comment-based approach lets you start with the spaghetti you have and slowly transition to Typescript.

(Though I'm still fan of the "rip off the Band-Aid" approach I used in a few projects back in the day: rename every .js to .ts and then fix compiler errors until things compile. allowJS is a great option now.)

The true source of your problems there are mutation, which in my opinion is the primary source of issues. Immutable data structures being the most benefit.

I also believe dynamic language tooling has regressed.

> I also believe dynamic language tooling has regressed.

I'd truthfully love to hear more about that. Care to elaborate?

I've worked with common lisp, clojure, python and javascript, and common lisp debuggers are just hands down better in everyway. Check this series for what should be a basic debugging experience by now http://malisper.me/debugging-lisp-part-1-recompilation/