emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: encode-time vs decode-time


From: Lars Ingebrigtsen
Subject: Re: encode-time vs decode-time
Date: Sat, 17 Aug 2019 13:51:09 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

> Lars Ingebrigtsen wrote:
>> I thought it would be good to introduce a new function, say
>> `get-current-time', that could have our new signature.  We'd then
>> deprecate `current-time'
>
> It's not just current-time; it's also encode-time, file-attributes,
> directory-files-and-attributes, visited-file-modtime,
> current-idle-time, process-attributes, get-internal-run-time,
> make-frame-visible, time-add, time-subtract, and no doubt other
> primitives written in C that make Lisp timestamps visible to user
> code, along with the many functions written in Lisp (e.g.,
> time-since) that call these primitives and give Lisp timestamps to
> users.

Yeah, that's true, so introducing a new function here wouldn't help.

But I think that having these functions return something that doesn't
have the second spec in car/cadr is going to break a lot of people's
out-of-tree code.  So my feeling is that your plan isn't feasible, and
we'll have to live with these functions returning encoded time on the
current form forever.

Which I think is OK, although your new format is more elegant.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]