Re: [swift-dev] Swift AST documentation

2016-05-24 Thread Douglas Gregor via swift-dev
> On May 24, 2016, at 9:31 AM, Tim Bodeit wrote: > > I would be interested in documentation of the AST syntax as well. > > Are there any documents about this so far? No, not really; just the sources via doc comments, e.g., include/swift/AST/Decl.h. > If not, are there any plans for such docu

Re: [swift-dev] [swift-evolution] Possible bug with arithmetic optional comparison ?

2016-05-24 Thread Chris Lattner via swift-dev
> On May 24, 2016, at 11:14 AM, Joe Pamer wrote: > >>> >>> On May 24, 2016, at 9:35 AM, Jordan Rose via swift-dev >> > wrote: >>> >>> I wouldn’t phrase it this way. “nil” could just as easily been above all of >>> the integers. >>> >>> We added overloads for < and

Re: [swift-dev] [swift-evolution] Possible bug with arithmetic optional comparison ?

2016-05-24 Thread Joe Pamer via swift-dev
> On May 24, 2016, at 11:03 AM, Chris Lattner wrote: > > >> On May 24, 2016, at 9:35 AM, Jordan Rose via swift-dev > > wrote: >> >> I wouldn’t phrase it this way. “nil” could just as easily been above all of >> the integers. >> >> We added overloads for < and frie

Re: [swift-dev] [swift-evolution] Possible bug with arithmetic optional comparison ?

2016-05-24 Thread Chris Lattner via swift-dev
> On May 24, 2016, at 9:35 AM, Jordan Rose via swift-dev > wrote: > > I wouldn’t phrase it this way. “nil” could just as easily been above all of > the integers. > > We added overloads for < and friends that took optionals so that you could > sort an array by passing < and get something reas

Re: [swift-dev] AST – Understanding @lvalue

2016-05-24 Thread John McCall via swift-dev
> On May 24, 2016, at 9:48 AM, Tim Bodeit via swift-dev > wrote: > I couldn’t find any documentation about lvalues in Swift. Can anybody give me > a short explanation of what exactly an lvalue is? > > In C++ all variables, including those marked with the const modifier seem to > be lvalues. It

Re: [swift-dev] AST – Understanding @lvalue

2016-05-24 Thread Greg Titus via swift-dev
An lvalue is something that can be assigned to / changed. The terminology comes from assignment statements: in “foo = bar”, “foo” is a left-value (lvalue) and “bar" is a right-value (rvalue). The difference is that the lvalue is a named location that can take on a new value and an rvalue is just

[swift-dev] AST – Understanding @lvalue

2016-05-24 Thread Tim Bodeit via swift-dev
I couldn’t find any documentation about lvalues in Swift. Can anybody give me a short explanation of what exactly an lvalue is? In C++ all variables, including those marked with the const modifier seem to be lvalues. It seems to me, that this is not the case for let constants in Swift. I compar

Re: [swift-dev] [swift-evolution] Possible bug with arithmetic optional comparison ?

2016-05-24 Thread Jordan Rose via swift-dev
I wouldn’t phrase it this way. “nil” could just as easily been above all of the integers. We added overloads for < and friends that took optionals so that you could sort an array by passing < and get something reasonable out without having to provide your own comparison function, but you’re not

[swift-dev] Fwd: Swift AST documentation

2016-05-24 Thread Tim Bodeit via swift-dev
I would be interested in documentation of the AST syntax as well. Are there any documents about this so far? If not, are there any plans for such documentation in the future? > On 18 Jan 2016, at 21:26, Kostiantyn Koval via swift-dev > wrote: > > Hi, > > I'm trying to read and understand Sw

[swift-dev] Possible bug with arithmetic optional comparison ?

2016-05-24 Thread Yaman JAIOUCH via swift-dev
nil == 0 // false nil < 0 // true nil > 0 // false Is this a potential bug or an intended behavior ? ___ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev