home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / pop / 229 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.9 KB

  1. From: kers@hplb.hpl.hp.com (Chris Dollin)
  2. Date: Thu, 28 Jan 1993 13:42:21 GMT
  3. Subject: Re: Re: dlocals etc. (and shallow binding)
  4. Message-ID: <KERS.93Jan28134221@cdollin.hpl.hp.com>
  5. Organization: Hewlett-Packard Laboratories, Bristol, UK.
  6. Path: sparky!uunet!europa.eng.gtefsd.com!gatech!swrinde!sdd.hp.com!hpscit.sc.hp.com!hplextra!otter.hpl.hp.com!hpltoad!cdollin!kers
  7. Newsgroups: comp.lang.pop
  8. References: <C1CAwq.8up@cs.bham.ac.uk> <116670051@otter.hpl.hp.com> <1993Jan26.160320.27465@cm.cf.ac.uk> <C1ID7x.FDE@cs.bham.ac.uk> <KERS.9
  9. Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
  10. Lines: 27
  11. In-Reply-To: kers@hplb.hpl.hp.com's message of 27 Jan 93 14:23:26
  12. Nntp-Posting-Host: cdollin.hpl.hp.com
  13.  
  14. In article ... kers@hplb.hpl.hp.com (Chris Dollin) wrote ...
  15.  
  16. ... quite a lot, actually.
  17.  
  18.    The Pepper solution is this. First, there are two kinds of declarations,
  19.    ``val'' and ``var''. Identifiers declared by ``val'' are not assignable
  20.    (the declaration initialises them), while those declared by ``val'' are.
  21.                                  ^
  22. Of course, you will have noticed that I should have said ``var'' | ...
  23.  
  24.    [Quickly scanning the Pepper code to hand, I see more than 750 ``val''s 
  25.    and less than 250 ``var''s. ...]
  26.  
  27. I realised (thanks, Steve) that I had completely forgotten about for
  28. loop identifiers and procedure parameters! There were 92 for loops
  29. (each contributing one val identifier) and about 1170 parameters,
  30. of which about 20 were var's (by default, they'd be val's). That
  31. brings to total to approximately 1900 val's versus 270 var's, so
  32. val's make up about 7/8ths of the variables in my code.
  33.  
  34. The numbers are only approximate, because I used grep, tr, and wc
  35. to do my counting. But they shouldn't be too far off. Perhaps one
  36. day I'll hack the compiler to do the stats for me.
  37. --
  38.  
  39. Regards,    | "You're better off  not dreaming of  the things to come;
  40. Kers.       | Dreams  are always ending  far too soon." - Caravan.
  41.