Re: Lazy Literal Range: Stooid late-nite idea?

2011-10-09 Thread Jacob Carlborg
On 2011-10-09 13:43, Lutger Blijdestijn wrote: Jacob Carlborg wrote: On 2011-10-09 08:33, Vladimir Panteleev wrote: On Sun, 09 Oct 2011 06:06:21 +0300, Nick Sabalausky wrote: Great, right? But what about this?: auto x = [runtimeExpressionA, runtimeExprB, runtimeExprC, etc].find(blah); Wi

Re: Lazy Literal Range: Stooid late-nite idea?

2011-10-09 Thread Lutger Blijdestijn
Jacob Carlborg wrote: > On 2011-10-09 08:33, Vladimir Panteleev wrote: >> On Sun, 09 Oct 2011 06:06:21 +0300, Nick Sabalausky wrote: >> >>> Great, right? But what about this?: >>> >>> auto x = [runtimeExpressionA, runtimeExprB, runtimeExprC, >>> etc].find(blah); >> >> With the anonymous delegate

Re: Lazy Literal Range: Stooid late-nite idea?

2011-10-09 Thread Jacob Carlborg
On 2011-10-09 08:33, Vladimir Panteleev wrote: On Sun, 09 Oct 2011 06:06:21 +0300, Nick Sabalausky wrote: Great, right? But what about this?: auto x = [runtimeExpressionA, runtimeExprB, runtimeExprC, etc].find(blah); With the anonymous delegate literal syntax suggested by Andrei a while ago

Re: Lazy Literal Range: Stooid late-nite idea?

2011-10-08 Thread Vladimir Panteleev
On Sun, 09 Oct 2011 06:06:21 +0300, Nick Sabalausky wrote: Great, right? But what about this?: auto x = [runtimeExpressionA, runtimeExprB, runtimeExprC, etc].find(blah); With the anonymous delegate literal syntax suggested by Andrei a while ago, you should be able to write this as: a

Lazy Literal Range: Stooid late-nite idea?

2011-10-08 Thread Nick Sabalausky
Suppose you want to search through a range (yea, really hypothetical so far... ;) ) auto x = ["foo", "bar", "bat", "meow"].find("bar"); assert(x.front == "bar"); Great, right? But what about this?: auto x = [runtimeExpressionA, runtimeExprB, runtimeExprC, etc].find(blah); Doable,