Re: NULL value anyone?

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

If you forget to declare a variable x, and then write ? x * 2, you expect to be warned that "x is undeclared". Similarly, if you do declare "atom x" and then code ? x * 2, what is the answer supposed to be? There's no default value of x that could be assigned without causing somebody some trouble sometimes.

I think the scenario you're describing here is a good case for Try/Catch. Otherwise, if I have an uninitialized object and I try to pass that object to a routine, I will encounter a runtime error. But with try/catch, I could have the opportunity to gracefully recover from that failure. I odn't think this is a case for NULL, although I do agree that having an option to un-initialize a variable would be nice (isn't that what delete does?)

-Greg

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

Search



Quick Links

User menu

Not signed in.

Misc Menu