Hacker News new | past | comments | ask | show | jobs | submit login

The fact that 30 is suspiciously close to 32 makes the impression that there's some unholy C black magic in the background of the bug. I wish programmers stopped doing stuff like that unless they really have to.



This is what happens when you work at a company which doesn't have the sense and engineering leadership to arrive at a single core set of collections and such ala CoreFoundation: http://developer.apple.com/mac/library/documentation/CoreFou...

Microsoft has a hodge podge of several attempts at the same, and because none is truly core and universally available, it's quite easy to be ignorant of what's available and roll your own crappy, limited data structures.


Huh. A five bit range would give a max of 31, and if we assume that the default/built-in stylesheet knocks another off, that's 30.

I agree with you, though I think I'd prefer this to hint at the reason over it being an entirely arbitrary descision. Making such a choice for a bad reason is still preferable to making it for no reason.


It may be a sanity check; often when writing parsers for "in the wild" data you have to pick a cutoff for where "doesn't make sense" is so that you can tell if you're looking at junk data and stop trying to make sense of it (and the RAM / CPU entailed in such).


Yeah, I'm hoping it's that. Purely arbitrary would just be... stupid.


    struct Element {
        // Update: apparently 16 wasn't enough.  Raised to 30 to pass test #452
        StyleData styles[30]; // No one uses more than 16 style parameters anyway.
    }




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: