ID:785529
 
(See the best response by LordAndrew.)
Problem description: This isn't really a problem, I'm just curious about datums. I know what they are, but what good are they used for? All I ever use is mob/obj/turf/(sometimes)area, but some of my friends only use datums, or they use both. I don't really understand the point of datums .
I use them to keep track of quests. I also use them for stats (so I don't go Hp/MaxHp)
Best response
This old thread on the subject is pretty informative.
In the inheritance tree, we use an inheritance structure.

datum
atom
area
turf
movable
mob
obj

As datum is at the top of that list, anything we define to datum is inherited throughout the list.

As it is at the top level, it also doesn't have functions that the objects below it add in inheritance which are probably not needed, for say a database connector.

So really the two reasons are for inheriting it for your own object types (using parent_type or datum/mytype/...) and adding varibles/functions to everything that inherits datum.
Datums are handy for defining sets of very similar things, without having a bunch of lists or variables.

Basically, a datum is a neat, readable way of doing a 'list of lists of lists,' or some equally confusing construction.

So rather than doing something like;

var/list/Skills
and making Skills contain
CraftA, CraftB, CraftC, CraftD
Each of which is a list containing;
Level, Experience, StuffYouCanMake

You'd just make a datum, 'Skills,' which would have Level, Experience and list, StuffYouCanMake as variables. It would also own the 'MakeSomething()' procedure, for example.
Then Blacksmithing, or Mining or whatever just become instances of your datum, and inherit all the appropriate variables and procedures without needing them redefined extensively.
I made a little demo that I meant to finish and release on datums. It isn't complete yet, as I kinda forgot about it here. HOWEVER you can see a simple AI system I made using an /AI datum.

I believe you could be able to learn a little something from it, but it's basic. I didn't go into a whole lot of description. If you wanna take a look, click here to download it.
Thanks guys ! :D