[Cuis-dev] Possible normalization of code files to use ANSI assignment. Re: New handling of assignment and return arrows
Gerald Klix
cuis.01 at klix.ch
Fri Oct 21 08:52:40 PDT 2022
On 21.10.22 16:40, Juan Vuletich via Cuis-dev wrote:
> On 10/21/2022 11:35 AM, Juan Vuletich via Cuis-dev wrote:
>> Hi Folks,
>>
>> I just pushed some updates to the mechanics of how we show arrows for
>> assignment and return.
>>
>> Instead of hijacking the ASCII for _ and ^ I used Shout (the syntax
>> highlight engine) to replace them by an arbitrary glyph. This gets
>> changed back when contents are saved or evaluated. So, files don't
>> change at all, at least not today. This step also let me clean up some
>> code. If in the future we choose to use Unicode for them, even in
>> files (something I'm still unsure about pros and cons), part of the
>> work is already done.
>>
>> If you want to play with these, select 'Use Unicode in Text Editors'
>> and edit #arrowStringForAssignment and #arrowStringForReturn at will.
>>
>> Thanks,
>>
>
> A possible next step is to always save files using the ANSI assignment
> syntax: ':=', and make the conversion a preference. This would mean that
> you'll no longer be able to chose between colon-equal and left arrow
> when writing your code. Files would always be ANSI, and the preference
> would control just how you see all of them.
This will make code generation much simpler.
>
> Pros include better interoperability.
> Cons include a bit less control over your own code.
One thing is not clear to me:
Will I be still allowed to type “_” and it will be replaced
by “:=” in the code, whereas some other character, preferably
an arrow “←” or depending on preferences some other
string like “⬅” or ”:=” will displayed?
IHMO, this would be the ideal behavior.
>
> I think it is a good change, but I'll follow community consensus. So,
> opinions?
>
> Thanks,
>
HTH,
Gerald
More information about the Cuis-dev
mailing list