Простые объекты


# В io нет классов - только прототипы и объекты

Account := Object clone
Account balance := 0
Account deposit := method(amount,
    balance = balance + amount
)

account := Account clone
account deposit(10.00)
account balance println

# Более удобная нотация

Using := Object clone do (
    state := "Working"
    show := method(
        self state println
    )
)