Sujet : Re: Bart's Language
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 22. Mar 2025, 15:12:58
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86msddkvbp.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Kaz Kylheku <
643-408-1753@kylheku.com> writes:
On 2025-03-21, bart <bc@freeuk.com> wrote:
>
On 20/03/2025 23:45, Kaz Kylheku wrote:
>
On 2025-03-20, Waldek Hebisch <antispam@fricas.org> wrote:
>
bart <bc@freeuk.com> wrote:
>
In this case, just write it like that, and only adjust it for the
somewhat different syntax:
>
func foo:int =
let int c := c1(10)
let int b := c + c2(2)
let int a := b+c3(c)
bar()
baz()
return c
end
>
>> In your description you wrote that declarations can be written
>
"out of order" and compiler will rearrange them in correct
order. That looked like great opportunity to write obfuscated
code.
>
I made a language feature like that: mlet.
>
https://www.nongnu.org/txr/txr-manpage.html#N-2B3072E9
>
This allows for circular references in order to support
the construction of lazy objects:
>
1> (mlet ((a (lcons 1 b))
(b (lcons 0 a)))
(take 20 a))
(1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0)
>
I don't understand what's going on above; the example here is a
bit clearer, other than that z at the end:
>
What's going on is that [...]
Just a short reminder that this is comp.lang.c, and nothing about
any of the discussions above has anything to do with C.