4 ms·
I'm pretty certain this is the case too, just an arbitrary limit due to coding laziness. I'm sure people argued about it and decided that 30 external style shee
by InclinedPlane 17y ago
I'm pretty certain this is the case too, just an arbitrary limit due to coding laziness. I'm sure people argued about it and decided that 30 external style sheets was way more than enough since using that many would be crazy and cause plenty of problems on its own. Then, of course, later on the team decides how they want to handle inline styles and someone suggests they've already got all this infrastructure for handling external styles, why not just use that? Nobody reevaluates the style limit and then hijinx ensue down the road.
- Periodic 17y agoI have to admit, there have been a few times I've written comments like the following: /* Just a quick static array to get it * working. Should be enough for all the * usual tests so we can work on core * functionality. * * TODO: change it to a linked list or * something to dynamically track style * tags. * * Update: Changed from 16 to 30 because Alex * tossed in a new test that breaks this * build. This really ought to be updated * next major release, but for now we just * need to get it working. */
- InclinedPlane 17y agoAvoiding these sorts of pitfalls is one of the greatest benefits to using a modern language with good generics support. In C#, for example, it's actually easier to code with lists than with arrays, so you can skip the "fix it so it doesn't have an arbitrary range limit" coding step (which often never gets done anyway).
- Malus 17y agoThe not-so-modern language that IE is written in (C++) has a similar construct (std::vector) in its standard library. It is possible that code was originally written prior to the widespread adoption of the STL and was never updated to use it.