Please excuse if this gets posted twice, my mail client seems to having
problems....


Hi Russel,

I know of no research, however just to comment that a related statement in
VB was useful for improving program comprehension if used sensibly...

Back in the day (~2003 :-)), I did a fair amount of development in VBA
2000/2002, a hacked version of VB6. It was pretty common to use the language
in an essentially declarative manner, auto-formatting charts for realtime
display etc.

The 'with ... end with' made the program substantially more comprehensible
by dropping the long, frequently very repetitive, specifications of objects.

I'm not sure what the limits of the usage in VBA where. I'm sure you could
have used it in ugly contrived manners if you had tried, but generally I
would argue it was a force for comprehensibility, especially in highly
declarative code...

If it's any use I might still be able to dig up some samples for you?

Cheers,

Luke



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Russel Winder
Sent: 27 April 2005 08:12
To: PPIG Discuss
Subject: PPIG discuss: Is there any research on...

In the late 1970s early 1980s I recollect the with clause in Pascal
causing many students learning programming great difficulties.  A number
of languages (notably Python and Groovy) are about to introduce this
construct and I am a bit concerned that it is a bad idea from the
program comprehension perspective -- it also adds complexity to the
compiler but that is not really the point.  I am wondering if there has
been any work on the comprehension issues of with clauses or scoping and
attribute lookup in general that might actually inform the debate (for
Groovy anyway -- I am on the development team for this language).

Thanks.

(For those wondering what the with clause is:  The with clause is a way
of changing the expression of binding of attributes to records or
objects.  The sequence:

        s.foo = [ 1 , 2 , 3 ]
        s.bar ( 4 , s.foo )

where s is some record or object reference / pointer and foo and bar are
correctly typed attributes of the type of s can be written using a with
clause:

        with ( s ) {
          foo = [ 1 , 2 , 3 ]
          bar ( 4 , foo )
        }
) 

-- 
Russel.
====================================================
Dr Russel Winder                +44 20 7585 2200
41 Buckmaster Road              +44 7770 465 077
London SW11 1EN, UK             [EMAIL PROTECTED]


________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html
 
----------------------------------------------------------------------
PPIG Discuss List ([email protected])
Discuss admin: http://limitlessmail.net/mailman/listinfo/discuss
Announce admin: http://limitlessmail.net/mailman/listinfo/announce
PPIG Discuss archive: http://www.mail-archive.com/discuss%40ppig.org/

Reply via email to