From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16424 invoked by alias); 29 Nov 2017 13:04:45 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 16413 invoked by uid 89); 29 Nov 2017 13:04:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_LAZY_DOMAIN_SECURITY,KB_WAM_FROM_NAME_SINGLEWORD autolearn=no version=3.3.2 spammy=H*r:Unknown, helmut, H*r:sk:kawa@so X-HELO: blaine.gmane.org Received: from Unknown (HELO blaine.gmane.org) (195.159.176.226) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Nov 2017 13:04:43 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eK22O-0001xx-TF for kawa@sourceware.org; Wed, 29 Nov 2017 14:04:28 +0100 To: kawa@sourceware.org From: Helmut Eller Subject: Single-value types Date: Wed, 29 Nov 2017 13:04:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) X-IsSubscribed: yes X-SW-Source: 2017-q4/txt/msg00045.txt.bz2 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