News for hackers. Stuff that matters.
Re:My favorite Rust function by baby on Saturday October 12, 2019 @10:23PM (#21237870)
I work with Rust only these days, it’s really an awesome language and I wish everyone working with system languages would switch to Rust. Yet, I find Golang to be a much clearer language to read (and I read a shit ton of code). I hope they don’t add generics, but I wish they would options, results, sum types in general, redeclaring variables, the ? Operator, etc.
Re:My favorite Rust function by EdwardDiego on Sunday October 13, 2019 @03:45AM (#21239053)
Interesting, I've been reading a lot of Golang of late as we move into k8s world, and I find it hard to read, mainly in terms of package layout - types and their related functions are often in very different places.

But it's certainly less semantically dense compared to Rust or Scala etc.

Re:My favorite Rust function by saturn_vk on Sunday October 13, 2019 @03:08AM (#21238889)
I doubt that any genetic syntax will significantly impact go readability. The only syntax overhead will be in type definitions, not in type usage, and the later is present a lot more than the former. Couple that with the current need to add extra type assertion on type usage, and you may be looking at overall readability improvement
Re:My favorite Rust function by emptysea on Sunday October 13, 2019 @02:07AM (#21238656)
How would Option<T>, Result<T, E>, and sum types work without generics?
Re:My favorite Rust function by baby on Monday October 14, 2019 @02:41PM (#21251393)
Native support is the answer.
Re:My favorite Rust function by rumblefrog on Sunday October 13, 2019 @02:28AM (#21238728)
Empty interface perhaps.