Adding +++ and --- with right associativity to the list is valuable and 
generous. 

Same time using three symbols for coupling operands can lead to long lines 
that are harder to read, comparing with one coupling symbol. Can compare 
the following two equivalent lines where second has 10 characters less:
def speed(Path +++ Kilometer +++ path, Time +++ Sec +++ duration), do: 
KilometerPerSec +++ path / duration

def speed(Path « Kilometer « path, Time « Sec « duration), do: 
KilometerPerSec « path / duration


Of course, adding and documenting a special symbol as an operator can lead 
to a storm of questions about how to type them in, which are not related to 
the language itself, but more for input tools. What at the end may involve 
language maintainers/supporters to deal with these questions.

In this context, is it a bad idea alongside with the +++ and --- right 
associativity operators to allow two following ranges of special symbols 
for being overridden as operators by experienced engineers: \u00A7-\u00AB 
(§ ¨ © ª «) with right and \u00BB-\u00BF (» ¼ ½ ¾ ¿) with left 
associativity?


On Tuesday, April 14, 2020 at 9:14:56 PM UTC+2, José Valim wrote:
>
> We could probably add +++ and --- with right associativity to the list, to 
> tag along ++ and -- which are right associative.
>
> On Tue, Apr 14, 2020 at 9:06 PM 'Justin Wood' via elixir-lang-core <
> elixir-l...@googlegroups.com <javascript:>> wrote:
>
>> > Is it a ridiculous idea to add one of those symbols as a new operator
>> > with the right to left associativity?
>>
>> As an Emacs (and light Vim) user, I would personally suggest against
>> something like this. At least in Emacs, it is not as simple as just
>> alt+keys in order to get these characters. And even if it were,
>> newcomers to the language, and people who rarely use these operators,
>> will have to lookup the key combination, or figure out how to do such a
>> thing in their editor.
>>
>> I would suggest that if any new operators were added to the language,
>> they should be easily typed in as many keyboard layouts as possible.
>>
>> Justin
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "elixir-lang-core" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to elixir-l...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elixir-lang-core/C215W5L92I8K.3CLRLHPIZJ885%40nixos
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/c4fcd3b7-ff79-4358-8c1d-e6ab22d4f432%40googlegroups.com.

Reply via email to