On Wed, Aug 04, 2021 at 03:30:35PM -0700, Aaron Priven wrote: > I don???t have a problem with the proposal per se, but it???s hard for > me to believe that inferring what type a value should be from its > initial assignment is going to be reliable. > > Surely there???s a lot of extant code like > > if ($condition) { > $flag = $x eq $y; > } else { > do_something(); > $flag = 1; > } > $count+= $flag; > > Is $flag a boolean or an integer? I'd expect that It Depends. But I'd expect $count to be an integer, because + always returns a number, just like it would be if you say this: $car_contents = '11 clowns'; $count += $car_contents; -- David Cantrell | Pope | First Church of the Symmetrical Internet Deck of Cards: $1.29. "101 Solitaire Variations" book: $6.59. Cheap replacement for the one thing Windows is good at: priceless -- Shane LazarusThread Previous | Thread Next