Re:PG: Arc Likely To Be Open-Sourced This Winter
by tjr on Wednesday January 16, 2008 @02:11PM
(#99389)
Yes, C is another good example. The language is fairly small, and it's not terribly difficult to learn the language itself and write your own programs. But to be able to look at an arbitrary piece of C code and understand all of the implications is another matter entirely.
This is true of any language to some degree, although some are worse than others, and if the code was purposefully written in some non-traditional way it can be even harder.
Re:PG: Arc Likely To Be Open-Sourced This Winter
by ivankirigin on Wednesday January 16, 2008 @03:47PM
(#99432)
It is most certainly not true about C++.
Re:PG: Arc Likely To Be Open-Sourced This Winter
by tjr on Wednesday January 16, 2008 @06:36PM
(#99536)
Touche'; I should have grouped my sentences differently. C++ is not a small, easy-to-learn language.
Re:PG: Arc Likely To Be Open-Sourced This Winter
by ivankirigin on Thursday January 17, 2008 @01:35AM
(#99667)
I'm reminded of Duff's Device
http://en.wikipedia.org/wiki/Duff%27s_device
send(to, from, count)
register short *to, *from;
register count;
{
register n = (count + 7) / 8;
switch (count % 8) {
case 0: do { *to = *from++;
case 7: *to = *from++;
case 6: *to = *from++;
case 5: *to = *from++;
case 4: *to = *from++;
case 3: *to = *from++;
case 2: *to = *from++;
case 1: *to = *from++;
} while (--n > 0);
}
}
I'm told a great place to read good code, both Python and C, is to read the code that makes Python.