Hi, there!
> But ok. Now, the scary thing is when the following is fed:
>
> declare
> X = l(f:1)
> local F in
> case X of l(F:V) then {Browse F#V} end
> end
>
> where F is clearly introduced, but unbound, and the interpreter crashes
> with lots of curses (Mozart 1.3.2, Fedora).
Well, it's true that the emulator does not react in the most graceful
manner there. That's a bug, if only in error reporting :o) Anyway, the
case statement simply does not work the way you want it to. If you use a
variable as a feature name, it should be already bound to some atom or
integer. At most, if the variable is free, what might be expected as
correct behaviour is either a more informative error message or that the
case statement should block until the variable gets bound.
I for one cannot see the point of the extension you propose nor know of
of any other language supporting this. In special, a pattern like
l(F:V ...) would be intrinsically non-deterministic, don't you think?
Cheers,
Jorge.
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users