Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ball is in your court now typescript-on-the-serverside ppl!


I’m not a typescript person, but to be fair to typescript, its type system is still much more expressive than Go’s, even with the generics addition


Typescript is stricter and safer while also being less obtrusive than Go


Typescript is also far slower both in terms of runtime and compilation time, uses much more memory, and is far more complicated which in turn has led to a ton more compiler bugs. It also inherits a ton of questionable features and API decisions from Javascript and has a tiny standard library which means most Typescript developers repeatedly end up turning to the NPM ecosystem which is an unmitigated disaster. Deployment also isn't even remotely as simple and reliable as Go even with Deno compile.

I like Typescript a lot but the reality of Typescript development is not great.


I'm just talking about the type system here. Go could easily add the best features of typescript without incurring any runtime costs.


This isn't super clearcut. Typescript has lots of footguns and famously says that soundness is not one of their driving factors. There are lots of ways to devolve to accidental implicit any's (even with the no implicit any strict rule turned on).

Of course, Go makes zero attempt to enforce nullability (nilability?) in its type system... so... win some, lose some I guess.


Any language based on JS can't be safer than Go. The end result of TS is JS which is a dynamic language.


The usual end result of Go is machine code, machine code is not safe to the degree you would consider Go to be safe. Yet you consider Go to be safe but not TS.


That's absurd. If TS can't be secure because it compiles to an unsafe language (JS), Go can't be secure because it compiles to unsafe assembly.


Ok, so if Go compiled to JS it would be a dynamic language?

https://github.com/gopherjs/gopherjs


Ultimately everything ends up as machine code, which is untyped.


I didn't realize there was a "war" going on between the two groups.

If there is, I imagine it's not among the type of people who you'd want leading technical decisions at your company.


I don't see how they're competing, TypeScript can still share code between client and serverside, go "can't". They're not exclusive to each other, routing "form submissions" though a ts verification layer and then down to Go makes sense to me if you need the Go performance but want to share things client and server side.

Also, application servers are cheap, persistent, fast and durable storage isn't, these won't be written in TS.

TL;DR: different problem domains, not important




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: