Re: [elixir-core:11299] Multi-letter (uppercase) sigils

2023-03-04 Thread José Valim
All ascii uppercase for now because I want to avoid introducing confusion that sigils are somehow related to modules, e.g. ~Mat[...] may have people looking for a module named Mat somewhere. Plus, we can always further relax the rules later and allow more characters. On Sat, Mar 4, 2023 at 7:10 

Re: [elixir-core:11298] Multi-letter (uppercase) sigils

2023-03-04 Thread Austin Ziegler
Would such sigils need to be all uppercase or would an uppercase initial letter be sufficient? I would think that `~Vec[…]` or `~Mat[…]` would be more readable (and easier to type, eventually). I’m not sure whether `~Sql[…]` or `~SQL[…]` would be better, but I think that would be good. What about

Re: [elixir-core:11297] Multi-letter (uppercase) sigils

2023-03-04 Thread José Valim
To be clear, I am not advocating for any change to the existing sigils. The main point is that uppercase sigils are more important than lowercase ones and that, even in _some_ cases you may want interpolation (which would warrant a lowercase sigil), having a different syntax for interpolation can

Re: [elixir-core:11296] Multi-letter (uppercase) sigils

2023-03-04 Thread Amos King - Binary Noggin
I love this idea. Removing the ambiguity will help with adoption as new developers to the language are less confused. It also allows infinite sigils to be available without stepping on each other. I'm not suggesting a jump on making sigils for everything. You made the subtle point of sigils

Re: [elixir-core:11295] Multi-letter (uppercase) sigils

2023-03-04 Thread Zach Daniel
Yes please :) that’s is all. On Sat, Mar 4 2023 at 3:15 AM, José Valim < jose.va...@dashbit.co > wrote: > > Sigils in Elixir are currently limited to a single letter. We had many > discussions in the past about allowing more letters but they were > ultimately rejected because of lowercase

Re: [elixir-core:11294] `mix test` should randomize module execution order

2023-03-04 Thread Benjamin Philip
Hi, This person, Manish Sharma, has been repeatedly spamming this mailing list. It would be appreciated if we could either block his email or all emails from his email address' domain. The docs on how to do this in Google Group can be for here: https://support.google.com/a/answer/2364632?hl=en.

Re: [elixir-core:11292] Re: Why can't I compare DateTime with '>' or '<'?

2023-03-04 Thread Sabiwara Yukichi
Also, even Decimal.compare/2 choses to support this which comforted me with this decision: iex> Decimal.compare(Decimal.new(2), 1.0) ** (ArgumentError) implicit conversion of 1.0 to Decimal is not allowed. Use Decimal.from_float/1 Le sam. 4 mars 2023 à 18:34, Sabiwara Yukichi a écrit : > Thank

Re: [elixir-core:11291] Re: Why can't I compare DateTime with '>' or '<'?

2023-03-04 Thread Sabiwara Yukichi
Thank you José for the feedback! I considered this point, and although it would be ideal, I decided to consider this case an acceptable trade-off not to handle it, because: 1. it would make the implementation much more complex as pointed out 2. it would remove a lot of potential for optimizations

[elixir-core:11290] Multi-letter (uppercase) sigils

2023-03-04 Thread José Valim
Sigils in Elixir are currently limited to a single letter. We had many discussions in the past about allowing more letters but they were ultimately rejected because of lowercase sigils. The issue with multi-letter lowercase sigils is that: 1. they are ambiguous to humans 2. they are ambiguous to

Re: [elixir-core:11289] Re: Why can't I compare DateTime with '>' or '<'?

2023-03-04 Thread José Valim
We had discussions in the past and the issue with a Comparable protocol is that we need multiple dispatch. For example, we should be able to semantically compare "Integer cmp Decimal" and "Decimal cmp Integer" which is a more complex problem as it requires defining a scale to compare all of them.