Skip to main content

Universal Block Opener

Pluto allows do to be used as a universal block opener, meaning it can be used instead of then and begin.

If Statement Example
pluto
local x = 3
if x == 3 do
print("x is 3!")
end
Class Statement Example
pluto
class Human do
function __construct(public name) end
function greet() print($"Hello, {self.name}!") end
end
new Human("John"):greet()
Enum Statement Example
pluto
enum Suit do
HEARTS,
DIAMONDS,
CLUBS,
SPADES
end
assert(HEARTS == 1)