Design #868
Der, Bin: why the capital letter?
Description
In CoCoA-5 the function for computing formal derivatives is Der
; why does der
not exist?
Related issues
History
#1 Updated by John Abbott about 8 years ago
I understand we want to keep Der
for backward compatibility.
Since we have deg
, den
, det
why not also der
?
#2 Updated by Anna Maria Bigatti about 8 years ago
- Subject changed from Der: why the capital letter? to Der, Bin: why the capital letter?
It is also the case for bin
.
In CoCoALib they are called deriv
and binomial
, so the lower-case name is different (even though not given as a hint in the error).
Maybe we should change the name in CoCoALib as well? I cannot see ambiguities here
Another case is Fact
which is called factorial
, but that there is indeed an ambiguity with factor
.
#3 Updated by Anna Maria Bigatti over 7 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 80
- Estimated time set to 1.00 h
Should we change deriv
into der
in CoCoALib?
#4 Updated by John Abbott over 7 years ago
- Related to Design #939: Rename Fact to factorial? added
#5 Updated by John Abbott over 7 years ago
My preference is for deriv
in both CoCoALib and CoCoA-5, but that is not backward compatible :-/
I think deriv
is clearer than der
(or Der
).
I also have a mild preference for binomial
over bin
; maybe binom
is also a candidate.
One reason I do not like bin
so much is that it is an english word (meaning something like "cestino").
Any change to these names is naturally not backward compatible; so if we do change them (as I hope we do),
it would be good to make a definite improvement (ideally beyond simply replacing a capital by a small one).
#6 Updated by Anna Maria Bigatti over 7 years ago
No need to do any change: the official names are indeed binomial
and deriv
as in cocoalib.
I'd rather keep Bin
and Der
working smoothly for some more time.
#7 Updated by John Abbott over 7 years ago
By "smoothly" do you mean that it should not yet be moved to obsolete.cpkg5
?
We could even move Bin
to obsolete.cpkg5
, perhaps with the "obsolescent" print command being activated only after a certain date:
define Bin(n,r) if date() > 20171231 then println "***WARNING*** Bin is obsolescent, please use binomial instead" endif return binomial(n,r) enddefine
In any case, I think we should make sure that all existing packages use the "correct", "modern" names.
#8 Updated by Anna Maria Bigatti over 7 years ago
John Abbott wrote:
By "smoothly" do you mean that it should not yet be moved to
obsolete.cpkg5
?
Yes, that's what I meant
In any case, I think we should make sure that all existing packages use the "correct", "modern" names.
Every so often we should run the tests without the BackwardCompatible package. (I thought you have done it a few times)
#9 Updated by John Abbott over 7 years ago
Anna Maria Bigatti wrote:
Every so often we should run the tests without the BackwardCompatible package. (I thought you have done it a few times)
Unfortunately you are right that we should do it; maybe I had even done it some time ago (I don't recall now).
After my next check in, it will be mostly OK. There is a problem with the "backward" syntax: Ideal(xy,z)
gives an error that the fn Ideal
cannot be found. What to do? The simplest is just to update all such calls...
I think there is no other way: with the * in place, or as ideal(***[xy,z]***)
.
#10 Updated by John Abbott over 7 years ago
- Related to Support #940: Check all fns in packages work even without BackwardCompatible.cpkg5 added
#11 Updated by John Abbott about 7 years ago
Can we move Der
and Bin
to obsolescent.cpkg5
?
#12 Updated by Anna Maria Bigatti about 7 years ago
John Abbott wrote:
Can we move
Der
andBin
toobsolescent.cpkg5
?
yes.
#13 Updated by Anna Maria Bigatti about 7 years ago
- Assignee set to Anna Maria Bigatti
- % Done changed from 80 to 90
done, tested.
#14 Updated by Anna Maria Bigatti about 7 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100
- Estimated time changed from 1.00 h to 2.01 h