- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
generators first in for comprehensions
Thu, 2009-02-19, 14:38
Looking at ticket #3a3a3a and glancing at the implementation, I can't see any reason it wouldn't be straightforward
to generalize it to allow ifs and vals to come before the first generator. The usefulness is suspect, but I can
imagine places where the distinction would be annoying (for instance, a hypothetical scala-generating program
would be simplified by not having to confirm a generator comes first.)
But I don't want to implement it only to find out it would be unwelcome, so...
a) if it's implemented nicely it would most likely be added
b) we know this is a wontfix (which is even better, as I could close the ticket without expending code)
c) ... since my underlying goal here is to reduce the open ticket count, hopefully there is no third option
Thanks,
On Thu, Feb 19, 2009 at 2:38 PM, Paul Phillips wrote:
> Looking at ticket #3a3a3a and glancing at the implementation, I can't see any reason it wouldn't be straightforward
> to generalize it to allow ifs and vals to come before the first generator. The usefulness is suspect, but I can
> imagine places where the distinction would be annoying (for instance, a hypothetical scala-generating program
> would be simplified by not having to confirm a generator comes first.)
>
> But I don't want to implement it only to find out it would be unwelcome, so...
>
> a) if it's implemented nicely it would most likely be added
> b) we know this is a wontfix (which is even better, as I could close the ticket without expending code)
> c) ... since my underlying goal here is to reduce the open ticket count, hopefully there is no third option
>
The cost is that we then have to change the spec and all documentation
to take account of this case. Unless there's a convincing use case it
looks like a wont fix to me.
Cheers