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
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
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
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
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
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.
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
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
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
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.
10 matches
Mail list logo