Re: C-like Structures
- Posted by mattlewis (admin) Jul 20, 2011
- 2555 views
mattlewis said...
SDPringle said...
Rather than abandoning EUPHORIA types this could be an extension to the typing system we already have.
I think a better approach might be to keep them separate, but allow memstructs to leverage the type system:
I think I'm leaning towards:
type nonnegative_int( object o ) if atom( o ) and o >= 0 then return 1 end if return 0 end type memstruct nonnegative_point -- assignments will be type checked as nonnegative_int unsigned int as nonnegative_int y end memstruct
Matt