TypedTables.jl icon indicating copy to clipboard operation
TypedTables.jl copied to clipboard

Table() and FlexTable() raises ERROR: UndefVarError: `n` not defined

Open femtotrader opened this issue 1 year ago • 2 comments

Hello,

I wondered if we can create an empty FlexTable and add columns after... but noticed that FlexTable() raises ERROR: UndefVarError: n not defined.

This is not a very explicit message.

Kind regards

femtotrader avatar Apr 25 '24 21:04 femtotrader

Yes, I also encountered the same problem. I have the same needs as femto...

abcdvvvv avatar Feb 10 '25 10:02 abcdvvvv

This is a huge problem that deserves fixing.

It might require a bunch of overloads or special cases. Note the sometimes the indices (or length) might be immutable or mutable; yet there are no columns to carry such information when there are no columns.

Also please be aware that I started Dictionaries.jl partly because of the intersecting design space that follows; so it’s not so much disinterest that lands us here.

I would say some very consistent semantics for arrays of named tuples should be possible here but we’d want to make sure we are not slowing down existing use cases. DictTables with indices but zero columns seem valid.

To anyone has the heart to grapple with these issues and improve the situation - help is welcome. ❤️

andyferris avatar Feb 15 '25 10:02 andyferris