microsoft / advanced-formula-environment

Create, edit, and reuse formulas in Excel
https://aka.ms/get-afe
MIT License
109 stars 11 forks source link

Dot in function name gives error #70

Open 0scarius opened 7 months ago

0scarius commented 7 months ago

I run into the following issue for function names in AFE: in the Workbook module I can name functions using a dot, e.g. ARRAY.SHIFT = LAMBDA(). However, if I want to do that in another (custom) module, using a dot in the function name does not work and this error message is shown: afbeelding

jack-williams commented 7 months ago

This is a duplicate of #48.

Dots in names are challenging to deal with. We support them in the Workbook level for compatibly reasons; you can take all the names in the name manager and write them there if you want.

Modules are a new concept that are currently saved as single dotted names, but in the future we may change the representation. I want to avoid overly complex dotted name resolution where given a name:

A.B.C.

Then it could either be a name A.B.C, or some combination of a module name and then a dotted name. If we added nested modules, then this gets even worse. We could have a module A with name B.C, or a nested modules A then B with a name C.

Nested modules would be a better way to represent what you are trying to do:

/Functions
  /Array
    - SHIFT
    - REVERSE
    - ...

unfortunately we do not have them yet, but I would rather not add dotted module member in the short-term. My current advice would be to use underscores for module member namespacing, like FUNCTIONS.ARRAY_SHIFT.