bug-gawk
[Top][All Lists]
Advanced

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

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


From: Ed Morton
Subject: Can we include all 3 time extension functions in one package?
Date: Fri, 25 Oct 2019 14:17:54 -0500
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Arnold - wrt https://groups.google.com/d/msg/comp.lang.awk/Ft6_h7NEIaE/tmyxd94hEAAJ, thanks for providing strptime() functionality and I'm sorry that you thought I was complaining when I asked why it was packaged separately from the other time extension functions, it was just meant to be a question.

Now that I understand you want to use gawkextlib for future extensions , rather than having these 3 separate collections of time functions:

1. core: systime, mktime, strftime
2. "time" extension: gettimeofday, sleep
3. "strptime" extension: strptime

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?

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
2. You have work to do to move those 2 functions to the new gawkextlib

I've no idea how much work "2" is but I've got to believe "1" is little work for those impacted and there's relatively few people impacted and strptime is such an extremely useful function to have they'd probably want to use the gawkextlib extension at some point anyway since they're already dealing with time.

Please consider this as just a suggestion, it's not a complaint.

Regards,

    Ed.




reply via email to

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