This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

#t and #f now default to primitive types


The literals #t and #f are now treated as having primitive boolean types,
rather than java.lang.Boolean type.  That is the return type of:

    (define (neg x) (if (>= x 0) #f #t))

is boolean rather than java.lang.Boolean.

Of course you can specify Boolean explicitly if you want:

    (define (neg x) ::java.lang.Boolean (if (>= x 0) #f #t))
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]