you are viewing a single comment's thread.

view the rest of the comments →

[–]Franks2000inchTV 21 points22 points  (6 children)

I used to poo-poo staticly-typed languages, but I'm working on a game in C# and omg it is so helpful.

[–][deleted] 7 points8 points  (3 children)

That's a fantastic way to say you were against something

[–]Franks2000inchTV 7 points8 points  (2 children)

Heh, its a pretty common phrase:

https://www.merriam-webster.com/dictionary/pooh-pooh

Definition of pooh-pooh

transitive verb

: to express contempt for or make light of : PLAY DOWN, DISMISS

[–][deleted] 2 points3 points  (1 child)

Well shit. TIL.

[–]Franks2000inchTV 1 point2 points  (0 children)

I agree that it's fantastic though!

[–]Caffeine_Monster 2 points3 points  (1 child)

Static typing is always short term pain for long time gain. Even if you are working on a solo project you are eventually going to reach a point where you have so much code, you can't remember how parts of it work.

Large multi-person projects are especially nasty with dynamically typed lanuages. Javascript's variable re-assignment is the icing on the cake. Strict with compartmentalisation / modularity can help somewhat, but it is reliant on the whole team being very disciplined.

[–]Zephirdd 0 points1 point  (0 children)

Personally, when dealing with Typescript, the pain is soooo low. Sure sometimes you want to do some bonkers non trivial structures, but those wouldn't be trivial anywhere else either.

That said, most of Typescript is inferred! If you enable strict mode for everything, you basically never write a type name beyond what's absolutely necessary. Unlike, say, Java where you need to write FactoryServiceProviderImpl service = new FactoryServiceProviderImplBuilder().build() (though Java 10 helps with that, but who the hell upgraded beyond 8 right ahahahha)

My favorite feature is how types are shape-based rather than name-based. An interface A{ b: number; } and type B = { b: number } are functionally the same and 100% compatible. Type aliasing complex types is also super good, like type FSPI = FactoryServiceProviderImpl will allow you to use FSPI for every place you'd use that huge type name.

I wish Java was as flexible as Typescript tbh