1. Euphoria typing discipline
- Posted by smudger Dec 29, 2010
- 1185 views
Using the definitions here:
http://en.wikipedia.org/wiki/Type_system
How is Euphoria typed?
Smudger
2. Re: Euphoria typing discipline
- Posted by mattlewis (admin) Dec 29, 2010
- 1169 views
Euphoria uses both static and dynamic types.
Some aspects of euphoria are strongly typed (think about trying to get a truth value when comparing a sequence and an atom), and others are weakly typed (an atom converted to an integer and vice versa).
I suppose that a euphoria atom is a union type of euphoria integers and doubles, and of course an object can be anything.
Matt
3. Re: Euphoria typing discipline
- Posted by DerekParnell (admin) Dec 29, 2010
- 1187 views
Euphoria is both static and dynamic.
Static means that the parser enforces and/or uses type declaration information to create the appropriate IL for statements.
Dynamic means that type information is worked out at execution time and the appropriate code is selected then.