Project

General

Profile

Support #1498

Export many names or just one?

Added by John Abbott over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Manual/documentation
Target version:
Start date:
03 Oct 2020
Due date:
% Done:

100%

Estimated time:
1.11 h
Spent time:

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

Related to CoCoA-5 - Design #1495: Package exporting nothing?Closed2020-10-02

History

#1 Updated by John Abbott over 3 years ago

#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.

  1. we have complicated code that works, a shame removing it... but we need to maintain it!
  2. we have a simple manual one "export" -- one function
  3. 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

Also available in: Atom PDF