public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: kawa@sourceware.org
Subject: Single-value types
Date: Wed, 29 Nov 2017 13:04:00 -0000	[thread overview]
Message-ID: <m2indt5j8n.fsf@caladan> (raw)

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

                 reply	other threads:[~2017-11-29 13:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2indt5j8n.fsf@caladan \
    --to=eller.helmut@gmail.com \
    --cc=kawa@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).