Re: Non-Database Format
Gavin Lambert <[email protected]> Sat, 06 Dec 2003 17:09:42 +1300
| Newsgroups | gmane.comp.lang.moo.general |
|---|---|
| Organization | Mirality Systems |
| Message-ID | <5.1.1.6.0.20031206165117.01f37c78@localhost> |
At 22:35 2/12/2003 +0000, Luke-Jr wrote: > >What does everyone think MOO should use for storing programs when >it does not use a database (human readable)? My pick would be to do something Java-like (not that I'm a Java programmer): - one object per .moo file (perhaps a recommendation rather than enforced) - abandon object numbers for "precreated" objects (still use them for dynamically created ones, of course); use names instead. Perhaps just an ad-hoc $myfoo, like so: @create #-1 $myfoo @verb $myfoo:bla @prop $myfoo.baz "bob" etc. The @create line would create a new object and call it $myfoo, without the need to have an actual object #0 or #0.myfoo property. - Deciding which verb to execute first; well, you could do that like Java (specify it on the command line), or you could have some sort of manifest file which tells the engine which to run first, or just have inline code somewhere like you proposed. Not sure which of these approaches is cleaner. To be honest, though, I'm not entirely convinced of the point in MOO code without a backing database -- the database is part of the whole reason for existence of the system. Without it, there isn't really anything you can do with MOO code that you couldn't do better in some other language. Or did you just mean without a *persistent* database? Even so...... -- Gavin Lambert, Mirality Systems <http://www.mirality.co.nz/> ---- He who is flogged by fate and laughs the louder is a masochist. ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click