codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
$ mio mio 0.1.6.dev mio> Root ===> Object at 0x7f8e47fe6738: Core = Core at 0x1ccd2a8 Object = Object at 0x7f8e47fe6668 Root = Object at 0x7f8e47fe6738 Trait = Trait at 0x1ca8848 Traits = Traits at 0x1d85cf8 Types = Types at 0x1cc4f50 _ = Object at 0x7f8e47fe6738 builtins = Module(name='builtins', file='/home/prologic/work/mio/mio/lib/builtins.mio') mio> Trait ===> Trait at 0x1ca8848 mio> Traits ===> Traits at 0x1d85cf8: TCloneable = TCloneable at 0x1d89578 TComparable = TComparable(Trait) at 0x20bcde8 TIterable = TIterable(Trait) at 0x1ff0500 mio> Trait x = 1 TypeError: Traits cannot contain state! ---------- set(x, 1) mio> TFoo = Trait clone() ===> TFoo(Trait) at 0x24cb2a8 mio> TFoo foo = method(1) ===> method(): args = args() body = body() kwargs = kwargs() mio> TFoo ===> TFoo(Trait) at 0x24cb2a8: foo = method() mio> Root uses(TFoo) ===> Object at 0x7f8e47fe6738: Core = Core at 0x1ccd2a8 Object = Object at 0x7f8e47fe6668 Root = Object at 0x7f8e47fe6738 TFoo = TFoo(Trait) at 0x24cb2a8 Trait = Trait at 0x1ca8848 Traits = Traits at 0x1d85cf8 Types = Types at 0x1cc4f50 _ = Object at 0x7f8e47fe6738 builtins = Module(name='builtins', file='/home/prologic/work/mio/mio/lib/builtins.mio') mio> foo() ===> 1
Private
[
?
]
Run code
Submit