brownplt / code.pyret.org

Website for serving Pyret to folks.
Other
24 stars 45 forks source link

Are empty tables prohibited or not? #475

Closed westluke closed 1 year ago

westluke commented 1 year ago

Shriram and I noticed a funny thing about tables the other day!

If you try to create a table with an empty schema using table: end, you get the message "This table has no column names, but tables must have at least one column." But that's not true! Because the expression (table: colname row: 3 end).drop("colname") doesn't throw an error, and gives you a table without columns.

The B2T2 spec requires the ability to make tables with an empty schema, so it seems like the table: end syntax should work.

westluke commented 1 year ago

Oops, realized this should be on pyret-lang instead.