Language comparisons
Java
Java
int x = 1;
int y = 2;
ArrayList<Integer> myInts = new ArrayList<>();
myInts.add(x);
Koga
Int x 1;
Int y 2;
Ref<ArrayList<Int>> myInts new();
myInts add(x);
Javascript
Javascript
await ref.foo(...);
await ref.bar(...);
await ref.fooBar(...);
await Promise.all([
ref.foo(...),
ref.bar(...),
ref.fooBar(...)
]);
Koga
ref foo(...);
ref bar(...);
ref fooBar(...);
All {
ref foo(...);
ref bar(...);
ref fooBar(...);
}
C
C
typedef struct {
void* data;
...
} ContainerName
Koga
ContainerName<Usable T> {
Byte[size][T] data;
...
}
Go
Go
varFoo, err := GetFoo()
if err != nil {
return err
}
sliceBar, err := SliceTheBar(varFoo)
if err != nil {
return err
}
err := CheckBarSlice(sliceBar)
if err != nil {
return err
}
Koga
Try {
this getFoo(varFooPtr);
this sliceTheBar(sliceBarPtr, varFoo);
this checkBarSlice(sliceBar);
} {
Task fail();
};
Rust
Rust
⊘‡⋙⋲⋕
Ω±∞⋣⋇
‡∆⊝⋌
⋷⋸⋠⋆µ⋽
∫◊¶§ ∞
Ω±∞⋣⋇
‡∆⊝⋌
Koga
Int x 0;
x + 10 * 5 - 2;
ref fooBar(x);
Zig
Zig
foo(allocator: Allocator, ...) {
...
}
bar(allocator: Allocator, ...) {
...
}
foobar(allocator: Allocator, ...) {
...
}
Koga
foo(...) {
...
}
bar(...) {
...
}
foobar(...) {
...
}
Jai
Jai
Koga
Int x 0;
x + 10 * 5 - 2;
ref fooBar(x);