Re: Java Circle

From: Daniel A. Koepke (
Date: 04/08/99

On Thu, 8 Apr 1999, George Greer wrote:

> I like the whitespace is ignored attitude. It allows people to have much
> more flexibility with their own "taste" in coding style.

Although that might not be terribly desirable, given that a mud is a
calloborative project and, from personal experience, a big problem is
always getting everyone to write readable code.

> >    for (i in character_list)
> >      if (!isnpc(i) && i.got_message < 10)
> >        send(i, "hello.\r\n")
> >        i.got_message++
> Neat idea, but what happens if people like 4 spaces, or tabs, or mix the
> two, or get it badly formatted from cut & paste, or etc..  Then people with
> variable-spaced font terminals may have words with you.

Tabs could be expanded to, by default, 8 spaces.  I suppose I can allow
that to be changed within a source file via a "#pragma" type thing.  Your
spacing doesn't need to be two, I just used that as an example.  I could
very well do:

  if (i !in character_list)
    if (isnpc(i))

The only time we'd have an error with this is if we indented a line
between the "if" and the "i.flags..." line, as that is between two
established levels.  Anyway, there's two ways to approach this type of
block formation.  I can make it so that once you establish a level, the
indentation must be the same throughout the file or function in order to
place something in that level:

  if (i !in character_list)
    if (isnpc(i))
    else if (i.flags.has(foobar))

which I prefer, or I can allow inconsistent spacing of new-levels, but
consistent spacing with blocks.  That is,

  if (i !in character_list)
    if (isnpc(i))
      log("set crafty flag on " +
    else if (i.flags.has(foobar))
                             log("set bar flag on " +

As for variable width fonts, I don't see the point.  Every space will be
the same in the font -- and I'm guessing a tab will just be represented by
a multitude of those spaces on the screen space, not by a pre-drawn "tab"
character.  The receiving badly formatted code argument is quite
legitimate, though, since there won't be a way to tell where a statement
truly belongs if there's no logical give-aways.


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST