News for hackers. Stuff that matters.
Re:Rust – A hard decision pays off by throwaway2037 on Wednesday August 24, 2022 @07:43PM (#32587413)
I feel the same. Java and C# have an equivalent called 'var'. Unless the scope is tiny, I always avoid it. Also, in Java when you create a lambda, it is possible to exclude the parameter types.

    foo(x) -> get_something_complicated(bar(x))
It is not good for readability in large source bases.
Re:Rust – A hard decision pays off by einpoklum on Friday August 26, 2022 @03:26AM (#32604234)
With C++ lambdas, it's similar, but the syntax is a bit uglier:

  [](auto&& x) { return get_something_complicated(bar(x)); }
and you can decide whether you want a value (no &'s), an lvalue reference (&), or a forwarding reference (&&). I think with C++20 you can also use a concept instead of auto for a constrained parameter type.