Duff's Device

Date: 2007-07-20 12:54 pm (UTC)
From: [identity profile] adriang.livejournal.com
Speaking of coding practices..
    http://www.lysator.liu.se/c/duffs-device.html (http://www.lysator.liu.se/c/duffs-device.html)

Enjoy

Adrian

Re: Duff's Device

Date: 2007-07-21 04:20 pm (UTC)
From: [identity profile] madbodger.livejournal.com
When I first read about Duff's Device, I had the immediate knee-jerk "NO! That is Bad and Wrong!"
reaction. Then I read it while thinking of the original K&R language design and realized that it
was a completely valid approach. The committe agrees with this.

Re: Duff's Device

Date: 2007-07-24 12:15 am (UTC)
From: [identity profile] adriang.livejournal.com
Tom Duff, himself, showed an example of the device and wrote:
    Disgusting, no?

I think he also appreciates the same quality in it that you do. And yet, he makes a good case for using it, when appropriate. That's what makes this sort of gem so... delightful. 8-)

Adrian

Date: 2007-07-20 07:46 pm (UTC)
From: [identity profile] krow.livejournal.com
I use them as I see fit :)

Date: 2007-07-21 04:19 pm (UTC)
From: [identity profile] madbodger.livejournal.com
A few iterations back, the consensus turned out to be that gotos were not
the problem, LABELs were the bad thing. Then again, us Intercal programmers
trump it utterly with the "come from" instruction, which totally hampers
understanding!

Profile

geekchick: (Default)
geekchick

April 2017

S M T W T F S
      1
2345 6 78
9101112131415
16 171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 11th, 2025 08:29 am
Powered by Dreamwidth Studios