shiika
shiika copied to clipboard
A statically-typed programming language
## Given ``` class A def foo?(x: Object) -> Bool true end def bar foo?(1) or foo?(2) end end ``` ## Result > Error: expected Colon but got Separator Seems...
## Example ```sk var x = fn(){ 1 } p x() + 1 x = fn(){ "a" } p x() + "b" ``` ## Result > Error: the argument `other'...
Shiika has special treatment for enum cases with no arguments such as `Maybe::None`. While `Some` evaluates to `#`, `None` evaluates to `#`, which is the only instance of the class...
To do this, syntax for including a module into enum is needed
 I got this error > ProgramError: cannot reassign to `right' (Hint: declare it with `var') but this program does not reassign to `right`.
`1 == true` passes type check due to the current definition of `Object#==`. Maybe there should be something like `self` type? (todo: study other languages) ``` class Object def ==(other:...
- https://llvm.org/docs/LangRef.html#llvm-sadd-with-overflow-intrinsics - https://github.com/rust-num/num-bigint
[gen_logical_and](https://github.com/shiika-lang/shiika/blob/c438bfb1575c9e8ebfd71aa7f1540712450ecde8/src/code_gen/gen_exprs.rs#L133) can be simplified using `and` instruction. https://llvm.org/docs/LangRef.html#and-instruction
Something like this ```rb class Shape; end class Circle : Shape; def initialize(@x: Int, @y: Int, @r: Int); end; end class Rect : Shape; def initialize(@x: Int, @y: Int, @x2:...