Ruckus
01/17/2019, 6:07 PM=
on any var infix function that returns the receiver's type (or compatible):
// Current
var superAwesomeNumber = 5
superAwesomeNumber = superAwesomeNumber shl 3
// New
var superAwesomeNumber = 5
superAwesomeNumber shl= 3
It would be nice for long chains of bitwise operators, but it could also be nice for any infix function. It is especially appealing when you use very descriptive names.Ruckus
01/17/2019, 6:09 PM!
prefix on any infix function that returns Boolean, but I'm not sure what happened with that proposal.orangy
orangy
hudsonb
01/17/2019, 6:15 PMhudsonb
01/17/2019, 6:18 PMor=
and and=
would also be use casesRuckus
01/17/2019, 6:19 PMlayers and= mask
, flags or= newFlag
. I also have some custom number infix functions it would be nice to use like currentInnerRatio pMod= 9.0
and colorOffset pingPong= upperBound
Ruckus
01/17/2019, 6:19 PMRuckus
01/17/2019, 6:22 PM+=
, -=
, etc.), so it may feel a little incongruous.Ruckus
01/17/2019, 6:28 PMIt applies only to infix functions that have their receiver of the same type as return type (or compatible in some way)Indeed, that's what I meant by "variable's type". I've updated it.
dalexander
01/17/2019, 7:12 PMsuperAwesomeNumber shl= 3
as something other than (superAwesomeNumber shl)= 3
so I think if this proposal is accepted I’d like to make sure that the syntax highlighting is distinct in the IDE.elect
01/18/2019, 8:53 AMsuperAwesomeNumber <<= 3
elect
01/18/2019, 8:54 AMRuckus
01/18/2019, 2:37 PM