Types

BrainRot Lang is dynamically typed — variable types are determined at runtime. There are seven built-in types.

Data Types

TypeBrainRotExampleNotes
IntegerINT4264-bit signed
FloatFLOAT3.1464-bit float
StringSTRING"hello"UTF-8, double-quoted
Booleanfr_fr / capfr_frtrue / false
Nilghostedghostedabsence of value
Array[...][1, 2, 3]dynamic, mixed types
Functionlet_him_cookfirst-class values
types.brt
let_him_cook main() { trust_me_bro i = 42 # INT trust_me_bro f = 3.14 # FLOAT trust_me_bro s = "hello" # STRING trust_me_bro b = fr_fr # BOOLEAN (true) trust_me_bro n = ghosted # NIL trust_me_bro arr = [1, 2, 3] # ARRAY say_my_name(i + 1) # 43 say_my_name(f * 2.0) # 6.28 say_my_name(s + "!") # hello! }

Type Coercion

BrainRot Lang does not do implicit type coercion. Adding an integer to a string will produce a runtime type error. Arithmetic between INT and FLOAT auto-promotes to FLOAT.

Arrays

Arrays are ordered collections created with bracket syntax. They support mixed types and integer indexing. Array bounds are checked at runtime.

arrays.brt
let_him_cook main() { trust_me_bro nums = [10, 20, 30, 40, 50] # Access elements by index say_my_name(nums[0]) # 10 say_my_name(nums[2]) # 30 # Arrays can hold mixed types trust_me_bro mixed = [1, "two", fr_fr, ghosted] say_my_name(mixed[1]) # two }