Re: [elixir-core:9467] Proposal: [DDD] A new operator for making tagged tuples to express domain business rules for data of primitive types.

2020-04-15 Thread Louis Pilfold
Hiya

While I'm a big fan of editor customising I think it's important to make
technology as accessible as possible. Maybe people (most?) will not know
how to either type these characters with their keyboard or know how to
configure their editor to enter them on their behalf. Adoption will be slow
and the language will seem unfriendly if its features are not usable by all.

Cheers,
Louis


On Wed, 15 Apr 2020, 13:13 Ivan Rublev, 
wrote:

> Thanks for your comment. It may seem frustrating to use a shortcut to
> enter a symbol, especially when it's not engraved on a keyboard. Same time,
> we use shortcuts every day to speed up input.
> Emacs and Vim are enhanced editors. And I'm glad to hear that you use
> them. Emacs is very tweakable, and this is one of the brilliant properties
> of this tool that you can adjust for your comfort. F.e. adding (global-set-key
> [?\M-\q] [?\x00AB]) to the Emacs Init File gives you « symbol entered
> when you press Alt+q. And a key combination suitable for you can be
> assigned. Vim supports special symbols entered as-is coming from the OS
> input subsystem. F.e. in MacOS Vim, you can press the Alt+\ and have «
> symbol entered when in Input mode.
>
> A new operator should be easily typed in as many keyboard layouts as
> possible. Primarily because of that, these symbols « µ ¶ ¿ were suggested.
> Please, see input support for these symbols with US-international /
> UK-extended / German layouts in different OSes:
> Windows (Alt + key):
> https://sites.psu.edu/symbolcodes/windows/codeint/#foreign
> Linux (Compose key shortcuts):
> https://fsymbols.com/keyboard/linux/compose/
> macOS (Alt + key): https://fsymbols.com/keyboard/mac/
>
> On Tuesday, April 14, 2020 at 9:06:29 PM UTC+2, me 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-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/f8ebb77a-540d-44d1-bbee-8efbb101d981%40googlegroups.com
> 
> .
>

-- 
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/CABu8xFDLGqx2kZV%2BCy7jjxesVHtVqC7KSEQTy%3DFURba06SYEUw%40mail.gmail.com.


Re: [elixir-core:9467] Proposal: [DDD] A new operator for making tagged tuples to express domain business rules for data of primitive types.

2020-04-15 Thread Ivan Rublev
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 > 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 .
>> 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.