News for hackers. Stuff that matters.
Re:Introducing Syngr, my attempt at an Standard Library for PHP by agumonkey on Monday September 23, 2013 @08:11AM (#6430279)
Absolutely.
Re:Introducing Syngr, my attempt at an Standard Library for PHP by niteshade on Monday September 23, 2013 @08:14AM (#6430287)
Absolutely non-intuitive?
Re:Introducing Syngr, my attempt at an Standard Library for PHP by gh0zt on Monday September 23, 2013 @08:30AM (#6430337)
I think the point here is that you'd have to do something like this

  $x = new Number(1)
  $y = clone $x;
  $y->absolute();
to work with the absolute value of variable $x without actually changing $x
Re:Introducing Syngr, my attempt at an Standard Library for PHP by agumonkey on Monday September 23, 2013 @09:00AM (#6430510)
Yes, this is a common source of bugs when you're not sure what is changing. See below, someone suggests to use 'to' and 'as' prefix to convey immutable / mutable methods.