28 karma · joined Feb 19, 2020 (6y ago) · 9 submissions
comment 3w ago · link · parent
class UserId: Int64
...
end
var user = UserId: 42
I also plan to replace predefined Int64, Int32, ... by generic types Int(64), Int(32), ... LLVM allows any integer size and Copper allows this kind of generic types.comment 3w ago · link · parent
Import functions is done the same way:
func foo(a: Int): Int
import func foo(Int): Int
May be the doc is outdated.The multiple declaration is consistent with assignment:
var w, h = 640, 480
w, h = 640, 680
w, h = getBoundingBox(obj)
The syntax var a = Int: 32
is unusual compared to many other languages because it just use a simple syntax: var id = expr
The type is prefixed only to resolve literals: var a = Int32: 42
var b = Uint8: 42
It can be useful in generic functions: println("The answer is \a", Float32: 42)
But to create uninitialized variables I had to keep the syntax: var id: Typecomment 3w ago · link · parent
This language is a playground where I constantly add and remove features or try various experiments, so I have no intention to promote it. The only reason I have published it is that I publish an open source text editor written with this language.
After twenty years of evolution, it starts to become stable but not yet, I had recently added some basic option types.
comment 1y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent