2 minutes 344 Words
0001-01-01 00:00
Features List
TYPES
- ADTs that use
@sum
keyword notenum
orunion
- Typeclasses / Traits
- Interfaces that are structurally typed
- Monads with Monad Trait
- Type constraints
- ADTs that use
OOP
@struct
value type, public fields, no constructor, no pointers / references@class
reference type, private fields, (de)constructor, pointers / reference types
OPTIMIZATIONS
- Data Oriented Design like
Zig
- explicit tail-recursion optimization
@rec
- Data Oriented Design like
structural interfaces like
Go
built-in testing (unit, ui, fuzzing, benchmark, E2E)
ML FEATURES
- optional partial function application
Haskell
- pattern matching with
@match
- optional partial function application
generics like
C#
structs and classes
File system based module system
MACROS
- language macros liku
Lisp
- comptime like
Zig
- language macros liku
SYNTAX
- series / range operator
1..10
- negative indices
array[-1]
- Auto semicolon insertion
- No extra parens
- no
<>
for generics. Use'T
syntax instead
- series / range operator
ITERATORS & LOOPS
- internal & external iterators like
Ruby
- non-local return (keyword, enum or possibly labels via Symbols?) like
Zig
- All-Purpose
@for
loops with series kinda likeZig
orGo
- internal & external iterators like
CONCURRENCY
- async with channels (multiple independent call stacks) like
Go
- async with channels (multiple independent call stacks) like
MEMORY MANAGEMENT
- locality for stack based memory like
Janestreet Ocaml
@local
and@global
keeps type system easy to use- Reference counting, Unique pointers like
C++
andRust
- Optional GC, tracing, generational and arena allocation
- custom allocators like
Zig
*Lifetimes won’t be types and they’ll all be inferred
- locality for stack based memory like
BUILD SYSTEM
- targets WASM & Zig
- FAST builds!
- WEB, Node + Express, WASI(X) and POSIX APIs
Noteable NON-FEATURES
- inheritance (later only single inheritance of
abstract
classes) - real classes /
new
keyword - so async / await all the way
- Borrower Checker
Non-local return
Using internal iterator Symbol. Like labeled-for in Zig but the label name can be passed.
/// array, fn -> void
@fn map array,func {
$outer: @for array.length, $item {
// pass current item
// AND the label for the for-loop
func($item, $outer)
}
}
array.map(fn(item,$label){
if item === null {
break $label
}
})
Generics
Real runtime Generics like C#.
C
public void reverse<T>(T[] collection){
// reverse
}
Si
Si doesn’t need the Generic Type parameter because it is assumed… is that possible?
/// []T -> void
@fn reverse:void collection:[]'T
// code
@
comments powered by Disqus