MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
[MUD-Dev] Let's talk about numbers.
On 24 Sep 98, Adam Wiggins wrote:
> On Thu, 24 Sep 1998, Jon A. Lambert wrote:
> > > On Tue, Sep 22, 1998 at 10:13:04PM -0500, Vadim Tkachenko wrote:
> > > > Again, why limit yourself with numbers like 50? Why not 500? Why not
> > > > just X?
> > [snip]
> > It begs the question, "Is the fixed dimensional array evil?"
>
> No. But designing/implementing something without the slightest
> thought for how you (or someone else) would be able to extend it
> someday is, IMO, one of the greatest failings of modern programing,
> and programmers themselves.
I fully agree with you. Even about the arrays being not evil. But
let's keep that to ourselves. ;)
> Programming 101: don't put magic numbers into the code.
Aye.
> make them easily locatable constants somewhere at the top with a
> clearly identifiable name.
Even better, make them external to the program.
> But a good implementation won't care if it's 10 or 50 or 5000.
Yes. Flexibility is also lower maintenance. This is good.
Also a routine that make no assumptions about a piece of data will
be less error prone than one that does.
--
--/*\ Jon A. Lambert - TychoMUD Internet:jlsysinc#ix,netcom.com /*\--
--/*\ Mud Server Developer's Page <http://www.netcom.com/~jlsysinc> /*\--
--/*\ "Everything that deceives may be said to enchant" - Plato /*\--
- Thread context:
- [MUD-Dev] Re: Let's talk about numbers., (continued)
- [MUD-Dev] Re: Let's talk about numbers.,
Adam J. Thornton adam#phoenix,Princeton.EDU, Sat 26 Sep 1998, 03:31 GMT
- [MUD-Dev] Re: Let's talk about numbers.,
Caliban Tiresias Darklock caliban#darklock,com, Sat 26 Sep 1998, 04:18 GMT
- [MUD-Dev] Re: Let's talk about numbers.,
Adam J. Thornton adam#phoenix,Princeton.EDU, Sat 26 Sep 1998, 16:44 GMT
[MUD-Dev] Re: let's call it a spellcraft,
Adam Wiggins adam#angel,com, Thu 24 Sep 1998, 18:08 GMT
[MUD-Dev] Re: let's call it a spellcraft,
Brandon J. Rickman ashes#pc4,zennet.com, Thu 24 Sep 1998, 19:53 GMT
[ Other Periods
| Other mailing lists
| Search
]