top | item 43396729

(no title)

timkq | 11 months ago

TypeScript & Rust don't "look nice to work with" because they force you to write maintainable code that doesn't just stop working because of a random runtime error. In my opinion, Go looks nice to work with but actually is a hidden monster full of footguns.

discuss

order

hnlmorg|11 months ago

Curious to read that because I’ve always had the opposite opinion of the above:

Typescript looks nice to work with but the tool chain is horrible (this isn’t really Typescripts fault though, more a synonym of it having to compile to JS).

Go looks horrible to work with (too simplified syntax) but is actually really nice because the tooling is (mostly) spot on and it’s simplified syntax weirdly helps with maintainability for large projects that have evolved over multiple years.

I guess this just goes to show how much personal preference can be a driving force behind our platforms of choice.

frou_dh|11 months ago

> Typescript looks nice to work with but the tool chain is horrible (this isn’t really Typescripts fault though, more a synonym of it having to compile to JS).

It's not even inherent to TS that the toolchain must be a morass of moving parts and multiple config files, as shown by Deno in contrast to Node.

frontfor|11 months ago

I’m not sure about Go being full of footguns, but for one, a panic in any goroutine forcibly terminates the entire application.

timkq|11 months ago

Simplified syntax helps with maintainability for large projects? You're talking about a "modern" language which had no generics for the better part of its life? The language filled to the brim with "if err != nil"? Go is horrible to work with.

odyssey7|11 months ago

JS isn’t breaking, it’s the layers between there and Typescript.

a2800276|11 months ago

Exactly, Typescript doesn't stop working because of random runtime errors, it stops working because you didn't update the toolchain tangle last Thursday and then some configuration file got out of whack with the tsc defaults ;-)

pjmlp|11 months ago

Typescript is like C++ and Objective-C for C.

Technically, it provides an improved type system that offers the tooling to write safer code.

In practice, plenty of folks just rename the file extension and keep coding as they always did.

alpaca128|11 months ago

Technically TypeScript doesn’t force you to anything other than writing valid JS code. Its design was great for wide adoption but also suffers from the JS part.

kalekold|11 months ago

> Go looks nice to work with but actually is a hidden monster full of footguns.

Really? Me and my team been using it for years with no problems whatsoever.

tgv|11 months ago

While Typescript has the gaping hole that is typing external data. Your code can't enforce that in TS, but in Go you're forced to.

I do admit Go has an easily found foot gun: nil pointers. It's a small one though, in comparison to the original problems with nil pointers. More stubbing your toe than shooting your foot.

freeopinion|11 months ago

Do you feel the same way about English?