> Yeah, I might have contributed to this ruckus too. I consider it bad 
> design to let any variable have a void (i.e., uninitialized) value. ;)

I couldn't agree more. Some other languages will automatically initialize 
variables for you--I think Lingo doesn't because it's so loosely typed (read: 
untyped).

You get the hairy eyeball, though, when you're expecting a return value from a 
function, and it doesn't return anything. It took me two days to track my bug 
down because there was a long and tortuous code path to and from a function 
being built on the fly. In certain cases, the function was never built, so 
there was no return, ergo a void variable.

> Deliberately setting a variable to void seems just screwy to me.

That makes sense. But since Lingo variables aren't typed, or even declared, 
the compiler doesn't have a chance to initialize it.

Here's a scenario: x = anObject.mAHandler

mAHandler gets its value from objectB.mAnotherHandler, which in turn gets its 
value from objC.mYetAnother, and so on down the line. Something at the end of 
the call chain is supposed to return a value. But, because of an exponential 
number of branches, you can't be sure you'll eventually get a return. You 
gotta check for voidP then.

If Lingo required you to at least declare variables before you use them, it 
could assign a value at compilation. With Lingo's ability to declare variables 
on the fly, though, I'm not sure how it could do that.

Cordially,

Kerry Thompson

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to