On Sun, Aug 17, 2014 at 3:15 AM, Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum 10353@lyskom.lysator.liu.se wrote:
Would it make sense if the implicit return 0; in pike functions had a different zero type than 0, like UNDEFINED?
I'm conceptually okay with it, but it will break code.
ChrisA
Chris Angelico wrote:
On Sun, Aug 17, 2014 at 3:15 AM, Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum 10353@lyskom.lysator.liu.se wrote:
Would it make sense if the implicit return 0; in pike functions had a different zero type than 0, like UNDEFINED?
I'm conceptually okay with it, but it will break code.
I'd say that counting on the fact that not returning anything will return 0 is asking for trouble; so it shouldn't break that much code.
I can't imagine any code that relies on that a function not returning anything is returning 0 and not UNDEFINED.
All code that tests for or uses 0 would still work.
pike-devel@lists.lysator.liu.se