News for hackers. Stuff that matters.
Re:Anti-if: The Missing Patterns by aaron-santos on Friday June 10, 2016 @11:36AM (#11877108)
I think I'm looking at an implementation of ifTrue[1], but it's a bit dense to someone who's not familiar with Smalltalk. Maybe you could walk me through it?

[1] - http://git.savannah.gnu.org/gitweb/?p=smalltalk.git;a=blob;f...

Re:Anti-if: The Missing Patterns by dfox on Saturday June 11, 2016 @07:06AM (#11883022)
That's the compiler part that optimizes the elegance away :). The interesting part is here [1], note that it will work without any support from the compiler.

[1] - http://git.savannah.gnu.org/gitweb/?p=smalltalk.git;a=blob;f... and http://git.savannah.gnu.org/gitweb/?p=smalltalk.git;a=blob;f...

Re:Anti-if: The Missing Patterns by aaron-santos on Saturday June 11, 2016 @05:35PM (#11885447)
Much more straight forward. If I'm reading it correctly, True and False are subclasses of Boolean and each of which implements a complementary pair of ifTrue and ifFalse methods? Elegantly symmetric. :)