|
|
|
|
|
by adrianratnapala
3638 days ago
|
|
My instinct is to say that you should allow classes as oridnary values. Many interpreted languages do this with success. For example in Python, classes are objects (which happen to be callable) and some nice simplifications derive from it. On the other hand, Lily is a type-safe language with generics. The kinds of "metaprogramming" that you would try to do with Python classes-as-objects might be done in different ways in Lily. More theoretically, the whole point of types (as sets) was to was to be a qualitively distinct layer of things that could not be mixed up in logically paradoxical combinations with other objects. That abstruse point of logic might or might not have practical implications for a real-world programming language. |
|