Hacker News new | ask | show | jobs
by fenomas 669 days ago
Certainly we had large teams using JS before TS - back in ye olde days before modules, when everyone picked or built a smallish abstraction (e.g. jquery) and built smallish unconnected things on top of it. But now that modules are mature and thousands of files can all reference each other, types are just necessary. They don't have to be declared in TS - you can get by to various extents with JSDocs or inference - but there's no benefit to doing those things, so large teams don't.

What I am saying is, across several comments you seem to be arguing that you think TS's massive popularity is partly due to its proponents liking Java or classical inheritance, or not understanding FP or closures, or something. And that's just wildly not true. And it's also not even true that the TS world particularly favors OO. If you weren't saying those things and I misunderstood, my bad!

1 comments

It’s fair that there are proponents & value props beyond those early folks that came from the Java type world.

I guess I’m tainted/jaded by the early proponents and initial rationale that was absolutely tied to - “ewwww dynamic types!?! Gross, where are my strong/static types!?”. I’ve just fought that too many times - and that was a very strong argument at the inception of TS. There certainly are value props that go beyond and more to be discovered I’m sure.

I feel like MANY if not most of the devs I work with today simply use TS cause “that’s what you do these days” - but they have no clue what the “why” is and are baffled by native JS typing - and still consider JS “garbage” as a result. Bummer. In the Scala community I hear so much hate for NodeJS because it enables JS for server-side, “where it doesn’t belong” for many of these same old reasonings about typing (even with TS!?).

So yah, there’s value there, but you don’t NEED it to write large, good software. I’m clearly just jaded by the religious debates that have gone on and on - so despite their utility, I can come across very anti to the “solutions” to IMHO shitty arguments.

TS rocks so hard for doing pure functional stuff, and its support for type algebra can be an absolute blast.

I try to avoid OO now days, and TS is my go-to language for modeling problems in the functional domain!

I've worked adjacent to TS since it was a thing and I've never heard of anyone associating it with Java or classic OO or the other stuff you've brought up. Maybe it's seen that way by some other community somewhere, but not by TS users.

I mean - it's literally just JS with types! It still has closures, and still has everything about JS one can call functional. It's not some dramatically different language - it's JS, with a large category of runtime errors changed into linter errors. (And that's why people use it - not because they think "eww gross!" about something, which is a frankly silly thing to claim.)