Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-24 Thread Thorsten Seitz via swift-evolution
I would prefer for $ being available as operator symbol, so -1 to the proposal. -Thorsten > Am 22.10.2016 um 09:22 schrieb Will Stanton via swift-evolution > : > > On $ specifically, I found this Wikipedia article listing native operators > from other languages: >

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-22 Thread Will Stanton via swift-evolution
On $ specifically, I found this Wikipedia article listing native operators from other languages: https://en.wikipedia.org/wiki/Operator_(computer_programming). Haskell was listed with $ as an operator (‘Anything appearing after it will take precedence over anything that comes before’ per

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-21 Thread Jonathan S. Shapiro via swift-evolution
Now for a position: -1 on this proposal, because '$' should be legal in *any* identifier position. +1 for the proposal that '$' should be legal in *any* position. ___ swift-evolution mailing list swift-evolution@swift.org

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-21 Thread Jonathan S. Shapiro via swift-evolution
Several people here have called out implicit closure parameters as a concern, which is actually irrelevant to adopting '$' in parameters. It is perfectly feasible to accept '$' in parameters *generally*, and reject identifiers of the form $ followed by one or more decimal digits in defining

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-21 Thread Jonathan S. Shapiro via swift-evolution
On Wed, Oct 19, 2016 at 1:02 PM, Kevin Ballard via swift-evolution < swift-evolution@swift.org> wrote: > I'm actually vaguely surprised that the other currency symbols are > considered valid identifiers, since they're not alphanumeric symbols. As > for turning them into operators, it's a cute

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-21 Thread Jonathan S. Shapiro via swift-evolution
On Tue, Oct 18, 2016 at 7:20 AM, Jay Abbott via swift-evolution < swift-evolution@swift.org> wrote: > It's s symbol. Here are some others: > ! & * ( . - > > You wouldn't want to allow an identifier to start with any of those > symbols, for obvious reasons. > That's an assertion. Can you

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-21 Thread Jonathan S. Shapiro via swift-evolution
On Fri, Oct 14, 2016 at 1:53 PM, Hooman Mehr via swift-evolution < swift-evolution@swift.org> wrote: > I don’t think $ will be become available to be used as an operator if we > remove its identifier use. > I'm about to put out a revised proposal for operators and symbol identifiers that

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-20 Thread Brent Royal-Gordon via swift-evolution
> On Oct 20, 2016, at 2:52 AM, Benjamin Spratling via swift-evolution > wrote: > > struct Note { > /// half-steps from middle-C, nil means the note is a rest > var pitch:Int? > //more properties > init?(xmlNode: XMLNode) { > if

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-20 Thread Benjamin Spratling via swift-evolution
Howdy, It seems the main question in discussing this proposal is “If $0, $1, $2, $3 are automatic closure parameters, then what is “$”?”. Another thing that has also recently come to my attention that Swift does not have a “result of previous expression” magic identifier as some

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-20 Thread Goffredo Marocchi via swift-evolution
Sent from my iPhone > On 20 Oct 2016, at 07:54, Russ Bishop via swift-evolution > wrote: > > >> On Oct 17, 2016, at 11:45 PM, Rien via swift-evolution >> wrote: >> >> “culturally offensive” is not a logical argument. >> A programming

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-20 Thread Russ Bishop via swift-evolution
> On Oct 17, 2016, at 11:45 PM, Rien via swift-evolution > wrote: > > “culturally offensive” is not a logical argument. > A programming language should be logically consistent no matter how many > cultures are offended by it. > If Swift is driven by SJW’s then very

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-19 Thread Kevin Ballard via swift-evolution
I'm actually vaguely surprised that the other currency symbols are considered valid identifiers, since they're not alphanumeric symbols. As for turning them into operators, it's a cute idea, but it doesn't work for any symbol that's used by multiple countries. For example, would $3.50 be USD, AUD,

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-19 Thread Kevin Ballard via swift-evolution
On Mon, Oct 17, 2016, at 11:25 PM, Jean-Denis Muys via swift-evolution wrote: > Now for the elephant in the room: '$' is a currency symbol. As such it > should be handled like any other currency symbol. Thinking otherwise > would be very culturally offensive. > > So can I use € as an variable name

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-18 Thread Nevin Brackett-Rozinsky via swift-evolution
It seems natural to me that currency symbols should be operators. This would allow, for example, prefix and postfix operators that take a number and return a “Currency” instance: let inMyPocket = $20 let lochNess = £3.50 let twoBits = 25¢ if (inMyPocket - lochNess) > twoBits { … } Of course,

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-18 Thread Tony Allevato via swift-evolution
On Fri, Oct 14, 2016 at 1:00 PM Chris Lattner via swift-evolution < swift-evolution@swift.org> wrote: > Hello Swift community, > > The review of "SE-0144: Allow Single Dollar Sign as a Valid Identifier" > begins now and runs through October 18. The proposal is available here: > > >

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-18 Thread Dave Abrahams via swift-evolution
on Mon Oct 17 2016, Jean-Denis Muys wrote: > While I already tersely supported this proposal, following all the negative > reactions, I feel compelled to revisit my position. The main reason is that > it strikes me that most points of view so far, including mine, were

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-18 Thread Jay Abbott via swift-evolution
> > Now for the elephant in the room: '$' is a currency symbol. As such it > should be handled like any other currency symbol. Thinking otherwise would > be very culturally offensive. > The fact that it's a currency symbol is totally irrelevant. It's s symbol. Here are some others: ! & * ( . -

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-18 Thread Anton Zhilin via swift-evolution
I'd prefer to replace $ with # in closure parameters, plus make $ equal in rights to other currency symbols. In C and JS, dollar sign is actually equal in rights to other currency symbols. Swift is closer to them than to Perl, Shell, PHP, so it makes sense to follow them here.

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-18 Thread Rien via swift-evolution
“culturally offensive” is not a logical argument. A programming language should be logically consistent no matter how many cultures are offended by it. If Swift is driven by SJW’s then very quickly it will cease to be an effective language. Having said that, I cannot think of a logical reason

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-18 Thread Jean-Denis Muys via swift-evolution
While I already tersely supported this proposal, following all the negative reactions, I feel compelled to revisit my position. The main reason is that it strikes me that most points of view so far, including mine, were really culturally short sighted, and far too much US-centric. I totally agree

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-16 Thread Jay Abbott via swift-evolution
> * What is your evaluation of the proposal? I am against it. > * Is the problem being addressed significant enough to warrant a change to Swift? No - if this change were made it would be a regression. The rationale for removing it in the first place was and remains valid. > * Does this

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-16 Thread Jacob Bandes-Storch via swift-evolution
Proposal link: https://github.com/apple/swift-evolution/blob/master/propo sals/0144-allow-single-dollar-sign-as-valid-identifier.md > * What is your evaluation of the proposal? > -1. The proposal does not actually provide motivation for keeping $ beyond "the Dollar library

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-15 Thread Russ Bishop via swift-evolution
> On Oct 14, 2016, at 12:59 PM, Chris Lattner via swift-evolution > wrote: > > Hello Swift community, > > The review of "SE-0144: Allow Single Dollar Sign as a Valid Identifier" > begins now and runs through October 18. The proposal is available here: > > >

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-15 Thread Jonathan Hull via swift-evolution
> * What is your evaluation of the proposal? -1. I would much rather see it either as an operator, or more likely as some other special syntax/meaning in Swift. > * Is the problem being addressed significant enough to warrant a change > to Swift? No. Providing backwards

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-15 Thread Haravikk via swift-evolution
> On 14 Oct 2016, at 20:59, Chris Lattner via swift-evolution > wrote: > > * What is your evaluation of the proposal? Not in favour, sorry. While I've used this kind of pattern in Javascript I just don't see what it really adds compared to a more explicit

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-14 Thread Will Stanton via swift-evolution
I’m a bit curious about how `$` is/would be used as a prefix operator! Perhaps I’m not creative :-( Regards, Will Stanton > On Oct 14, 2016, at 6:42 PM, Alex Martini via swift-evolution > wrote: > >> On Oct 14, 2016, at 1:53 PM, Hooman Mehr via swift-evolution >>

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-14 Thread Charles Srstka via swift-evolution
> On Oct 14, 2016, at 2:59 PM, Chris Lattner via swift-evolution > wrote: > > Hello Swift community, > > The review of "SE-0144: Allow Single Dollar Sign as a Valid Identifier" > begins now and runs through October 18. The proposal is available here: > > >

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-14 Thread Daniel Duan via swift-evolution
> On Oct 14, 2016, at 3:42 PM, Alex Martini via swift-evolution > wrote: > >> On Oct 14, 2016, at 1:53 PM, Hooman Mehr via swift-evolution >> > wrote: >> >>> On Oct 14, 2016, at 1:49 PM, Daniel Duan via

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-14 Thread Richard Wei via swift-evolution
> * What is your evaluation of the proposal? -1. If it were a valid identifier, $ would look even more confusing when used as a type name. I’d rather see $ used as an operator. > * Is the problem being addressed significant enough to warrant a change to > Swift? > * Does this proposal fit well

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-14 Thread Alex Martini via swift-evolution
> On Oct 14, 2016, at 1:53 PM, Hooman Mehr via swift-evolution > wrote: > >> On Oct 14, 2016, at 1:49 PM, Daniel Duan via swift-evolution >> > wrote: >> >> Agree with Robert here. I'd rather be able to use

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-14 Thread Matthew Johnson via swift-evolution
> * What is your evaluation of the proposal? -1. I don’t like the idea of a user-defined `$` identifier. I agree with the reasons for removing it. If it is allowed as a user-defined entity it feels an operator is more appropriate. Otherwise, it could be reserved as a special,

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-14 Thread Hooman Mehr via swift-evolution
I don’t think $ will be become available to be used as an operator if we remove its identifier use. > On Oct 14, 2016, at 1:49 PM, Daniel Duan via swift-evolution > wrote: > > Agree with Robert here. I'd rather be able to use it as part of operators. > Currently

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-14 Thread Daniel Duan via swift-evolution
Agree with Robert here. I'd rather be able to use it as part of operators. Currently the character set for operators and identifier head are mutually exclusive. So this proposal will remove that possibility. This deserves some discussion. Daniel Duan Sent from my iPhone > On Oct 14, 2016, at

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-14 Thread Felipe Cypriano via swift-evolution
-1 I agree with the motivations to remove it. On Fri, Oct 14, 2016, at 12:59, Chris Lattner via swift-evolution wrote: > Hello Swift community, > > The review of "SE-0144: Allow Single Dollar Sign as a Valid > Identifier" > begins now and runs through October 18. The proposal is > available

Re: [swift-evolution] [Review] SE-0144: Allow Single Dollar Sign as a Valid Identifier

2016-10-14 Thread Robert Widmann via swift-evolution
As the author of the patch that introduced this and the patch that will come out of this discussion, I have no problems one way or the other. Just bear in mind that if $ is an identifier head character then it cannot be used in operators - something I have a library with a vested interest in.