Support #1498
Export many names or just one?
Description
The CoCoA manual says that export
expects just a single name; the code will accept a comma-separated list.
Change the manual or change the code?
Related issues
History
#1 Updated by John Abbott over 3 years ago
- Related to Design #1495: Package exporting nothing? added
#2 Updated by John Abbott over 3 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 20
We have the habit of exporting a single name at a time, but I see no harm in allowing several names to be exported by one command.
It seems to be just a question of stylistic preference.
So I suggest changing the manual.
#3 Updated by John Abbott over 3 years ago
- % Done changed from 20 to 50
The relevant source code is in Parser.C
from line 556 to 595.
It is surprisingly long; allowing just a single name after export
would make it shorter (but that is not really so important).
#4 Updated by Anna Maria Bigatti over 3 years ago
This is a marginal issue, but we have two contrasting things (and now we know it ;-) ), so we should make a decision.
- we have complicated code that works, a shame removing it... but we need to maintain it!
- we have a simple manual one "export" -- one function
- if I look at a package, especially if not mine, I much prefer seeing the exported functions well visible in a column. So I'm against suggesting one can write them in a line ;-)
So my vote goes to simplifying the code.
... so John does it, instead of me ;-)
#5 Updated by John Abbott over 3 years ago
- Status changed from In Progress to Feedback
- Assignee set to John Abbott
- % Done changed from 50 to 90
I have changed the impl so that only a single name after export
is expected.
Amazingly it compiled first time, and it seems to work... well, CoCoA runs (after reading all the standard packages).
Checking in now.
#6 Updated by John Abbott over 3 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100
- Estimated time set to 1.11 h