On Wed, Dec 12, 2012 at 4:02 PM, David Korn <[email protected]> wrote: > cc: [email protected] > Subject: Re: Re: [ast-developers] [rfe] typeset -B to define a (C99-like) > <stdbool.h> datatype > -------- > > Why bother with an alias? Why not just create Bool as a predefined type?
Erm... I had a couple of reasons: 1. All basic ksh93 types modelled after C types (e.g. integer, float, compound) are aliases to the real type definitions 2. C99 (see the <stdbool.h> manpage quote in my earlier email) says "... bool - Expands to _Bool..." ... which IMO makes sense since C99 allows to |#undef bool| and redefine it to something else. We can do the same with $ unalias bool #. 3. Irek suggested the same $ unalias bool # for the (very) unlikely case ([a1]) that someone already uses "bool" as a command name [a1]= See http://www.mail-archive.com/[email protected]/msg00154.html where at least for Sun's Solaris we added this clause to ksh93(1): -- snip -- CAVEATS + It is recommended that ksh93 scripts should choose shell + function names outside the namespace used by reserved + keywords of the ISO C99, C++ and JAVA languages to avoid + collisions with future enhancements to ksh93. -- snip -- ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [email protected] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
