News for hackers. Stuff that matters.
Re:Two years of Rust by comex on Monday May 15, 2017 @04:04PM (#14344662)
Go, at least, is far simpler as a language than Rust, and the implementation (compiler) is less complex overall, especially if you count LLVM on Rust's side. I suppose that Go programs exhibit more complex behavior at runtime due to the GC and green threads and stuff, but it's a huge stretch to call Go more complicated overall.

On the other hand, I'd argue that Rust makes up for the complexity with performance, power (ability to express more complex programs in less code), and safety (not just memory safety, which Go also mostly guarantees, but the ability to leverage the type checker to verify code correctness in general). C++, on the other hand, is more complex (due to all the legacy drift), yet equal in performance, less safe, and less powerful in most respects (there are some things C++ can do that Rust can't, but more things for which the opposite applies).

Re:Two years of Rust by kbenson on Monday May 15, 2017 @04:27PM (#14344829)
> I suppose that Go programs exhibit more complex behavior at runtime due to the GC and green threads and stuff

Given the GP's note about the connection between written and compiled code and how a GC affects that, I think this is exactly what is being referred to. I.e. a GC makes everything much simpler up until it doesn't, and then it makes it much more complicated. That point may never be reached in many programs, but it may be hard in some cases to tell whether it's something you have to worry about at all.

Re:Two years of Rust by infogulch on Monday May 15, 2017 @06:46PM (#14345855)
> GC makes everything much simpler up until it doesn't, and then it makes it much more complicated

I would say that's true in general, but in Go there's a lot more room to ask the GC to get out of your way if you need that than most.

Re:Two years of Rust by webkike on Monday May 15, 2017 @04:26PM (#14344821)
Consider how interfaces work and how you would have to implement them. Rust may have a more complicated type system and I suppose enums are more complicated in Rust, but the things I value as simple are more simple in Rust than Go.
Re:Two years of Rust by comex on Monday May 15, 2017 @05:05PM (#14345114)
What about interfaces? The basic idea of fat pointers with vtables works the same as Rust's trait objects. If you mean the ability to dynamically cast from one interface type to another, which Rust doesn't support - that does require a global list of implemented interfaces per type, but without generics that's not too hard to implement. (In Rust, it would be drastically more complex, verging on impossible to pull off with a good UX, due to various language features including wildcard impls, type-parameterized traits, and a Turing-complete type system.)
Re:Two years of Rust by webkike on Monday May 15, 2017 @05:23PM (#14345250)
When ever you would need to box a trait object in Rust Go automatically performs a heap allocation that is garbaged collected at some point. A bit more is explained here https://research.swtch.com/interfaces Basically there are some property of Go interfaces that make them far more dynamic than traits and implementations in Rust.
Re:Two years of Rust by pcwalton on Monday May 15, 2017 @07:45PM (#14346217)
> (In Rust, it would be drastically more complex, verging on impossible to pull off with a good UX, due to various language features including wildcard impls, type-parameterized traits, and a Turing-complete type system.)

Swift can downcast, and it has generic extensions and generic protocols. I highly suspect it has a Turing-complete type system as well.

Supporting this requires heroic effort in the compiler, but it can be done.