Re: Stupid Newbie-sounding question.

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

Patrick Barnes wrote:

<snip code>

> That's my take on the situation. I can't see any problems with this right 
> now, and Rob, I'd like to hear your thoughts on this.

The real problem is that it isn't all that useful because it only checks on 
assignment. 

Why does Euphoria have different functions for outputting variables,
depending on their type? If you choose the wrong one, you get a crash.
Other languages handle this transparently.

For example, if Euphoria actually used its type system, you could 
do this:

a =  1
b = 3.1415
c = "Foo bar"
d = {1,4,7,234}

print(a,b,c,d) 

All 4 should print the way you expect them to, IOW, 'c' doesn't look 
like a series of strange numbers, and 'd' doesn't try to print as 
a 4-letter word.

I believe languages such as Lua and Python handle this without any 
problem, and they are untyped languages. Surely a language which forces 
you to declare specific types for a variable should actually make use 
of that information, shouldn't it?

Why does Euphoria have any types at all, if it isn't going to use them to 
make the programmers job easier, and to reduce errors?

Irv

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

Search



Quick Links

User menu

Not signed in.

Misc Menu