News for hackers. Stuff that matters.
Re:Compile time evaluation in Nim, Zig, Rust and C++ by dom96 on Tuesday April 26, 2022 @03:44PM (#31172260)
What's so awkward about multi line lambdas? You can achieve them in the same way you can in JavaScript, can't get easier than that.

    import sequtils

    let x = [1,2,3,4,5]
    echo x.map(
      proc (num: int): int =
        num*2
    )
Re:Compile time evaluation in Nim, Zig, Rust and C++ by throwaway234272 on Wednesday April 27, 2022 @03:10AM (#31177161)
The lambdas are terrible in nim, you currently have to `import sugar` for bandaid fix.

Nim is in progress to fix them, see here: https://github.com/nim-lang/Nim/pull/11992

I don't see why people can't admit to shortcomings in languages? I like Nim a lot, doesn't mean I'm blind to where it falls short or needs improvement...