On Tue, May 13, 2008 at 3:36 PM, Ralf Hemmecke wrote: > Forwarded with the permission of Stephen Watt.
Thanks, Ralf. I am glad to see Stephen's reply. > > On 05/13/2008 05:30 PM, Stephen Watt wrote: > > > For does not introduce a new scope for its body for a few reasons: > > > > 1. In languages like C any compound statement is a new scope so > > we have new scopes for loop bodies, branches of if-s etc. > > > > This does not interact well with implicitly local variables. Are implicitly local variables really a good idea in a strongly typed language? > > ... > > I admit that none of these are absolutely compelling. So I should > > add that we tried it the other way, and this way made coding the > > library easier. > > I think that the number of times that an additional declaration would be required is rather small (as Gaby's changes to the Axiom library code shows) and these cases are often good candidates for code review. For example, rather than: > > if foo? then a := 1 else { f(); a := 2 } I would rather see: a :=2; if foo? then a := 1 else f() or if you must then, a:Integer; if foo? then a:=1 else ( f(); a:=2 ) Regards, Bill Page. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel