Live data from Hacker News

Should I Rust or Should I Go?

kerkour.com

171–178 of 178 posts

Re: Should I Rust or Should I Go?

#171
post #145

Earlier quoted context omitted.

> I don't think Rust is over-hyped; almost everything I would have used Haskell for I do in Rust now. As a Haskell fan this is very interesting! What sort of things do you write where you find Rust is a better fit? No code that I write in Haskell would be much better off without GC so I struggle to think of reasons Rust could be a better fit.

The _language_ isn't a vast advantage; the type system is near-identical (which is important). Both have their advantages, but the ecosystem (tools, crates, documentation, educational material, community) is so much better and richer in Rust, and of course wrt. performance and memory frugality, Haskell doesn't even compete. (I haven't never been able to use Haskell professionally because of that, but I use Rust for w…

Good to know about the ecosystem differences, thanks. Hopefully with some effort Haskell will be able to catch up there. And yes, Haskell gets some defaults wrong.

Regarding the type systems, they're definitely not near identical :) Haskell's is far more powerful. Perhaps you mean "the type systems are near identical for the kinds of programs I write". Speaking for myself, I could never work without a straightforward implementation of higher-kinded types, for example.

Re: Should I Rust or Should I Go?

#172
post #17

In what world is Go more reliable or faster than Java? Especially modern Java (or other good JVM languages like Kotlin). It compiles faster but that is about it. Which is a good thing too because it's verbose AF and heavily reliant on code generation even after generics shipped so that compiler lines/s actually matters. The only knock you can put on Java for reliability is null-safety but lets be real, nil pointers,…

> Java is easily faster and more reliable than Go I work in Java for my day job and I disagree. 1. Cold starts for Java serverless (lambda) are worse than scripting languages 2. For everything else, Java uses 5-10x more memory than Go. The memory overhead difference is really noticeable while the CPU difference is often similar.

> Cold starts for Java serverless (lambda) are worse than scripting languages

Id be hesitant to use any VM dependant language in serverless... I mean I love elixir and built my startup on it but I'd never consider trying to run it as a lambda function for the same reason. You're fighting against the grain.

Re: Should I Rust or Should I Go?

#173
post #171

Earlier quoted context omitted.

The _language_ isn't a vast advantage; the type system is near-identical (which is important). Both have their advantages, but the ecosystem (tools, crates, documentation, educational material, community) is so much better and richer in Rust, and of course wrt. performance and memory frugality, Haskell doesn't even compete. (I haven't never been able to use Haskell professionally because of that, but I use Rust for w…

Good to know about the ecosystem differences, thanks. Hopefully with some effort Haskell will be able to catch up there. And yes, Haskell gets some defaults wrong. Regarding the type systems, they're definitely not near identical :) Haskell's is far more powerful. Perhaps you mean "the type systems are near identical for the kinds of programs I write". Speaking for myself, I could never work without a straightforward…

Well, now you need to define "Haskell". Haskell 98 has effectively the same type system as Rust (ignoring lifetimes). GHC does not. I guess I'm not a fan of the overly abstract types in later GHCs.

Re: Should I Rust or Should I Go?

#174
post #171

Earlier quoted context omitted.

Good to know about the ecosystem differences, thanks. Hopefully with some effort Haskell will be able to catch up there. And yes, Haskell gets some defaults wrong. Regarding the type systems, they're definitely not near identical :) Haskell's is far more powerful. Perhaps you mean "the type systems are near identical for the kinds of programs I write". Speaking for myself, I could never work without a straightforward…

Well, now you need to define "Haskell". Haskell 98 has effectively the same type system as Rust (ignoring lifetimes). GHC does not. I guess I'm not a fan of the overly abstract types in later GHCs.

Normally by "Haskell" I'd mean "GHC", since that's the Haskell that everyone actually uses, but even Haskell 98 has higher-kinded types!

Re: Should I Rust or Should I Go?

#175
post #110
post #90

Earlier quoted context omitted.

Can you provide an example of where rust has better tooling than Go?

Offhand, I like rustfmt a lot more than gofmt because it handles long lines rather than only changing things within a given line; in my opinion, any time I need to manually format something myself, that's a failure of the formatting tool. I also find rustdoc to be much more flexible than Go's documentation functionality (which I forget the name of, but I assume it's something like `go doc`). At least the last time I…

Prefixing doc comments with the ident name is a convention that isn't enforced in any way. You must have been using a 3rd party linter.

Re: Should I Rust or Should I Go?

#176
post #175
post #110

Earlier quoted context omitted.

Offhand, I like rustfmt a lot more than gofmt because it handles long lines rather than only changing things within a given line; in my opinion, any time I need to manually format something myself, that's a failure of the formatting tool. I also find rustdoc to be much more flexible than Go's documentation functionality (which I forget the name of, but I assume it's something like `go doc`). At least the last time I…

Prefixing doc comments with the ident name is a convention that isn't enforced in any way. You must have been using a 3rd party linter.

So any comment that happens to be right before a public type, function, etc. is exported into documentation without any special syntax needed? Honestly, in my opinion that's even worse, given that part of the whole point of tools like this is to generate public-facing documentation for websites; I want doc comments to be visibly different than regular comments, but it sounds like the only thing that would determine whether a comment is exported is the surrounding context.

Re: Should I Rust or Should I Go?

#177
post #176
post #175

Earlier quoted context omitted.

Prefixing doc comments with the ident name is a convention that isn't enforced in any way. You must have been using a 3rd party linter.

So any comment that happens to be right before a public type, function, etc. is exported into documentation without any special syntax needed? Honestly, in my opinion that's even worse, given that part of the whole point of tools like this is to generate public-facing documentation for websites; I want doc comments to be visibly different than regular comments, but it sounds like the only thing that would determine w…

You're just making problems up now ...

Re: Should I Rust or Should I Go?

#178
I'm going to restate here again: Go is static compiling friendly, you just ship a single executable and you're done, can't believe how easy is it to upgrade down the road.

rust, java, etc are much more complex.

Post reply on HN