a statically-typed programming language with powerful objective syntax
(stopped its development)
(argc, argv){
io = @import#c:stdio.h; // Import C header directly!
v1#mut = v2 = [
real: 10,
add: (val, self){
newv = self;
newv.real = self.real + val;
|> newv;
},
+: (rhs, self){ // Operator overload
|> self.:add(rhs.real);
},
];
v1.=add(1); // Object-oriented call
io.printf("v1.real => %d\n", v1.real);
io.printf("(v1+v2).real => %d\n", (v1+v2).real);
}
v1.real => 11
(v1+v2).real => 21
This project is heavily under development.
scopion has a serious problem around typesystem and currently impractical very much. This will be fixed in v0.0.4
- Intuitive
- Removal of 'global'
- Just right fusion of Functional and Object-oriented programming
- Referentially transparent function
- Powerful objective syntax
- Concise
- No reserved words
- Powerful type suggestion
- Fast
- Statically typed compiler
- Optimization and native code generation by LLVM
- C-friendly
- Directly use of C function
All features are listed in docs/Feature.md
- llvm, clang (v5.0.0~)
- libgc
- ctags
- macOS
- GNU/Linux
Only 64bit system is currently supported.
If you are in Ubuntu 17.04~, Debian stretch~, or macOS Sierra~, just paste this at a terminal prompt:
curl -fsSL https://scopion.coord-e.com/get | bash
docker pull coorde/scopion
docker run -it coorde/scopion /bin/bash
Now you can compile your scopion source
scopc prog.scc -o prog
usage: scopc [options] ... filename ...
-h, --help Print this help
-t[type], --type=[type] Specify the type of output
One of: asm, ast, ir, obj
-o[path], --output=[path] Specify the output path
Default: ./a.out
-a[triple], --arch=[triple] Specify the target triple
Default: native
-O[level], --optimize=[level] Set optimization level (0-3)
Default: 3
-V, --version Print version
filename File to compile
if there is no suitable prebuilt binary for your environment, you can build scopion from source.
- (Installation prerequirements)
- Boost (v1.62~)
- cmake (v3.7~)
git clone https://github.com/coord-e/scopion
cd scopion
git submodule update --init --recursive
mkdir build && cd $_
cmake .. -DCONFIG=RELEASE -DFORMAT_BEFORE_BUILD=OFF
make # build
sudo make install # install
This program is licensed by GPL v3. See COPYING
.