From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2GT1BGWWIWYjgwEA62LTzQ:P1 (envelope-from ) for ; Thu, 18 Apr 2024 23:53:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 2GT1BGWWIWYjgwEA62LTzQ (envelope-from ) for ; Thu, 18 Apr 2024 23:53:41 +0200 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=BWkQvki0; dkim=pass header.d=maniero.me header.s=hostingermail1 header.b=wwivSfRs; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; arc=pass ("mailchannels.net:s=arc-2022:i=1"); dmarc=pass (policy=none) header.from=maniero.me ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1713477221; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=QxrQWkElcBpLXx7zkDBKz/jpAr69+JEN5LBazQ4WgPw=; b=xVuu8txLKlX1Q9mVq9uUPO8ZapJKRAefWhreHESrPRphfHC+Vc6Qoest5vS0184IRsvScL AroGnWnMFmnpn+BbkeAyG8giP4DV4OvD8sUri6KkTVgd4exdEEY2Gu/5ltigHuYfr7qnpx vgS1lqTb0lUKoyUaEm35YjvRPU+SA3hv/hI41QKhpZOEUf0+p01EMEDwkQbdk4tVsNHFJ3 1tPNVaj2fLm/qtCCm9c4esPONO5Q7dFvrXzAoh2ePaStTGqAYfb+YzQ4SYVEqkRuAo7I3v C7Ej7bS4IRc5GakhatmcIa+V3XtbcVCsbbGSFLZJiVxyqQwhhxVDMlMOWZCb5A== ARC-Seal: i=2; s=key1; d=johnnyrichard.com; t=1713477221; a=rsa-sha256; cv=pass; b=08fKfCmNewSpeuPQet9+cwGlO/ncx/JDtApkG5DxN802lBtORLwkZnPfYxTkPmxwj7iGB+ lqsn2RuNZm3hvXR+lxL/3GzhZJ9G2zKYsA/pvsNDWfiX4a1jMaYYKGR1Tg7NPu6an7LTCp U8Ashz6yjRl1lqYVHvYyb+W2vm2sOltkxzu1WrajYHNlefCQjyv0orSsXNuNZ0CJk+q9NW rwN6LB3mQrWf3pybzLXTYrLxMiPz80++SD2n1pBh0W5e2cVWbkj7z3pfo/UUlHCdslu26G b9Gk6FGQZEqKUbZeuvYF8jz4NdhfOD1gc+18Jt3YJ20eyP2s8o6KeNJZumVSgA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=BWkQvki0; dkim=pass header.d=maniero.me header.s=hostingermail1 header.b=wwivSfRs; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; arc=pass ("mailchannels.net:s=arc-2022:i=1"); dmarc=pass (policy=none) header.from=maniero.me Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9E7B63ABDC for ; Thu, 18 Apr 2024 23:53:40 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=QxrQWkElcBpLXx7zkDBKz/jpAr69+JEN5LBazQ4WgPw=; c=simple/simple; d=lists.sr.ht; h=Date:Subject:From:To:References:In-Reply-To:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1713477220; v=1; b=BWkQvki0iywBXljkrCwPRnv4Lp4U1jkb/04vocabTrPAtsGJ2S4sHOiQWu9ZSrDK2u4amUtd dmxwDU26cLkSc5ALnoOOje6G+kneXXITgW4uBOnLzggcHaUs61e9JGXNQBbVfmJt561sIHIAc9g 6Akpib/+RuQa/s/Jx/w/WWDw1W9ekwnYtbsbiM6S8JoAonXpUaDwc4AN3vAfMuv4L9yX2Ijnh5c A0mDz0BQv8qh1MM27FaUZObiy+rhprif9qzWKoDK4pfLHzvqP74NG3c6aO3hULMjcepzkz7z0dD RsPrtle0W3M8DC8+l4jSDv3b4D57w5QJhp3amWBrgfq3Q== Received: from lists.sr.ht (unknown [IPv6:2a03:6000:1813:1337::154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 7FBE320332 for ; Thu, 18 Apr 2024 21:53:40 +0000 (UTC) Received: from silver.cherry.relay.mailchannels.net (silver.cherry.relay.mailchannels.net [23.83.223.166]) by mail-a.sr.ht (Postfix) with ESMTPS id 76FBF20325 for <~johnnyrichard/olang-devel@lists.sr.ht>; Thu, 18 Apr 2024 21:53:39 +0000 (UTC) X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C34FBC2FB8 for <~johnnyrichard/olang-devel@lists.sr.ht>; Thu, 18 Apr 2024 21:53:37 +0000 (UTC) Received: from fr-int-smtpout1.hostinger.io (unknown [127.0.0.6]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id 0968FC2ECF for <~johnnyrichard/olang-devel@lists.sr.ht>; Thu, 18 Apr 2024 21:53:36 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1713477217; a=rsa-sha256; cv=none; b=VJfJUycPmWtvm0r94SYUix3lvGPZcL2cSbQW3I/P6ZuqPzLhxFnznLuKYpUOT5gmWa5bHo VwhIRf5nBIzXd63rAZPlxOk5FMv3/szm9wMBLB4F3k1axpq4WmbIfj2KHv+hn6MYCV/LFP qoWnUcc6vy4T0r6XPxdaIXZAtYHK1pLzDvCE1em8gw0zTrPZk3ZVuWHzOi+WKEDXCQeDop DtC9aBGbWZEMKszCx0o46d8ufD30TxHU/5RBEUh91NRgl+m/6TNZ+GLR+PF1lawjT7vCq9 8PcrWfuC4laIqMtIjkuDIshz98auxrSrsRKCzPMMF8mkcczpMrn0IM2Z5aFl5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1713477217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=QxrQWkElcBpLXx7zkDBKz/jpAr69+JEN5LBazQ4WgPw=; b=1b/cuRhvf+aDQ5DeF/vQayFzfJrBG2xCQavb6CXQSlmODsgA0+UNsHrqV9O0TPsqQiqzX0 Rr/2cb6kb0LCiBGS0YXewSdt5RORhiIS4sDXN2lZUnsabe17Js9/4Uq8qfp7rZmlFYM+pM +uIB41hJhVI6xVor5wkLbtvve0y188dC137JwbxaD32jbsxM+JC7y16qWrprw+Li+y8+Hu 0NfbNI9TcXzTpPv4veTXoQW9dZ0lPQYnrihiKep8GdduXpfEoMcKPLvy5vnKQ7WQ7qoujc Wp4165xVKlUcJno0KlfS4hQp2G7GWRcRquL8jYM6KW1UjZPAdVMaI5fDjyHYoA== ARC-Authentication-Results: i=1; rspamd-6f64594bc9-7fx82; auth=pass smtp.auth=hostingeremail smtp.mailfrom=carlos@maniero.me X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me X-MC-Relay: Neutral X-MailChannels-SenderId: hostingeremail|x-authuser|carlos@maniero.me X-MailChannels-Auth-Id: hostingeremail X-Plucky-Spill: 1a11320075223e0b_1713477217657_2049833884 X-MC-Loop-Signature: 1713477217657:1548484139 X-MC-Ingress-Time: 1713477217656 Received: from fr-int-smtpout1.hostinger.io (fr-int-smtpout1.hostinger.io [89.116.146.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.118.100.148 (trex/6.10.3); Thu, 18 Apr 2024 21:53:37 +0000 Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maniero.me; s=hostingermail1; t=1713477215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QxrQWkElcBpLXx7zkDBKz/jpAr69+JEN5LBazQ4WgPw=; b=wwivSfRsMj2lTnsEZ1rB06pcDmNUUxjUEErSeX/YE77VmceUA0RkjwEhsGvTCvbLTtlBGI U+xe6DrCSgTfMsqX+LKb0TGviBR43tfABwnv1mR9a82B1DWioG2+AA84Rq+3Qn7kQ/eTiC iOsoGlppu4ZrPYVwGJl2g/Z0A1FyCxgbfJZKxEbgh0ARU6xt+hbApYpkzlvOGMhYxY3Ch/ hPe/pUx+eD2/ixW24zB21gAmFijxaElbNqs2Xu8nODXBU2D6lZ4sF0Mh+zZCshJSGkR/5a OveAYnpZOT7L9oXxhJdfxKYRyH/h5FeXrj6PpqitPtxHkeZcNQYF8Y1p5XM0zA== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 18 Apr 2024 18:53:29 -0300 Message-Id: Subject: Re: [RFC SPEC] Primitive data types and arrays From: "Carlos Maniero" To: , <~johnnyrichard/olang-devel@lists.sr.ht> X-Mailer: aerc 0.15.2-211-g37d5fc691aff References: <20240417013003.67442-1-ricardo_kagawa@disroot.org> In-Reply-To: <20240417013003.67442-1-ricardo_kagawa@disroot.org> X-CM-Envelope: MS4xfEwIQcEarqyLQdUgutW1wASVqqrFQkzYh9JVvCoSlPuHdf0OazU8c0afzAXXIQMgjkKvK50Buzt+rfAuMG7lcsfz9bD86czj+LMeQ7kjjELDwsDgTfT3 keGIdYwzqv+9K1Mg9DokvcuLOrYGfqMjeTqldjnazGGxMNp0z7EGIyaTyFen7hlpeHY49SEQ5CIOfwBDxHA5weEtaZ1In0A3JQcjatDZ0PEZPlPcjwt35R+2 ETcsRayWYBkbRh5yOnXyvQ== X-CM-Analysis: v=2.4 cv=ZKfRm27b c=1 sm=1 tr=0 ts=6621965f a=WwxFCuf3mf1fs3oSi6/dng==:117 a=WwxFCuf3mf1fs3oSi6/dng==:17 a=IkcTkHD0fZMA:10 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=IDNWr66nAAAA:8 a=8pif782wAAAA:8 a=AWF4V9dYAAAA:8 a=MNRzolI_q1ApcfQJ0vkA:9 a=QEXdDO2ut3YA:10 a=nCAyD0JtkowA:10 a=gvDe04oBTnMA:10 a=r8tAcElgm3MA:10 a=hqml-OzFpqAA:10 a=zrxc5Rgx95RJC7JqWrvn:22 a=xFq8Orulq3UF3isJwss2:22 a=BXDaF_L80NY05PYiAFlV:22 X-AuthUser: carlos@maniero.me List-Unsubscribe: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Country: NL X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -11.13 X-Spam-Score: -11.13 X-Migadu-Queue-Id: 9E7B63ABDC X-Migadu-Scanner: mx13.migadu.com X-TUID: YquuOQGEqdEy About arrays, Johnny has suggested to talk about arrays in a different thread, I'm just waiting us to conclude this discussion and I'll start another thread to define Olang's array specification. But we brought excellent points, and maybe we should define pointers before arrays. > Obviously, `boolean` can be either `true` or `false`, but what should > that mean? If `boolean` is mapped to `u8`, then zero and non-zero? IMO, true should be 1 and false 0 in a way that *1 =3D=3D true* is true and *2 =3D=3D true* is false. Control flow structures may accept anything not just booleans and may apply the non-zero approach you described, but we can discuss this on their own RFC (that does not exists yet). > But the real question is what would `char` be? If the language should > support Unicode properly, then `char` would represent a _code unit_ > rather than a "character", which could be considered a misnomer. Since > Unicode uses variable-length characters, a Unicode character might be > difficult to represent as just `char`. > > If no Unicode support is planned, then `char` as `u8` is good enough to > represent characters in 7-bit ASCII encoding. I'll be honest with you, It makes a lot of sense all you said, making a char a u8 seems to enforce an Western-Eurocentrism in Olang. But I confess that I never stopped to learn more about unicode. At the same time I think we should support a 32-bit sized unicode char, I don't wanna make all chars an u32 keeping the support to ASCII encoding. IMO, we should either postpone specifying a char right now or assume that a char at this point represents an ASCII char and start a new RFC about unicode where we may define something like an unicode char. BTW, you seem well versed on the unicode theory, would you like to purpose a mechanism to deal with unicode? > Note that in most languages where there is a `void` type, the `void` > type is not actually valid in variable declarations. [...] > > In the current version of the spec, it would be included in > , rather than , to allow it only as a function > return type. Agree! > Also, there are three other types that might be interesting, if I may > suggest: `never` (from TypeScript [1]), `unit` (from functional-like > languages [2]) and `null` (from ECMAScript specs [3]). > > [1]: https://www.typescriptlang.org/docs/handbook/2/functions.html#never > [2]: https://en.wikipedia.org/wiki/Unit_type > [3]: https://tc39.es/ecma262/multipage/overview.html#sec-null-value They seems to be very specific, we may wanna to wait until we find an use for them.