You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can not create a table literal for an empty table #19320
@youk I see in that thread that an empty table is defined identically to an empty list. That's … not nice. Now that nushell is starting to have types, that just seems wrong.
Activity
fdncred commentedon Oct 23, 2026
why would it allow you to create a table with no rows? It says that it expects rows.
youk commentedon Oct 24, 2026
Nushell has its own conception of "empty". See for example #903 (comment).
fdncred commentedon Oct 24, 2026
but what's the point/use case of creating an empty table?
bilberry-work commentedon Oct 24, 2026
@fdncred Plenty!
I have two current scenarios:-
And, more importantly, consistency.
bilberry-work commentedon Oct 24, 2026
@youk I see in that thread that an empty table is defined identically to an empty list. That's … not nice. Now that nushell is starting to have types, that just seems wrong.
fdncred commentedon Oct 24, 2026
A table is a list of records, that's it.
youk commentedon Oct 24, 2026
Is table a type?
fdncred commentedon Oct 24, 2026
It's never been finished. So, yes it's a type but it's incomplete. Even if it were a type, it would still be a list of records.