From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: Should records be able to mimic primitive types? Date: Mon, 01 May 2017 11:35:40 +0000 Message-ID: References: <8777899d-ca8e-212c-b8bf-2f8da4c54836@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c0d21c241221a054e74d3cd X-Trace: blaine.gmane.org 1493638591 3840 195.159.176.226 (1 May 2017 11:36:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 1 May 2017 11:36:31 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 01 13:36:28 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d59cx-0000uG-HS for ged-emacs-devel@m.gmane.org; Mon, 01 May 2017 13:36:27 +0200 Original-Received: from localhost ([::1]:53794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d59d3-0001rY-Ej for ged-emacs-devel@m.gmane.org; Mon, 01 May 2017 07:36:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d59cP-0001rQ-2f for emacs-devel@gnu.org; Mon, 01 May 2017 07:35:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d59cO-0000NT-7h for emacs-devel@gnu.org; Mon, 01 May 2017 07:35:53 -0400 Original-Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:34240) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d59cO-0000N7-0d for emacs-devel@gnu.org; Mon, 01 May 2017 07:35:52 -0400 Original-Received: by mail-wr0-x22b.google.com with SMTP id l9so62462196wre.1 for ; Mon, 01 May 2017 04:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=4HqXSqq57f5eXKJxNwsqqdtjLeDZcGxCyxqusNRYCE8=; b=jFywXLCfwmOucFA14NxWtdIR9ehCHv4RGlkdjGPclnmUgvt5VdnkHXjxDKwQt2gdVP Sy9Cm9xxfB+PXQWrtK/LQ2aUMC73ASP9Bl/4ZcYW+uLoZ0MGkxw54F6pcyZbqef4ovlC li4mZUDBFd6q1IK4o3mthpCMvw1cyTpRG35CgNgh8BRyZkTkTd4C59s9ck9OMVMBCiKq FdSROOifTbiPOzlRvg5jyS2mSDBWLvCshAsMVEv0dHHC6SDCc19xTC9xjpniTkZp0uyc v21VKAryQx6l/VQmHIuB45cX0BzRJzIUjfDHnaQHP+vNZwMkDEIFSD2pemM+Vnq0dkZN P/9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=4HqXSqq57f5eXKJxNwsqqdtjLeDZcGxCyxqusNRYCE8=; b=iFYY9QrSakafdKXXTExwGlVHM0rj2bvPxTgoIq/pWau5AiyF+0ED2L5H45BejYWAQA 4jI98vWw+EGYbDIKTSrbXGXdOzN63Xxb/RZkTot+GBKgcR5l1jcYilkz3c3ACPDcMC3J 7dIvN+ZR6KrqecNWqKKHpUDXw2NN03jRN/KReRpMLhtod/pmogC7OEovpNRX7UNyxT7E Qr+PlkinmuV5v/IHeHNjFYwJ+7ueKgtXOYmdIkA8o37hpZ2odDiUm6+6whFUPPhpuK5U G7L/2RNoX1jGlMYF6rcZTH1WFyLI0Hyo6VequOfmuH+wbkDlTI6ylLyhoXc+fC0UJ43B ah6Q== X-Gm-Message-State: AN3rC/6c8GgfVcVovcrXeqWhCsdRt+18RBedTl9afZ9WAR+CJB8tjzrR 4Dg9cupLMVU2NjMcf6uko0HqpzZyDqD4 X-Received: by 10.223.148.35 with SMTP id 32mr9362203wrq.175.1493638550981; Mon, 01 May 2017 04:35:50 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214478 Archived-At: --94eb2c0d21c241221a054e74d3cd Content-Type: text/plain; charset=UTF-8 Stefan Monnier schrieb am Sa., 8. Apr. 2017 um 19:58 Uhr: > > It's not trying hard, just a simple check for a known, small, and > > rarely-changing list of primitive symbols. > > To me, that's working very hard: > - extra code. > Only a tiny bit. > - extra maintenance > Negligible, because we rarely add new primitive types. A comment should be added to Ftype_of to also modify a static list of primitive types when adding a new type, but that should be it. > - extra run-time checks. > Minor concern. Emacs Lisp isn't C; we prefer to help the user over saving a couple of clock cycles. > - no benefit since this doesn't catch a common situation. > Catching uncommon situation is precisely the point of precondition checking. --94eb2c0d21c241221a054e74d3cd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Stefan= Monnier <monnier@iro.umontr= eal.ca> schrieb am Sa., 8. Apr. 2017 um 19:58=C2=A0Uhr:
> It's not trying hard, just a simple ch= eck for a known, small, and
> rarely-changing list of primitive symbols.

To me, that's working very hard:
- extra code.

Only a tiny bit.
=C2=A0
- extra maintenance

Negligible, because= we rarely add new primitive types. A comment should be added to Ftype_of t= o also modify a static list of primitive types when adding a new type, but = that should be it.
=C2=A0
- extra run-time checks.

Minor concern.= Emacs Lisp isn't C; we prefer to help the user over saving a couple of= clock cycles.
=C2=A0
- no benefit since this doesn't catch a common situation.

Catching uncommon situation is precisely t= he point of precondition checking.=C2=A0
--94eb2c0d21c241221a054e74d3cd--