Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can static type checking work when types are first-class objects?

checking objects static type types
0
Posted

How can static type checking work when types are first-class objects?

0

This question refers to something which seems paradox: When Seed7 types are created at runtime how can they be checked at compile time. The simple answer is that a type created at runtime cannot be used to define something in the program that is currently running. Seed7 declarations are not executed at runtime. Functions with type parameters and type result are executed at compile-time. This is done in templates and abstract datatypes (both are executed at compile-time) .It is possible to have type variables and type expressions at runtime but is not possible to declare objects with such a variable type for the program which currently runs. Such type variables and type expressions are used in the Seed7 compiler.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123