public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* Single-value types
@ 2017-11-29 13:04 Helmut Eller
  0 siblings, 0 replies; only message in thread
From: Helmut Eller @ 2017-11-29 13:04 UTC (permalink / raw)
  To: kawa

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-29 13:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 13:04 Single-value types Helmut Eller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).