Live data from Hacker News

Go 1/2 Proposal: Immutable Types

news.ycombinator.com

11–20 of 27 posts

Re: Go 1/2 Proposal: Immutable Types

#11
post #6
post #3

Earlier quoted context omitted.

I don’t know exactly why Go become successful but it is not because it’s a great language.

I'm looking for a new language to write server code in. I have been using Node for years but I want something that compiles to machine code and is statically typed. I've been looking at Go and I like that it is simple, has opinionated, official tooling, compiles very quickly for multiple platforms, is popular enough to have a decent library ecosystem, and I really like the idea of goroutines. What language would you…

> [Nim] is too new

It's actually a year older than Go (2008 rather than 2009).

If you don't want to use Nim because it's not stable enough or has too small an ecosystem (I disagree), you could try out Scala Native or Kotlin Native. A large portion of their ecosystem successfully compile to native code (although you may have issues with Scala Native compile times).

You can also check out OCaml.

Re: Go 1/2 Proposal: Immutable Types

#12
post #4

Earlier quoted context omitted.

Why do you think that? I like it's stripped-down feature set, and opinionated concurrency (although it's occasionally clunky). It's not perfect, and could have a lot more support for concurrency, but it's very workable and a joy to program in.

My personal problem with Go is that it doesn’t fit in any niche. If you want language optimized for productivity with a lot of high-level features, use Python. If you want maximum performance and low-level control, use C++ (or C, or Rust). If you need relatively high performance but can tolerate it not being 100% in exchange for nice things like GC, use Java. Where does Go fit?

If we're being serious here, I'm pretty sure Go is specifically for very very large orgs and almost no-one else. Go optimises for low GC pause time, fast compile times and in-your-face concurrency at the expense of almost everything else. The fact that CSP is formalised and well studied, and the lang itself is sufficiently C-like and stripped down makes it amenable to large scale static analysis as well.

Re: Go 1/2 Proposal: Immutable Types

#13
post #11
post #6

Earlier quoted context omitted.

I'm looking for a new language to write server code in. I have been using Node for years but I want something that compiles to machine code and is statically typed. I've been looking at Go and I like that it is simple, has opinionated, official tooling, compiles very quickly for multiple platforms, is popular enough to have a decent library ecosystem, and I really like the idea of goroutines. What language would you…

> [Nim] is too new It's actually a year older than Go (2008 rather than 2009). If you don't want to use Nim because it's not stable enough or has too small an ecosystem (I disagree), you could try out Scala Native or Kotlin Native. A large portion of their ecosystem successfully compile to native code (although you may have issues with Scala Native compile times). You can also check out OCaml.

I guess I mean "new" as in still not stable (pre-1.0 and still sees breaking changes). The fact it's been around so long and still hasn't matured is not reassuring at all.

I have checked out OCaml but it's not mainstream enough to have libraries for... anything really. Here's the first thing I checked just now: https://www.elastic.co/guide/en/elasticsearch/client/communi...

The OCaml client was abandoned 5 years ago. Nim doesn't even appear on the page!

This page says Kotlin Native is still in preview: https://kotlinlang.org/docs/reference/native-overview.html

Also, I am not seeing a reason why Go is not a good choice.

Re: Go 1/2 Proposal: Immutable Types

#14
post #7
post #6

Earlier quoted context omitted.

I'm looking for a new language to write server code in. I have been using Node for years but I want something that compiles to machine code and is statically typed. I've been looking at Go and I like that it is simple, has opinionated, official tooling, compiles very quickly for multiple platforms, is popular enough to have a decent library ecosystem, and I really like the idea of goroutines. What language would you…

You should give Nim a go. The ecosystem is growing fast :)

That's a good thing, but it means I might use Nim in 3-5 years, not right now. As a single dude without a team I need to spend time on getting things done, not building custom clients to databases etc.

Re: Go 1/2 Proposal: Immutable Types

#15
post #4

Earlier quoted context omitted.

Why do you think that? I like it's stripped-down feature set, and opinionated concurrency (although it's occasionally clunky). It's not perfect, and could have a lot more support for concurrency, but it's very workable and a joy to program in.

My personal problem with Go is that it doesn’t fit in any niche. If you want language optimized for productivity with a lot of high-level features, use Python. If you want maximum performance and low-level control, use C++ (or C, or Rust). If you need relatively high performance but can tolerate it not being 100% in exchange for nice things like GC, use Java. Where does Go fit?

If you need relatively high performance but can tolerate it not being 100% in exchange for nice things like GC, use Go. Where does Java fit in?

Re: Go 1/2 Proposal: Immutable Types

#16
post #15

Earlier quoted context omitted.

My personal problem with Go is that it doesn’t fit in any niche. If you want language optimized for productivity with a lot of high-level features, use Python. If you want maximum performance and low-level control, use C++ (or C, or Rust). If you need relatively high performance but can tolerate it not being 100% in exchange for nice things like GC, use Java. Where does Go fit?

If you need relatively high performance but can tolerate it not being 100% in exchange for nice things like GC, use Go. Where does Java fit in?

Java has existed for dramatically longer than Go and is extremely well-supported, both in terms of the core language and the tooling ecosystem.

You need a good reason to get rid of the incumbent, it's not just arbitrary.

Re: Go 1/2 Proposal: Immutable Types

#17
post #15

Earlier quoted context omitted.

If you need relatively high performance but can tolerate it not being 100% in exchange for nice things like GC, use Go. Where does Java fit in?

Java has existed for dramatically longer than Go and is extremely well-supported, both in terms of the core language and the tooling ecosystem. You need a good reason to get rid of the incumbent, it's not just arbitrary.

IMO there are plenty of reasons for me not to use Java. I could write an essay on it, but the only one that really matters is that for the 4 years that I coded in Java, I didn't enjoy it.

And to suggest Go doesn't offer anything different to Java is just silly.

Re: Go 1/2 Proposal: Immutable Types

#18
post #17

Earlier quoted context omitted.

Java has existed for dramatically longer than Go and is extremely well-supported, both in terms of the core language and the tooling ecosystem. You need a good reason to get rid of the incumbent, it's not just arbitrary.

IMO there are plenty of reasons for me not to use Java. I could write an essay on it, but the only one that really matters is that for the 4 years that I coded in Java, I didn't enjoy it. And to suggest Go doesn't offer anything different to Java is just silly.

Curious, what does it offer other than the goroutines and the native compilation?

Re: Go 1/2 Proposal: Immutable Types

#19
post #13
post #11

Earlier quoted context omitted.

> [Nim] is too new It's actually a year older than Go (2008 rather than 2009). If you don't want to use Nim because it's not stable enough or has too small an ecosystem (I disagree), you could try out Scala Native or Kotlin Native. A large portion of their ecosystem successfully compile to native code (although you may have issues with Scala Native compile times). You can also check out OCaml.

I guess I mean "new" as in still not stable (pre-1.0 and still sees breaking changes). The fact it's been around so long and still hasn't matured is not reassuring at all. I have checked out OCaml but it's not mainstream enough to have libraries for... anything really. Here's the first thing I checked just now: https://www.elastic.co/guide/en/elasticsearch/client/communi... The OCaml client was abandoned 5 years ago.…

> Also, I am not seeing a reason why Go is not a good choice.

I think you may have unnecessarily restricted yourself by wanting a language that produces native binaries and is GC'd. There simply _aren't_ that many mature and mainstream languages that compile to native binaries with a GC. I'd personally much prefer a more expressive language with a less robust ecosystem (and a virtual machine), but if an Elastic lib is a hard requirement for you, then I can't argue with your choice of Go.

Or use Haskell. Native binaries, opinionated, decent library ecosystem ;).

Re: Go 1/2 Proposal: Immutable Types

#20
post #19
post #13

Earlier quoted context omitted.

I guess I mean "new" as in still not stable (pre-1.0 and still sees breaking changes). The fact it's been around so long and still hasn't matured is not reassuring at all. I have checked out OCaml but it's not mainstream enough to have libraries for... anything really. Here's the first thing I checked just now: https://www.elastic.co/guide/en/elasticsearch/client/communi... The OCaml client was abandoned 5 years ago.…

> Also, I am not seeing a reason why Go is not a good choice. I think you may have unnecessarily restricted yourself by wanting a language that produces native binaries and is GC'd. There simply _aren't_ that many mature and mainstream languages that compile to native binaries with a GC. I'd personally much prefer a more expressive language with a less robust ecosystem (and a virtual machine), but if an Elastic lib i…

I am already very familiar with 2 interpreted languages, but not very familiar with any compiled languages. I'm doing the exact opposite of restricting myself.

And it's not just Elasticsearch. That's just one example. I would come up against many other requirements. Here's just one more: https://nats.io/download

Edit: And you're right, Haskell is something I should probably look into more. I haven't thought about it too much since I already do a lot of functional programming in JavaScript and I don't hear too much about Haskell being great for creating API servers.

One of my other concerns is that the project I'm planning will be a long-haul, and will have several other developers join in future. I want to have a decent market to choose from. And, being in Australia, it's small enough as it is. I'll shy away from remote workers since it's relating to sensitive healthcare data.

Post reply on HN