bug-gawk
[Top][All Lists]
Advanced

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

Re: Can we include all 3 time extension functions in one package?


From: Andrew J. Schorr
Subject: Re: Can we include all 3 time extension functions in one package?
Date: Sat, 26 Oct 2019 19:45:26 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Oct 25, 2019 at 02:17:54PM -0500, Ed Morton wrote:
> maybe it'd make sense to move the 2 time extension functions,
> gettimeofday and sleep, into the same gawkextlib package as
> strptime, name that new package "time" instead of "strptime", and
> deprecate the existing non-gawkextlib time extension?

I think it would be problematic during a transition period
if we were to give it the same name as the existing core gawk extension.
At least on my system, both the core gawk extension libraries and the
gawkextlib libraries are installed into /usr/lib64/gawk, so we can't
really have them installing the same file. I suppose we could use
the alternatives mechanism to attempt to deal with that issue, but
it seems simpler to use a different name.

> 
> Pros:
> 
> 1. There's then simply 2 collections of time functions - core and extension
> 2. You can get rid of a non-gawkextlib package
> 3. The gawkextlib time package would be named such that you can add any
>    new time functions to it in future (as opposed to if it was named
>    "strptime")
> 
> Cons:
> 
> 1. The people using the existing time extension would need to 1-time
>    change how they do that

It's pretty nasty to break existing code, so I think this is a serious con
of removing the core time extension.

> 2. You have work to do to move those 2 functions to the new gawkextlib

That's probably not much work.

Here's another con: there have been many complaints in the past about how
difficult it is to install gawkextlib libraries, whereas the core gawk
libraries are delivered with gawk, so they're available for "free".
Several gawkextlib extensions are now packaged in Fedora rpms, but I'm
not aware of any other distros that provide them. So there would be unending
complaints on comp.lang.awk about how it's unreasonable to ask users
to download a file and type 'configure && make && make check && make install'.

Regards,
Andy



reply via email to

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