Hacker News new | ask | show | jobs
by linkmotif 2823 days ago
> To me it's the new coffeescript combined with the verbosity of J2EE

How is this the top voted comment on here? How does one go from Coffeescript/J2EE to TS? Coffeescript was... well... Coffeescript, a JS variant with better ergonomics. J2EE was a Java framework that also has no resemblance or connection to TS. What a bizarre comment but truly disturbing to see masses voting this up.

2 comments

No, I get it.

As a JS dev, Cofeescript appeared to be nothing more than an attempt to make JS more like Ruby.

From this perspective, TS appears to be nothing more than an attempt to make JS more like C#.

Either way, both appear to be attempts to use JS's massive flexibility to make the language work more like another language, because people are more familiar with that other language. And in both cases, there's a familiar response of "please don't do that. Please stop complaining about JS because it's not like your favourite language. Please learn to use it properly instead".

I played very briefly with CS to see what the excitement was about, and haven't touched TS at all, because I enjoy JS. But with Vue moving there, I think I'm going to have to bite the bullet and take a look.

I suggest you give TypeScript a try. You might like it, you might not, but at least then you'll know. It uses gradual typing - you can use static types as little or as much as you like. It's not C#.
I'm writing the backend in Go, so static typing is not where the resistance is coming from ;)

It's more like separation of concerns. I want Postgres to take care of data integrity. I want Go to take care of type safety. I want to give Vue all the flexibility it needs to handle user interaction. I don't really want to care about types in the UI, because Go can sort out whatever it sends to the server.

If I have to start writing code in the browser to translate between Go structs and TS classes then that's a step too far imho.

Try it before saying something like that.

TS is like swift, and it does not require type declaration. A lot is automatic.

Coffeescript - like Typescript - is a non-language. There are no native VMs for either. They have to be transpiled to work. If you're writing in either language, you're basically using large DSL macros which pump out JavaScript. Think PHP for scripting.

J2EE wasn't just a framework, it was core enhancements to the Java language, which caused a ton of bloat. EJBs, JSF, annotations, XML configurations, etc. Very similar to Typescript's bloat it adds on top of JavaScript. (You can't argue that it's not all bloat, as the resulting JS it produces runs fine without it all.)

> a non-language

It has a BNF that’s different from any other language, so it’s definitely a language. A language isn’t defined by its runtime.

> Think PHP for scripting.

PHP is a language...

> J2EE wasn't just a framework

What language features did J2EE introduce?

> You can't argue that it's not all bloat, as the resulting JS it produces runs fine without it all

Yeah, just like C, which compiles yo machine code, is complete bloat.

I love pedantic, stubborn techies. You asked how one goes from Coffeescript/J2EE to TS, as you apparently couldn't understand and considered it bizarre. I (and another commenter) explained what everyone else seemed to grasp that you couldn't, and now you're nit-picking simply to win an argument.

You're right, it's all just machine code in the end. Real programmers use a magnetized needle and a steady hand. You totally win.