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]

Single-value types


In Common Lisp this expression

  (let ((x (values 'a 'b))) x)

is allowed and should return 'a.

How should the CL front-end implement that?

There's a flag Declaration.IS_SINGLE_VALUE, but I don't understand how
that interacts with type inference or code generation.

I did a little experiment: introduce a subclass of SpecialObjectType
named SingleValueType.  That should mostly be like java.lang.Object but
not compatible with gnu.mapping.Values.  Values instances would require
special coercion code.  Anyway, that experiment didn't go far.

So should I continue with the SingleValueType idea or is there a better
way to do it?

Helmut


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