[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: settor functions



the uncaught exception is because {} are not considered functions.
maybe they should be.  it's a minor amount of new code in eval.c
to support return from {}, but the reason i don't want {} to
catch return is that then

	fn foo {
		local (orig = $*) {
			while {!~ $#* 0} {
				if {~ $1 --} {
					return $*(2 ...)
				}
				* = $*(2 ...)
			}
			return $orig
		}
	}

would change meanings, because the inner return would just set the
value for the if clause but not return from foo.

anyway, that's the argument, and it convinces me, but it does seem
asymmetric, and that causes concern.