Shiika is a programming language that makes me most productive.
- Easy to write like Ruby or Python
- Static type checking (Null safety!)
- Object-oriented but has enums and pattern-matching
- Written in Rust, compiles to single binary via LLVM IR
Most of the static typing languages, such as C++/Java/Scala/Go/Swift/Kotlin/Rust, etc. are designed for execution speed. However what I want a "lightweight" static typing language to make application faster.
- Easiness over performance
- Shiika is a glue language. Use Rust (or C, etc.) for performance-critical parts and load it as a library
- Easy to learn
- There may be more than one way to do it, but not too many.
Shiika has lots in common with Crystal. However:
- In Shiika, type annotation of method parameters are mandatory. This helps reading programs written by others
- Shiika has only one class
Intfor integers (cf.
- Shiika does not have union types. The type system is more similar to languages such as Rust, Java or Swift (this isn't good or bad; just a difference)
class A def fib(n: Int) -> Int if n < 3 1 else fib(n-1) + fib(n-2) end end end p A.new.fib(34)
examples/*.sk for more.
Early-alpha; capable of solving algorithmic problems like Advent of Code but a lot more stdlib is needed for practical application.
Features already implemented
- Classes, Modules, Enums
- Basic Generics
- Basic pattern-matching
- Anonymous function
- Core classes - Object, Array, String, Bool, Int, Float, Dict, Maybe, Class, Metaclass
See tests/sk/ and examples/ for more.
Features not yet implemented
- Something like Ruby's
- Type inference
- More stdlib like
See Issues for more.
- Syntax support for editors, especially Vim (yes I use Vim)
- Fix parser to trace location information
- i.e. add location to AST
- and HIR
- Then we can improve error message greatly
- and it can be used for LLVM debug info
- v0.1.0 - Type system POC
- v0.2.0 - Start writing with Rust
- v0.3.0 - Generics
- v0.4.0 - Anonymous function (lambda)
- v0.5.0 - Virtual methods
- v0.6.0 - Generic methods
- v0.6.0 - Enums, basic pattern matching
- v0.7.0 - Modules (like Ruby's
- v0.8.0 - More stdlib (File, etc)
- After v1.0.0
- Language enhancement
- Default arguments
- Keyword arguments passing
- Built-in library
- Bignum, etc
- Standard library?
- Http, etc?
- Package system
- Some meta-programming feature (but not AST macro, sorry lisp fans)
- Language enhancement
- Tested on Mac, Linux(Ubuntu) and Windows
- May not work on 32bit environment
$ cargo test
Only integration tests (test/sk/*.sk):
$ cargo test --test integration_test
Specific file under test/sk/ (eg. string.sk):
$ FILTER=string cargo test --test integration_test
With logging enabled
$ RUST_LOG='trace' cargo test
/Users/yhara/.cargo/registry/src/github.com-1ecc6299db9ec823/bdwgc-alloc-0.6.0/vendor/libatomic_ops/configure: line 4683: syntax error near unexpected token `disable-shared' /Users/yhara/.cargo/registry/src/github.com-1ecc6299db9ec823/bdwgc-alloc-0.6.0/vendor/libatomic_ops/configure: line 4683: `LT_INIT(disable-shared)'
brew install libtool