David L. Nicol wrote:
> Yes, absolutely, about the semantics.
>
> About the syntax, how about just in a block behind %HASHNAME?
>
> (as long as it doesn't use $a and $b, of course )
> (or if the insta-sort thing needs "sort" written in and this doesn't)
>
> %record{
>
> $something_new = 3; # just set $record{something_new} to 3
>
> };

I abhor 'with' in Pascal/Delphi, because within the block I can't
distinguish between two properties with the same name, where one is in the
current 'with' scope, and one is in the default scope. This is one of those
few cases where VB has nicer syntax--within a 'with' block you have to
precede a property name with '.' to get the with block scope:

  dim height as double
  dim ws as new Excel.worksheet  // 'worksheet' has a 'height' property

  with ws
    print .height   // Accesses ws.height
    print height    // Accesses me.height
  end with

Whatever syntax we go with to get 'with' type scoping, please let's make
sure that we can still access the default scope within the block.


Reply via email to