[Cuis-dev] How can I add another collection syntax, such as {1} & #(1) & #[1]?

Luciano Notarfrancesco luchiano at gmail.com
Sat Aug 12 06:22:36 PDT 2023


I don’t know what an ETuple is, is is a kind of literal? I create tuples (a
kind of array) with the message #,. For example, (1,2,3) sends ‘, 2’ to 1
and returns a tuple with 1 and 2, and then this tuple receives ‘, 3’ and
returns a tuple with 1, 2 and 3. It’s not the most efficient way of
creating tuples (it creates some temporary garbage), and they are not
literals, but it makes very readable code.

On Sat, 12 Aug 2023 at 20:10 rabbit via Cuis-dev <cuis-dev at lists.cuis.st>
wrote:

> I think it will need to be such as read-only Array and ByteArray
> construction, to differentiate from other selectors. So it will need to be
> #<. I'm fine with it being a read-only ETuple, so that it conforms to the
> convention of constructing read-ony objects :: #() . and #[]. I could sent
> #makeWriteableObject to. If a Tuple detects Computable, it could make
> itself Writeable, or when computations occur prior to replacing the
> computable with the result of computation. And so on and so forth. This
> would look as
>
> #<#<1 !! 2 !! 3> !! #thisIsAConstructedWithNestingETuple>
>
> Best,
> ••• rabbit ❤️‍🔥🐰
>
>
> On 8/12/23 09:03, rabbit via Cuis-dev wrote:
>
> Good morning. I wish to add <> brackets to create an ETuple. How may I
> accomplish this? Such as:
>
> <<1 !! 2 !! 3> !! #thisIsAConstructedWithNestingETuple>
>
> Results in:
>
> anETuple (2 elements :: {anETuple (3 elements :: {1 !! 2 !! 3}) !!
> #thisIsAConstructedWithNestingETuple})
>
> Gratefully,
> ••• rabbit ❤️‍🔥🐰
>
> --
> ••• rabbit ❤️‍🔥🐰
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230812/85939cc8/attachment.htm>


More information about the Cuis-dev mailing list