This one is up to date and it's definitely inconsistent, but I could not use ':' in place of '->' without creating an ambiguous grammar. Same for parenthesis in the return type since you can have a comma separated list:
It is not possible since you can create new integer types by sub-classing the primitive ones:
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.
Author here. I have written this language for many reasons but I won't detail here, I'll just say it's a lot of fun for me to design a language and write a compiler.
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.
Import functions is done the same way:
May be the doc is outdated.The multiple declaration is consistent with assignment:
The syntax is unusual compared to many other languages because it just use a simple syntax: The type is prefixed only to resolve literals: It can be useful in generic functions: But to create uninitialized variables I had to keep the syntax:reply