Re: [phix] if 'number' then why not 'list' ?
- Posted by irv Feb 21, 2021
- 980 views
Since i was working around the type system to make shared variables possible, i first considered type. But type as implemented in OE, doesn't let the programmer know the variable name being type-checked. I had to jump hoops to get that data. And the code written (procedures and functions) aren't exclusively naturally available to the variable the type check was written for. And finally, the resulting code block would/could look like an include file. Which is how i got to asking about "class" vs "include as".
Kat
Yep. When Rob first implemented the "include as", it was possible to do multiple includes under different namespaces, and have separate instances of a variable. That didn't last long, he quickly "fixed" it - presumably due to side effects (he didn't share). If it had been combined with an improved type() implementation, as you point out, Euphoria would have had OOP decades ago - but probably not with inheritance. Phix does that nicely.