Re: I don't like the intro page of the documentation.

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...
jaygade said...

I disagree with the language being "statically-typed" ...

Ok, I stretched the meaning of the term. But in my defense, 'statically-typed' refers to data-type usage being validated at compile time whereas Euphoria does it at run time. However, with a bit more work, we could get the parser to pick up many instances of incorrect data type usage.

For instance ...

procedure FOO(integer a, sequence b) 
   ---  whatever --- 
end procedure 
 
FOO( "abc", 3) 

This would fail at run-time but we could get it to fail at parse time instead. The difference is that we could pick up bugs before the bad code was run.

We do this in some cases. Right now, I think it's only for inlined routines. When I run your code on 4.0.0 (or later), I get:

$ eui405 bug.ex 
/home/matt/eu/test/bug.ex:4 
<0146>:: Type Check Error when inlining literal 
FOO( "abc", 3) 
             ^ 

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu