Docs > Objects
Objects are the Sardonyx version of modules and namespaces. They are declared using the `object` keyword.
There are two types of objects. The first behaves like a class in other languages, and is declared like a function:
```
object Person(name, age) {
fn older() {
age + 1
}
}
```
Here we define a `Person` object. We can instantiate it with `new`:
```
person = new Person("John Doe", 69)
```
We can then access `person.name` and `person.age`, and also call `person.older()`.
The other type of object is declared without parameters:
```
object X {
y = 5
fn z() 6
}
```
Here we define a namespace-like object `X`. We cannot instantiate it, only access its properties: `X:y` and `X:z`.