Casper.Dik at sun.com wrote: > >Felix Schulte writes: > >> On 6/25/06, Casper.Dik at sun.com <Casper.Dik at sun.com> wrote: > >> > This seems wrong; personally I think we should rip out any replacement > >> > for system libraries; such duplication leads to more code which needs > >> > to be maintained. This includes replacements for <stdio.h>. > >> There would be no need to replace it if the stdio implementation in > >> Solaris would be sane, however since it sucks a faster, non-sucking > >> replacement would be cool. > > > >In that case, the right answer is to remove the "sucking" part of the > >Solaris stdio. Since stdio is part of Open Solaris, this is doable. > > Quite; replacing "sucking" things with "non sucking functional duplication" > is broken and should not be allowed. Our architecture committees have > generally frowned upon such changes. In general, such ARC cases > would be rejected with a firm "back to the drawing board". > > I can give you one example why this is bad; it's a kernel example, > but it's pertinent, nonetheless. [snip] > This taught me that it is better to use the standard, sub optimal, > implementation and lobby for its improvment over implementing your > own "improvement".
Offtopic: Which still reminds me to write an email about that the Solaris kernel is very very malloc()-happy (which is unneccesary in many cases now that C99-sematics are allowed). > That's because this year's optimization over the > standard algorithm is next year's pessimisation because someone just > improved the default. The problem with this example is that it doesn't really fit. ksh93/libshell have to run on many platforms (AFAIK far more than 30) so an abstraction layer is needed (called "libast"). Otherwise the whole shell code would be totally unreadable by gigantic amounts of #ifdef stuff just to handle various differences between platforms. And part of this "portability runtime" is an I/O library called "sfio". What is so evil with this approach ? Almost every big project including Mozilla/Firefox/Thunderbird, mysql, Gnome and Apache use the same path and noone from Sun complained yet. > >I agree with Casper that creating your own stdio because you don't > >like the one in Open Solaris is architecturally infeasible. We cannot > >just allow parts of the system that we think are broken to rot in > >place. We (the community, all of us collectively) own this software, > >and we have a responsibility to maintain it properly. > > >Forking off and restarting is not proper maintenance. > > No, and it doubles maintenance costs. Compared to the maintaince costs of handling each single platform seperately in the libshell code ? ksh93/libshell still need to be portable. Just because Solaris's stdio/libc functions are mainly bug-free doesn't mean that all other plaftorms are in the same state. > >That doesn't make it any less awful. > > It prevents sudden explosions, but it's still bad. Erm, please suggest an alternative then which still works on 30+ platforms... ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;)
