Bosque 编程语言 Bosque 项目 Bosque 是一种新的编程语言、开发工具和运行时设计方法。它旨在为开发人员提供一个高效、可扩展的开发环境。
Bosque 编程语言 Bosque 项目 Bosque 是一种新的编程语言、开发工具和运行时设计方法。它旨在为开发人员提供一个高效、可扩展的开发环境。
Bosque is a new approach to programming languages, development tooling, and runtime design that is focused on supporting mechanization at scale and establishing a new standard for creating efficient and high-reliability software artifacts.
We are at a major milestone in the Bosque project -- our 2.0 release!
Since the first announcement about this project in 2019 we have been focused on a North-Star of eliminating extrinsic complexity from the software stack and engineering process. We are excited to announce that after a lot (and more than I expected) of experimentation and experience we are ready to stabilize the language and core platform for general use in the 2.0 release.
Our #1 priority is to work with the community to start deploying Bosque in the real-world and rapidly address any issues that arise. In addition we plan to invest in building out the ecosystem of tools, libraries, and integrations that will make Bosque a great platform for building high-quality software. This includes the entire gamut of ecosystems from table stakes like LSP support, formal-methods, and workflows for Agentic AI systems!
The current (approximate) roadmap for the Bosque project is broken down into a series of major components that are being developed in parallel + smaller but high-impact work items. These cover a range of complexity and required skills, from academic level publication results, through non-trivial software engineering lifts, and into smaller tasks that are good starter projects. If you are interested in one of these please find (or open) an issue for more detail.
The current work items are focused on the 2.0 release of the Bosque language and it actively in-progress:
The Bosque project is actively inviting contributors as we move from a research focused into a practically focused project! We want to make this a a great place to learn and contribute to the next era in programming languages, compilers, and runtime systems. Below are some topics that are open for contributions and where help is greatly appreciated, we are happy to help mentor and guide you through the process.
Functions and arguments:
public function sub2(x: Int, y: Int): Int {
return x - y;
}
sub2(4i, 2i) %% 2i
sub2(y=2i, x=3i) %% 1i
sub2(3i, 4.0f) %% type error -- defined on Int but given Float arg
sub2(3, 4) %% type error -- un-annotated numeric literals are not supported (for now)All positive check using rest parameters and lambda:
public function allPositive(...args: List): Bool {
return args.allOf(pred(x) => x >= 0i);
}
allPositive(1i, 3i, 4i) %% true
allPositive() %% true
allPositive(1i, 3i, -4i) %% falseSign (with blocks and assignment):
public function sign(x: Int): Int {
if(x == 0i) {
return 0i;
}
var y: Int;
if(x + 0i %% type error different numeric types
30n %% valid percentage
101n %% invariant error
function isFreezing(temp: Celsius): Bool {
return temp ;
}
isFreezing(5.0f) %% type error not a celsius number
isFreezing(5i) %% false
isFreezing(-5i) %% true
Flow and Explicit Type Inference:
function flowit(x: Option): Nat {
%%ITest for none as special
if(x)@none {
return 0n;
}
else {
%%ITest allows binder for $x to value of x (with type inference)
return $x + 10n;
}
}
flowit(none) %% 0n
flowit(some(5n)) %% 15n(Algebraic Data Types)++
…Validated Strings:
type Zipcode = CString of /[0-9]{5}('-'[0-9]{4})?/c;
type CSSPt = CString of /[0-9]+'pt'/c;
function is3pt(s1: CSSPt): Bool {
return s1.value === '3pt';
}
'1234' %% type error (does not match regex)
'3px' %% type error (does not match regex)
is3pt('12') %% type error not a CSSPt
is3pt('98052') %% type error not a CSSPt
is3pt('3pt') %% true
is3pt('4pt') %% falseIn progress documentation for the language and standard libraries are on the Language and Libraries doc pages respectively. Sample code snippets below provide a quick feel of the language and syntax.
Detailed Documentation, Tutorials, and Technical Information:
In order to install/build the project the following are needed:
npm install && npm testThe current way to work with Bosque source code is through the bosque compiler command line tool. After building this tool is available in the bin/src/cmd/ directory. It is currently very simple with one action which is to take all of the command line arguments and transpile them into C++ sources and a Makefile -- using the unique public function main(args) ... as the entrypoint and putting the results in the output folder cppout. This makefile defaults to a diagnostic build with no optimizations and but can also be built as an optimized build with the make BUILD=release option. The resulting executable 'app' is placed in the cppout folder.
node bin/src/cmd/bosque.js ...
make -f cppout/Makefile
./cppout/app 'arg1' 'arg2' ...Basic Visual Studio Code IDE support for the Bosque language (currently limited to syntax and brace highlighting) is available from this repo. The installation requires manually building and installing as a VSIX package.
This project welcomes community contributions.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ.
Code licensed under the MIT License.
暂无开放 Issues,或尚未同步最近议题。