burn

所属分类:编程语言基础
开发工具:Rust
文件大小:0KB
下载次数:0
上传日期:2014-09-11 00:27:47
上 传 者sh-1993
说明:  Burn是一种用Rust编写的编程语言。
(Burn is a programming language written in Rust.)

文件列表:
.travis.yml (284, 2014-09-10)
LICENSE.txt (96, 2014-09-10)
Makefile (1925, 2014-09-10)
modules/ (0, 2014-09-10)
modules/example/ (0, 2014-09-10)
modules/example/burn_module.json (116, 2014-09-10)
modules/example/src/ (0, 2014-09-10)
modules/example/src/example.burn (24, 2014-09-10)
src/ (0, 2014-09-10)
src/bin/ (0, 2014-09-10)
src/bin/burn.rs (5411, 2014-09-10)
src/doc/ (0, 2014-09-10)
src/doc/burn.sass (1463, 2014-09-10)
src/doc/reference.md (9629, 2014-09-10)
src/libburn/ (0, 2014-09-10)
src/libburn/api.rs (558, 2014-09-10)
src/libburn/builtin/ (0, 2014-09-10)
src/libburn/builtin/burn/ (0, 2014-09-10)
src/libburn/builtin/burn/errors.rs (1824, 2014-09-10)
src/libburn/builtin/burn/mod.rs (832, 2014-09-10)
src/libburn/builtin/burn/types.rs (2756, 2014-09-10)
src/libburn/lang/ (0, 2014-09-10)
src/libburn/lang/function.rs (2183, 2014-09-10)
src/libburn/lang/identifier.rs (1464, 2014-09-10)
src/libburn/lang/module.rs (6010, 2014-09-10)
src/libburn/lang/operations.rs (5928, 2014-09-10)
src/libburn/lang/origin.rs (948, 2014-09-10)
src/libburn/lang/special.rs (2068, 2014-09-10)
src/libburn/lang/type_.rs (435, 2014-09-10)
src/libburn/lang/value.rs (738, 2014-09-10)
src/libburn/lib.rs (1471, 2014-09-10)
src/libburn/mem/ (0, 2014-09-10)
src/libburn/mem/gc.rs (3576, 2014-09-10)
src/libburn/mem/raw.rs (857, 2014-09-10)
src/libburn/mem/rc.rs (1935, 2014-09-10)
src/libburn/parse/ (0, 2014-09-10)
src/libburn/parse/lexer.rs (13765, 2014-09-10)
src/libburn/parse/literal.rs (2049, 2014-09-10)
... ...

**UPDATE:** Work on burn is ongoing at [rainbow-alex/burn.js](http://www.github.com/rainbow-alex/burn.js). Burn intends to be a light-weight, general-purpose programming language. Here are some of its properties you're likely to know from existing languages: * Newlines separate statements. Curly braces are mandatory. * Block scoping. * Values have types, variables don't. Values are not implicitely coerced. * Functions are first-class values and can have free variables (lexical closure). * Object-oriented programming with multiple inheritance. Classes are first-class values too, and support lexical closure. * Memory is garbage-collected. * Concurrency is achieved through fibers. * It compiles to bytecode at runtime. This bytecode is (to some small degree) self-optimizing. Of course there's more to Burn than that. Here are some of the twists that really set Burn apart: **Typing** Burn's types are more like mathematical sets than the type systems you are probably familiar with. Think Venn diagrams rather than family trees. It has the usual types like `Integer` or `String`, but also `Positive` or `Empty`. There are a lot of types in the standard library, but you can create your own as well. Types are first-class values and can be combined and created ad hoc: ``` let $Real = Integer | Float let $NonEmptyString = String + not Empty let $HttpUrl = String.starting_with( "http://" ) let $CustomType = function( $value ) { return } ``` **Object capabilities** Burn follows an object-capability model. Capabilities are functions or objects that can do things with side-effects (e.g. read a file or print to stdout). All capabilities are given to the program entry point (i.e. `main`), and it is then responsible for passing them to other parts of the program. This is basically nothing more than language-enforced dependency injection. * You can, at any time, safely import a library or load a script. It can only have side-effects if and when you give it the required capabilities. * An untrusted Burn program can be run with reduced capabilities, or by lazily prompting them from the user. * You can safely embed Burn without cutting off access to third party libraries by simply giving it reduced capabilities. * Burn programs are probably more likely to be reusable and testable.

近期下载者

相关文件


收藏者