Yes.

Also some names - x and y - though short have become meaningful through 
conventional use. Consequently screenX and screenY would normally be understood 
as screen coordinates, meaning that distanceFromTheLeftEdgeOfTheScreen and 
distanceDownFromTheTopOfTheScreen are (thankfully) not typical.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
John Sturdy
Sent: 04 March 2005 11:39
To: Richard Bartlett
Cc: [email protected]
Subject: Re: PPIG discuss: About natural naming


OTOH, I think that some short names have come to influence what we
think of as natural, in particular
  i
  j
  k
as loop indices! I think that by now they have become more natural
than
  outer_loop_index
  middle_loop_index
  inner_loop_index
although I suppose calling something a "loop index" is not fully
informative... but taking as an example Warshall's algorithm (all pairs
connectivity / shortest paths)

  for i = 1 to n
    for j = 1 to n
      for k = 1 to n
        do
          if (a[i,j] & a[j,k])
             then
                a[i,k] = true;

what would it make sense to call them? In this example case, they
could be from_point_number, via_point_number, to_point_number ... but
is that how we think of them, or do we think of them as "counting loop
indices" ... in which case, perhaps we don't really think of them as
variables in the normal sense, but part of a stereotypical syntactical
construct?

__John
 
----------------------------------------------------------------------
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/

----------------------------------------------------------------------
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