# datum

Source: https://ref.dm-lang.org/datum/

The datum object is the ancestor of all other data types in DM, with only a few exception called primitives. That means that the variables and procedures of /datum are inherited by almost all other types of objects.

When you define a new "top level" object, if you do not specify a parent_type, it defaults to /datum.

```dm
datum
   //definitions to be shared by all object types
   proc/DebugMe()
      world.log << "/datum properties:"
      world.log << "type: [type]"
      world.log << "parent_type: [parent_type]"
      return ..()

MyType
   var
      myvar = "test"
   DebugMe()
      world.log << "/MyType properties:"
      world.log << "myvar: [myvar]"
      return ..() //this calls /datum/proc/DebugMe()
```

## Primitives

Primitive types do not descend from /datum. These have no subtypes, and may or may not be able to allow var and proc overrides.

|            Type            | User-defined |                                         Can override                                          |                                      Notes                                      |
|----------------------------|--------------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
|      [/world](https://ref.dm-lang.org/world/index.md)      |  procs only  |                                        vars and procs                                         |                                                                                 |
|     [/client](https://ref.dm-lang.org/client/index.md)     |vars and procs|                                        vars and procs                                         |can manually set `parent_type=/datum`  <br/>can't be created in [new](https://ref.dm-lang.org/proc/new.md)|
|       [/list](https://ref.dm-lang.org/list/index.md)       |      \-      |                                              \-                                               |                                                                                 |
|   [/savefile](https://ref.dm-lang.org/savefile/index.md)   |      \-      |[byond_version](https://ref.dm-lang.org/savefile/var/byond_version.md)  <br/>[byond_build](https://ref.dm-lang.org/savefile/var/byond_build.md)|                                                                                 |
|[/alist](https://ref.dm-lang.org/list/associations.md)|      \-      |                                              \-                                               |                                                                                 |
|     [/pixloc](https://ref.dm-lang.org/pixloc/index.md)     |      \-      |                                              \-                                               |                                                                                 |
|     [/vector](https://ref.dm-lang.org/vector/index.md)     |      \-      |                                              \-                                               |                                                                                 |
|     [/callee](https://ref.dm-lang.org/pixloc/index.md)     |      \-      |                                              \-                                               |                     can't be created with [new](https://ref.dm-lang.org/proc/new.md)                      |

### See also
- [atom](https://ref.dm-lang.org/atom/index.md)
- [procs (datum)](https://ref.dm-lang.org/datum/proc/index.md)
- [vars (datum)](https://ref.dm-lang.org/datum/var/index.md)

## Pages

- [procs (datum)](https://ref.dm-lang.org/datum/proc/index.md)
- [vars (datum)](https://ref.dm-lang.org/datum/var/index.md)
