2 ms·
In what way is it beautiful? I had a look and found it to be covered in nasty #ifdefs.
by pjc50 12y ago
In what way is it beautiful? I had a look and found it to be covered in nasty #ifdefs.
- yoklov 12y agoAs someone who has written C professionally in the past, I agree. IMO this is fairly ugly C. Definitely can't see why someone would consider it to be beautiful. That said, there are some neat things I've seen in the ruby C code in the past. I thought [1] was pretty clever (this pattern shows up several times in the ruby source) the first time I saw it, since it lets you access the members of the union like `foo->as.thing`, which is fairly pretty IMO. [1] https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L761-L771 https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#...