Re: Pipe Operator v2

From: Date: Wed, 25 Jan 2017 06:06:32 +0000
Subject: Re: Pipe Operator v2
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-97949@lists.php.net to get a copy of this message
As a userland developer I feel $$ (or some variation starting with $) is reasonably natural - it's a variation on a regular variable. Sent from my iPhone > On 25 Jan 2017, at 03:53, Levi Morrison <levim@php.net> wrote: > >> On Tue, Jan 24, 2017 at 12:25 PM, Rasmus Schultz <rasmus@mindplay.dk> wrote: >> Isn't _ more generally used as a "discard" >> placeholder in most languages? >> >> At least in Swift, Go, Scala, Dart and C# (starting with v7) I think? >> >> I don't recall having seen it mean "fill in the blank". In what languages? >> >> >>> On Fri, Jan 20, 2017 at 4:26 PM, Levi Morrison <levim@php.net> wrote: >>> >>> Oops, sorry for an email that just quotes others; mis-clicked send. >>> >>>> Last, a cosmetic suggestion : replace '$$' with '$<' (more >>>> explicit as >>>> 'input data', imo). >>> >>> If we aren't going to use $$ I'd like to use >>> _ or __ which read >>> similar to "fill in the blank" and has precedence in other languages. >>> >>> But at this stage I'd much rather focus on changing the general model >>> to what I've proposed instead of what is outlined in the RFC. I care >>> much more about the feature than the exact syntax for it. >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php > > Scala does use it this way. It also uses it in pattern matching to > mean "match anything else" or "I don't care about this one". > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.internals (#97949) next »