enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.34k stars 323 forks source link

Introduce a Value Type for Enso objects #6163

Open radeusgd opened 1 year ago

radeusgd commented 1 year ago

In the in-memory Table backend, we can store any Enso object in a Column. Currently, such a column gets a Mixed datatype.

To allow for more precise types, we want to introduce the following Value_Type variant:

    Enso_Object type=Any

If the type is set to some specific Enso Type, the column will ensure that only values of that type are stored within it.

radeusgd commented 1 year ago

? Allow auto_value_types to select a more specific type in a Mixed column if Meta.type_of all values in a given column (excluding Nothing probably) yields the same type.

cc: @jdunkerley do you think we want auto_value_types trying to guess the Enso_Object type? IMO this could be nice.

JaroslavTulach commented 4 months ago

Idea: Use Meta.type_of to identify Enso type. When there are different types, unify to Any?