From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc04d99cf5e75f4e,start X-Google-Attributes: gid103376,public From: morphis@niuhep.physics.niu.edu Subject: [request for advice] Please read, I can't come up with a short subj. Date: 1996/07/16 Message-ID: <4sghhd$jha@corn.cso.niu.edu>#1/1 X-Deja-AN: 169161251 organization: NIU Physics Dept. reply-to: morphis@niuhep.physics.niu.edu newsgroups: comp.lang.ada Date: 1996-07-16T00:00:00+00:00 List-Id: Hi, Please bear with me, I will try to explain origin of the problem, the problem itself and my capabilities. I have on occasion fell prey to MUDs (Multi-User Dungeons). One telnets in and interacts with game and with other users. I have not been satisfied with either the accuracy or various details of the way these have been done. So I decided to write one myself. I hope to get a fairly well intergrated alpha in about 2 years. One of the details to be dealt with is how to deal with objects (chairs, tables, weapons, bodies, ...). They will be kept track of via object id #s. I want to enumerate their various properties (size, description, flamability...). These properties will sometimes be a number, sometimes text, sometimes a set of numbers. My problem is how to organize this in code. I am a system manager and have done a fair amount of programming. (maybe a few thousand lines of code total, mostly in DCL) I am not by any stretch of the imagination a hacker/guru/whatever. I have only the barest knowledge of object programming. I want to use this project to introduce myself to a few languages probably Ada, C, C++ and PL/1. (ok so maybe it will take me 5 years instead of 2...) object programing and to integrating different languages in a single program. (one reason for doing this is that I suspect I will have other people writing significant parts of the MUD and they may not be willing to learn ADA or whatever _I_ decide to write it in) At this embrionic stage I am looking for a reasonable naming convention to use that stands a decent chance of making it into production. The brute force method I would use would be to make a two dimensional array of characters : object(oid,ci)="text" where oid is the object id #, ci is the characteristic index # which is mapped to a particular characteristic. This is ok but keeping track of which ci number refered to length and which to mass would be a pain, not to mention having to parse through any characteristic that was an array. Several years ago in a pascal program I saw a construct something like: object.length(oid) object.mass(oid) ... I am completely ignorant of what this does. But it looks like an answer to my problem. Does ADA have such a construct? Does it have any advantage over naming variables: object_length(oid) object_mass(oid) ...? Any other ideas for a variable naming convention? Suggestions for good books on object programming? Other (printable-in-a-family-newspaper) suggestions? Thanks for any help you can give me. Robert Morphis@physics.niu.edu