Technically, lowercased sigils are not pure as well.

On Tue, Mar 30, 2021 at 10:31 AM [email protected] <[email protected]>
wrote:

> For me, it breaks the semantic of a sigil. I think of a sigil as a text
> representation of data, and your proposal is a text representation of a
> function call. In the end, every sigil triggers a function. But I think
> this should be a pure function.
>
> Aleksei Matiushkin schrieb am Dienstag, 30. März 2021 um 08:54:30 UTC+2:
>
>> Hello,
>>
>> I often find myself writing `DateTime.truncate(DateTime.utc_now(),
>> :second)` or similar stuff to get to the ‘instance’ of now.
>>
>> What if we have sigils `~U`, `~D`, and `~T` extended to:
>>
>> ~U[now] → DateTime.utc_now()
>> ~T[now] → Time.utc_now()
>> ~D[today] → Date.utc_today()
>>
>> with possible modifiers `s` and `m` to truncate times to seconds and
>> milliseconds respectively?
>>
>> ~U[now]s → DateTime.truncate(DateTime.utc_now(), :second)
>>
>> Here is the PR with the code for the reference
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_elixir-2Dlang_elixir_pull_10840&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=dxpYpXQoKs6G0DzyAkadusk6apfxFW35HxIzs7i2FWA&s=ahH6rzMtJKvAoLCZlUXApUVoBMnQ51VRw6LmF2l31Tw&e=>
>> https://github.com/elixir-lang/elixir/pull/10840
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_elixir-2Dlang_elixir_pull_10840&d=DwQFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=dxpYpXQoKs6G0DzyAkadusk6apfxFW35HxIzs7i2FWA&s=ahH6rzMtJKvAoLCZlUXApUVoBMnQ51VRw6LmF2l31Tw&e=>
>>  (it
>> uses empty sigils instead of ~U[now])
>>
>> --
> 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 [email protected].
> To view this discussion on the web visit
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_elixir-2Dlang-2Dcore_42a4b61b-2D4bae-2D475f-2D885b-2D974881ea0ebbn-2540googlegroups.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=dxpYpXQoKs6G0DzyAkadusk6apfxFW35HxIzs7i2FWA&s=DWMKj83w_HrOH_G-UxniPK9aFQeBEKsgzIo8gTYkOSw&e=>
> https://groups.google.com/d/msgid/elixir-lang-core/42a4b61b-4bae-475f-885b-974881ea0ebbn%40googlegroups.com
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_elixir-2Dlang-2Dcore_42a4b61b-2D4bae-2D475f-2D885b-2D974881ea0ebbn-2540googlegroups.com&d=DwQFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=dxpYpXQoKs6G0DzyAkadusk6apfxFW35HxIzs7i2FWA&s=19HKILr3FE0FSC8XmQMG2gzzhg0IXlLO0ByQ9OjV6zc&e=>
> .
>


-- 

*Aleksei Matiushkin*, Software Engineer - R&D

Office    (+34) 935 679 834 - Ext.

<http://kantox.com> <http://kantox.com/en>

8 Devonshire Square, London, EC2M 4PL, United Kingdom
Torre Mapfre, Planta 22, Marina, 16-18, 08005 Barcelona, Spain
*kantox.com <http://kantox.com/>*



<http://www.linkedin.com/company/1871617>
<http://www.linkedin.com/company/1871617>[image: LinkedIn]
<https://www.linkedin.com/company/1871617>
<https://twitter.com/kantox>[image:
Twitter] <https://twitter.com/kantox>
<http://www.youtube.com/user/kantoxfx>[image: YouTube]
<https://www.youtube.com/user/kantoxfx>

Kantox Limited is a UK private company with registered company number
07657495 and registered address at 8 Devonshire Square, London EC2M 4PL,
United Kingdom. We are authorised with the UK Financial Conduct Authority
(FCA) under the Payment Service Website 2017 as a Payments Institution (FRN
580343) for the provision of payment services and with HMRC as a Money
Service Business Registration No.12641987.
Kantox European Union, S.L.  is a Spanish private company with tax ID
number B673693371 and registered address at Torre Mapfre, Planta 22,
Marina, 16-18, 08005 Barcelona, Spain. Kantox is authorized by the Bank of
Spain, with registration number 6890, which is the supervisor of the
Spanish banking system along with the European Central Bank. Additionally,
we are supervised by SEPBLAC, the Supervisory Authority for the prevention
of money laundering and terrorist financing in Spain.
KANTOX is the Controller for the processing of data in accordance with the
GDPR and LOPDGDD for the purpose of maintaining a commercial relationship.
You may exercise your rights of access and rectification, portability,
restriction and opposition by writing to KANTOX to the email:
[email protected]. You have your right to make a complaint at www.aepd.es.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGF5_6eGMtuMJu17_f7jDWfStkNJ1H%3DMX4j1d0q4WtynvrQ6ow%40mail.gmail.com.

Reply via email to