[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: ideas for lambda syntax
- From: Henning Diedrich <hd2010@...>
- Date: Thu, 11 Apr 2013 03:39:44 +0200
Algol 68 borrowed from it, and Dirk's sample is a mix of symbols and letters, so.
Is the readability better, in everyday use, Dirk? Or did that turn out to be a dead end?
On Apr 11, 2013, at 3:24 AM, Coda Highland <firstname.lastname@example.org> wrote:
> You mean APL. Algol looks like Pascal.
> /s/ Adam
> On Wed, Apr 10, 2013 at 6:19 PM, Henning Diedrich <email@example.com> wrote:
>> Wow, Algol lives! Awsome.
>> On Apr 10, 2013, at 11:49 PM, Dirk Laurie <firstname.lastname@example.org> wrote:
>>> 2013/4/9 Dirk Laurie <email@example.com>:
>>>> Lua's existing syntax *is* lambda syntax, but for the sake of
>>>> portability the three symbols required are spelt out with keywords.
>>> Portability-shmortability. Get yourself a font that displays all
>>> of Unicode properly and configure your keyboard to make the
>>> Unicode characters you need with the alternate graphic key.
>>> The attached patch to Lua 5.2 allows the syntax
>>> ∆(a,b) → a+b ⋄
>>> Actually, all Lua keywords have been replaced by single Unicode
>>> symbols, as a service to those who find Lua code obfuscated when
>>> using English words like 'function' and 'return' instead of symbols.
>>> Here is a sample:
>>> ⊣ i ∊ pairs(_G) ⊢ print(i) ⋄ -- prints the global table
>>> ⍳ 2<3 ⊥ print(∪) ⊤ print(∩) ⋄ -- prints "true"
>>> The mapping of Unicode symbols to Lua terminals is defined
>>> in the patch to llex.c.