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

Brian L. Troutwine brian@REDACTED
Wed Apr 2 00:11:46 CEST 2014


Friends, 

I believe, firstly, that we must integrate MASER-accurate time values. This is vital for Erlang’s long-term survival as humanity moves outward into space aboard nuclear-fushion power spacecraft. All watches, in the Glorious Future, will contain cesium clocks and we don’t want to look silly, being less accurate than a wristwatch, do we? “What use,” future people will ask, “is this damn language if it loses microulfs of time, relative to my wristwatch?” 

I believe, secondly, that this patch is too timid. I propose the new name be:

    bigger_than_last_time_ps_locks_your_vm_hahahaha/0.

As we all know, descriptive function names result in reliable software and the _most_ descriptive names are those which bind you to a certain implementation. 

On Apr 1, 2014, at 5:23, Jesper Louis Andersen <jesper.louis.andersen@REDACTED> wrote:

> 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.
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20140401/ac04b4e3/attachment.bin>


More information about the erlang-patches mailing list