Re: Languages

From: George Greer (greerga@circlemud.org)
Date: 03/10/99


On Wed, 10 Mar 1999, Christian Loth wrote:

>In C style you would declare them all at the beginning...but that
>would also include the costs of constructions for your classes...
>...whereas if you declare them where you actually need them you
>only have those costs if you need those costs.

Class *foo;
....
foo = new Class;

Or better:

function
{
  vars
  do stuff
  if {
    more vars
  } else {
    more vars
  }
}

Little for() loop iterators I like because they're not supposed to hang
around or do anything important outside the loop (usually) yet you cannot
define them inside the {} of the for() loop.

--
George Greer            | CircleMUD Solutions
greerga@circlemud.org   | http://www.van.m-l.org/CircleMUD/


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



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