New EEP draft: Pinning operator ^ in patterns

Eugene e@REDACTED
Fri Jan 15 11:48:14 CET 2021


On 1/15/21 11:42 AM, Raimo Niskanen wrote:
> On Thu, Jan 14, 2021 at 06:09:53PM +0100, Eugene wrote:
>> On 1/14/21 3:58 PM, Raimo Niskanen wrote:
>>> On Mon, Jan 11, 2021 at 02:50:46PM +0100, Eugene wrote:
>>>> annotating UNbound variable will take less symbols.
>>>> far far far less.
>>>>
>>>
>>> Every time you introduce a new variable, it is unbound.
>>>
>>> Do you claim that matching an already bound variable is more common?
>>
>> not matching,
>> mentioning.
>>
>> i hope you are not trying to introduce another
>> context-dependant mental mess.
> 
> Nope.  I was trying to understand you.

if you compare occurrences of UNbound vs bound,
bound is way more often,
and should be given the shortest notation.

if you limit your scope to the "match" context
(whenever a part of an expression is equivalent to
a left-side of a match)
you thus create a context-dependency that
MUST BE KEPT IN MIND OF A READER.

you win a statistical comparison and can give
the shorter notation to UNbound mentions of a variable,
but a reader of your program has to pay some price.


More information about the eeps mailing list