Russ Abbott wrote: > CTM has a nice section on that on p 48. > > - C++ uses whatever garbage was there. > - Java initializes variables in objects to some default value. > - Prolog issues an error message. > - The Java compiler refuses to compile such variables when they are > local (as in your example). > - Oz suspends silently and waits until the variable gets a value. > > CTM lists these options in this order, which it considers increasingly > admirable. > I think it would be a very nice feature to be able to declare variables to > be data flow variables. But for every variable to be treated this way is > quite unintuitive--especially for new Oz programmers.
In some other languages with dataflow variables, they have to be declared. For example in E (www.erights.org), "def x" declares a dataflow variable, while "var x" declares a mutable variable. The latter is equivalent to a variable associated with a first-class mutable "slot" or cell; E's kernel language is similar to Oz in that respect. This allows use of "var" variables that are not guaranteed initialized to be a compile-time error, while not making it any more difficult to use dataflow variables. -- David Hopwood <[EMAIL PROTECTED]> _________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
