Re: Type-check behavior

new topic     » goto parent     » topic index » view thread      » older message » newer message

At 01:05 PM 15-03-1999 , you wrote:
>Maybe this is just me, but I think it's silly for Euphoria to do this...

The "sillyness" is that Euphoria should understand that a user defined type
must at least be of the "basic" type of it's parameter. If that's not true,
automatically a type check error (FALSE) shouls be returned.

type foo(sequence param)
        ...
end type

type bar(integer param)
        ...
foo foobar

foo foovar
bar barrvar

barvar = 10
-- 10 is an integer, so the rest of 'bar' type checking is performed.

foovar = barvar
-- barvar ain't a sequence, 'foo' type checking is completly ommited.


I'm certain Robert will be glad to include this "optimization" to future
realeases of Euphoria.


Regards,
          Daniel  Berstein
         [ daber at pair.com ]

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu