Re: [RFC] List comprehension replacement and syntax

2018-02-08 Thread cdome
@bahm: could you please add links to IRC logs for discussions already happened?

Re: [RFC] List comprehension replacement and syntax

2018-02-08 Thread cdome
I see a post for the first time, so it is likely has been blocked. Couple of thoughts in loud: In Nim expressions have already a proper type, no need wrap then into `let|var` assignments. `for x in [1, 2, 3, 4]: if x mod 2 == 0: x else: x + 1` should be a already valid. I think it makes sense

Re: [RFC] List comprehension replacement and syntax

2018-02-08 Thread mratsim
I'm surprised no one replied to your thread yet. The goal is to have "for" be a expression so it could sit on the right-hand side of an assignment. I'm not sure how it will be in practice for the: initialization - for loop - return

[RFC] List comprehension replacement and syntax

2018-02-03 Thread bahm
Before we begin: I'm new to Nim and it's been a while since I did anything to do with AST, parsing, etc. so my suggestions may be whacky. If they are, simply say so and turn the discussion in the right direction. **Where we're at** List comprehension is currently available through the _future_