shiika
shiika copied to clipboard
A statically-typed programming language
I've not decided whether to allow `?` as method suffix (like Ruby) or not. If allowed, the method must return `Bool`.
``` class A; def initialize(@a: Int, @b: String); end; end p A.new(123, "foo") ``` Currently this prints `#`. It is nice if it prints `#`
eg. ```rb class A def self.foo [1,2,3].each do |i: Int| p i return if i %2 == 0 end p "unreachable" # this should not be printed end end ```
Allow this. ``` p [1,2,3] .select{|i: Int| i % 2 == 0} .map{|i: Int| i * 2} ```
``` ary = [1,2,3] p ary[ 0 ] ``` > unexpected token: Space
Many enums derives `Clone` but for some of them I cannot remember why they derive Clone.
- CI fail on Ubuntu https://github.com/yhara/shiika/pull/232/checks?check_run_id=1676197864 - On mac, it can be reproduced by renaming builtin/_tuple.sk to builtin/zz.sk > ProgramError: method MethodFirstname("fst") not found on ClassFullname("Pair") To fix this, `#initialize`...
This should be error because possibly Shiika won't support open class ``` class Array end ```
``` self.p 1 ``` > ParseError { location: Cursor { line: 817, col: 6, pos: 16719 } }: unexpected token: Space | 1