

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: SnekObjects
incomplete
2: Integer
incomplete
3: Float
incomplete
4: String
incomplete
5: Vector3
incomplete
6: Array
incomplete
7: Set
incomplete
8: Get
incomplete
9: Length
incomplete
10: Add
incomplete
This lesson's interactive features are locked, please to keep using them
Objects in C?!? No. Way.
However, Sneklang is built in C, and everything in Sneklang is an "object". To be clear, not a class or object-oriented programming object, but a higher-level data structure that holds some metadata about itself. For example, it will store:
That last point is critical! Because Sneklang is a garbage-collected language, we need to know how many references to an object exist so we can free it when it's no longer needed.
Complete the missing definitions in snekobject.h Here's a breakdown of all that this file should define: