[erlang-patches] Fix erlang:now/0 to be bigger_than_last_time/0

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Tue Apr 1 14:23:41 CEST 2014


While we are at it, I propose we alter the underlying NIF as well. For a
long time, the precision of the soon-to-be-deprecated `erlang:now()` call
is way too small. And while it properly compensates for leap seconds and
other shenanigans, we can do better. I propose we add support for Hydrogen
MASERs[0].

Since a MASER sells for about $235,000 the added precision will greatly
enhance Erlang as a language. Once the code is applied, we can remove[1]
the old imprecise code. While this might greatly diminish the number of
future Erlang installations, I feel it is the right course of action going
forward.

[0] http://en.wikipedia.org/wiki/Hydrogen_maser
[1] As per Fred's suggestion, the right course of action is instant removal
since deprecation is a finer weapon for a distant age before Eternal
September.



On Tue, Apr 1, 2014 at 1:48 PM, Roberto Aloi <
roberto.aloi@REDACTED> wrote:

> Hi all,
>
> Since we're planning backward-incompatible changes to the calendar module,
> I'd like to use this opportunity to replace Gregorian seconds with Ulfian
> seconds.
> Even if the Gregorian calendar has been the unofficial global standard for
> decades, this would be a great sign of respect to Ulf Wiger, who gave so
> much to the Erlang community.
> "ulfian" is also shorter than "gregorian" and easier to type, even without
> a Dvorak keyboard.
> Finally, this would also be a crucial step in the process of
> de-Christianization of the Erlang programming language.
>
> Kind regards,
>
> Roberto Aloi
>
> ----- Original Message -----
> > Why I agree:
> >
> > - Backwards compatibility and proper deprecation is annoying, not a
> >   convenience. It is far more confusing to have a function relating to
> >   time named 'now' than having breaking changes in your code, no matter
> >   how well-documented it is.
> > - The name you chose is less descriptive than before (it no longer
> >   relates to time), which forces people to look inside docs, which is
> >   great. I love documentation.
> > - You orphaned a bunch of names in other modules, namely:
> >    - timer:now_diff/2
> >    - calendar:now_to_local_time/1
> >    - calendar:now_to_universal_time/1
> >    - calendar:now_to_datetime/1
> >   Which logically now need to be renamed:
> >    - timer:bigger_than_last_time_diff/1
> >    - calendar:bigger_than_last_time_to_local_time/1
> >    - calendar:bigger_than_last_time_to_universal_time/1
> >    - calendar:bigger_than_last_time_to_datetime/1
> >   I always felt calendar had way too short names and believe this is an
> >   improvement for the better in the long term.
> > - Today is the best day for this change to happen, definitely.
> >
> > Regards,
> > Fred.
> >
> > On 04/01, JD Bothma wrote:
> > > This patch tries to improve the name of erlang:now/0 to make its
> behaviour
> > > a little more obvious for the sake of least surprise. It's a breaking
> > > change, but I really think it's worth it to reduce confusion.
> > >
> > > This is only the first step - if you think it looks ok I can do the
> rest.
> > >
> > >     git fetch git://github.com/jbothma/otp.git fix-erlang-now-name
> > >
> > >
> > >
> https://github.com/jbothma/otp/compare/erlang:maint...fix-erlang-now-name
> > >
> > >
> https://github.com/jbothma/otp/compare/erlang:maint...fix-erlang-now-name.patch
> > >
> > > All the best
> > > JD
> >
> > > _______________________________________________
> > > erlang-patches mailing list
> > > erlang-patches@REDACTED
> > > http://erlang.org/mailman/listinfo/erlang-patches
> >
> > _______________________________________________
> > erlang-patches mailing list
> > erlang-patches@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-patches
> >
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
>



-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20140401/3fa655d4/attachment.htm>


More information about the erlang-patches mailing list