Project

General

Profile

Design #939

Rename Fact to factorial?

Added by John Abbott over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Renaming
Target version:
Start date:
10 Oct 2016
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

I suggest renaming Fact to factorial, the same name as used in CoCoALib.
This change is not backward-compatible.


Related issues

Related to CoCoA-5 - Design #868: Der, Bin: why the capital letter?Closed2016-04-17

Related to CoCoA-5 - Support #940: Check all fns in packages work even without BackwardCompatible.cpkg5Closed2016-10-10

History

#1 Updated by John Abbott over 7 years ago

  • Related to Design #868: Der, Bin: why the capital letter? added

#2 Updated by John Abbott over 7 years ago

In #868 (comment 3) Anna pointed out that the name Fact could easily be seen as ambiguous (short for factorial or factor?)

I do not usually like longer names, but in this case, to avoid the ambiguity, I do not see any good solution (unless we want to implement as postfix operator called !, but I'm not willing to do that).

The name factorial is surely clear and unambiguous.

I am thinking of moving Fact into obsolete.cpkg5; what do you think?

#3 Updated by Anna Maria Bigatti over 7 years ago

No need to do any change: the official name is indeed factorial.
I'd rather keep Fact working smoothly for some more time.

#4 Updated by John Abbott over 7 years ago

  • Related to Support #940: Check all fns in packages work even without BackwardCompatible.cpkg5 added

#5 Updated by John Abbott over 6 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

How about making Fact obsolescent?

#6 Updated by Anna Maria Bigatti over 6 years ago

  • Status changed from In Progress to Feedback
  • Target version changed from CoCoA-5.?.? to CoCoA-5.2.2
  • % Done changed from 10 to 80

Fact is in BackwardCompatible.cpkg5, and not in the manual.
factorial is the official name.

Should we close this issue leaving everything as it is?
I see no need to make it obsolescent.

#7 Updated by John Abbott over 6 years ago

  • % Done changed from 80 to 90

Why not make Fact obsolescent?
Surely it is a good idea to encourage users to move away from Fact to factorial, isn't it?

#8 Updated by Anna Maria Bigatti over 6 years ago

  • Assignee set to John Abbott

John Abbott wrote:

Why not make Fact obsolescent?
Surely it is a good idea to encourage users to move away from Fact to factorial, isn't it?

Seem a gratuitous backward-incompatibility, but after all we have already removed it from the manual (and Bin, similarly).

#9 Updated by John Abbott over 6 years ago

The advantage of moving Fact (and Factorial?) to obsolescent.cpkg5 is that users will get a message telling them to update their code (by replacing the fn name with @factorial). Leaving Fact and Factorial in BackwardCompatible.cpkg produces no such "useful message".

#10 Updated by John Abbott over 6 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

Moved. Closing.

Also available in: Atom PDF