3.1.7.2 The syntax for global and local definitions
Peter Hinely
Why is the syntax for the declaration of global and local variables so different?  It seems inconsistent.
                                   // Declares and initializes
  define variable x = 1; // a global variable
  let x = 1;             // a local variable
Why didn't they use a syntax like:
  define global variable x = 1;
  define local variable x = 1;
(or some shortened version of something like that.)
The same can be said of methods:
  define method my-method (x)
    x;
  end method
  local method my-method (x)
    x;
  end;
The words to initialize the global vs. local functions do not follow a logical syntax.
Also the statments that end the methods are not the same.
   "end method" vs. "end;"
Also local methods are intialized with the syntax "local method", but local variables are initialized with "let".  It seems very inconsistent to me.
Or is there something more I should consider?  (I know realize that "global"  methods provide for generic functions.)
Scott E. Fahlman
>                                 // Declares and initializes
>  define variable x = 1; // a global variable
>  let x = 1;             // a local variable
Well, maybe this is an inheritance from Common Lisp.
"Define" is a top-level, global sort of thing.
But creating a global variable is a more heavyweight operation, with more consequences.
Paul Haahr
>Also the statments that end the methods are not the same.
>   "end method" vs. "end;"
The word ``method'' is optional but permitted after ``end'' in both cases. I don't see what the problem is.
Scott E. Fahlman
It is curious that in the DIRM examples the "method" is pretty consitently omitted for local declarations and is kept for global ones.
That can be misleading, but the published grammar seems to be OK on this -- just hard to read.
Kim Barrett
The inconsistency being discussed here doesn't actually exist.
In the BNF from the DIRM, the syntax for both "local" and "define method" eventually reach "method-definition" as a common tail.
"method-definition" ends with "end method(opt) SYMBOL(opt)", so there's no difference between "local" and "define method" in this regard.