Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] (PR#6174) Loading transports
Home

[Freeciv-Dev] (PR#6174) Loading transports

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#6174) Loading transports
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 6 Mar 2004 13:39:04 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=6174 >

> [per - Fri Feb 27 23:20:16 2004]:
> 
> On Fri, 27 Feb 2004, Jason Short wrote:
> > Really? That seems not to be very explanatory, especially since these
> > are unit functions not tile functions.
> >
> > A shorter function name would be nice.But these functions are only
> > used in a few places so readibility is more important than writability.
> > If they're absolutely too long I'd suggest
> >
> >  can_unit_exist_at_tile
> >  can_unit_survive_at_tile
> >
> > although even this may lead to confusion (the unit CAN exist, just not
> > without a transporter...).
> 
> How about:
> 
> unit_tile_valid()
> unit_tile_valid_and_fuel()

I don't really like them.  They get rid of the is_ prefix that indicates
the boolean nature.  Also "valid" is an overused term that isn't very
clear (a "valid" tile is one that the unit can be on without being in a
transporter?).

Is your problem just that the original names are too long?  I've long
had problems with the overly short names that we generally use and
aren't at all descriptive.  Longer names can lead to less readible code,
but only if they're used a lot.  These functions aren't.  That said, I
don't care too much about function naming.  Until an overall design is
put in place that gives a consistent naming scheme, we should just try
to do the best we can.

jason



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6174) Loading transports, Jason Short <=