>>>> "Ville" == Ville Skytt <Ville>
writes:
Ville> On Tue, 2002-12-17 at 04:20, Ben Wing wrote:
> stephen -- while you're in the process of modifying
PROBLEMS,
> please add an entry about union type and its propensity to
> cause crashes. here's some text that should get you started:
Ville>
[...]
Ville> Uh, --use-union-type has been many times suggested on
Ville> xemacs-beta as a way to prevent crashes in something
Ville> related to aggressive compiler
Ville> What's correct?
To some extent, both. Sometimes you lose, and other times you lose
big. There's nothing we can do about compiler bugs except write them
up in PROBLEMS and code defensively. There are any number of
temporaries in XEmacs notated with "Compiler XYZ chokes without this."
This is more of the same. :-(
To me it's a pragmatic issue (if anything, union type is more
"righteous" than the int Lisp_Object type). GCC (and now VC++) has
historically had problems with unions.[1] OTOH unions have historically
been good at smoking out "if (lisp_object) ..." constructs and the
like, and to some extent aliasing issues.
I think if you look, you'll find that (a) it's often been me
recommending union type[2] and (b) --use-union-type typically doesn't
solve any problems. If better diagnosis tools are now available, then
there may be reason to avoid union type.
Footnotes:
[1] They've also had problems with std C++ ... but I doubt Ben would
argue that is EVIL EVIL EVIL ;-)
[2] Ie, you're really only citing one opinion.
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.