Re: Call for Opinions
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> May 22, 2005
- 426 views
On Sat, 21 May 2005 20:09:30 -0700, Mario Steele <guest at RapidEuphoria.com> wrote: >Problem is Pete, yes, struct in that example is declared as MyStruct. HOWEVER, >what about type-casting? Afaik, Eu does not have, need, or want type-casting. >Example of Type Casting: <snip> >If we went the way you suggest, then this would become obsolete, as >sub-classing >couldn't be controled. I don't understand, did you mean:.
if platform() = 3 then MyClassA MyNewVar MyNewVar@new({1,2,3}) else MyClassB MyNewVar MyNewVar@new({1,2,3,4}) end if
Why would @ be better than = ? > And we're back to having the same problem as we do now >with Regular Euphoria, as unable to dynamically include diffrent files, based >on >platform, only in a Object refrence. I'm sure eu.ex can be modified to handle platform-dependent includes, eg:
include.WIN32 file.exw include.LINUX file.exu
If you are going to have platform-dependent classes, you'd need to invent a similar scheme. A better example might be:
class MyClass... WIN32.new(... LINUX.new(... end class function f(object a) a = new(blah,blah) end function MyClass MyNewVar f(MyNewVar)
which brings me back to my original question, why would the above scheme not work as well as a@new(blah,blah) would? Pete