A statically-typed programming language.
class A
def fib(n: Int) -> Int
if n < 3
1
else
fib(n-1) + fib(n-2)
end
end
end
A.new.fib(34)
Early-alpha
- Implement class method (eg.
Math.pow
) - Implement .new
- Local variables
-
break
- String
- Array
- Instance variables
- Blocks
- Constant
- Toplevel
- Namespaced (eg.
A::FOO
)
- Modules
- Enums
- ...
- lambda/function(block)
- Module (like Ruby's
Module
) - Enum
- Constants
- Check all ivars will be initialized (like Swift)
- ...
- Class method, instance method
- Basic generics
- Variable-length arguments
- Array literal
- Inheritance
class Pair<S, T>
def initialize(@a: S, @b: T)
end
def fst -> S; @a; end
def snd -> T; @b; end
end
Pair<Int, Bool>.new(1, true).fst
- Rust
- LLVM (
brew intall llvm@7
) - bdw-gc 7.6.0 (Currently the path is hardcorded in src/main.rs. PR welcome)
- Ruby (used to generate boiler-plate library definitions)
$ bundle install
$ rake build
$ rake test
$ ./build/debug/shiika run examples/fib.sk
MIT