Nat def balance @balance end type :deposit, Nat, Nat def deposit(amount) @balance += amount end type :withdraw, Nat def withdraw(amount) @balance -= amount end end
Nat def balance @balance end type :deposit, Nat, Nat def deposit(amount) @balance += amount end type :withdraw, Nat def withdraw(amount) @balance -= amount end end
environment but still have to write JavaScript • With the browser (compile-to-JS): Get the wild west of the browser and still have to read JavaScript • WASM: Get the wild west of the browser, but get to write Ruby in all the places
Global Interpreter Lock) is a mutual-exclusion lock held by a thread • The GVL prevents any other thread from running while the thread holding it is executing • Not all Rubies have a GVL (CRuby does, JRuby does not)
by introducing gradual typing • Environment: There might be something to be gained by targeting WASM • Parallelism: There’s room in Ruby 3 for all kinds of new concurrency primitives