Who is driving the B# Project?
I am Michel de Champlain. I am Chief Architect of DeepObjectKnowledge, a firm specializing in coaching and training for object and embedded systems technologies. We strive to help the industry make better software design and architectural decisions.
The B# Project (pronounced "Be-Sharp") is my own work of passion and one that I share with my colleagues, Vincent Boisclair, Brian Patrick, and Claude Durocher. It is also the biggest and most ambitious solo project that I have ever taken on. It is not market-driven, not related to the .NET platform, and not my full-time occupation. But it is something to which I have devoted many years and thousands of hours. And now, the language and its online toolset (compiler and virtual machine) are ready for beta release.
What is B#?
It is a minimalist, component-based, and multitasking language. B# mainly keeps C's syntax influence but focuses on simplicity, clarity, and portability features required for systems and embedded systems programming. It is an innovative modern language that strictly enforces software engineering principles and clean-code rules by issuing compiler errors and guidance when they are not respected. The B# compiler generates compact and position-independent code that runs on its own B# virtual machine.
Key features are: Components (object-based functions), architecture-independent, and portable simple types, bit selection and bit range accesses, uniform syntax to access device addressing registers, type-safe with handlers for callbacks, interrupt handlers, tasks, and no pointer manipulation.
Note: The # of B# has nothing to do with any Microsoft family of programming languages, such as C#, F#, Q#, etc. Its creator, Michel de Champlain, has no affiliation with Microsoft. He has always picked the name B# as a denotation of the musical note equivalent to C.
Example of a B# Program Structure and Components
An embedded systems B# program consists of one or more compilation units.
A compilation unit is a plain text file with a .b# extension that contain the source code of one or more
components. Each compilation unit requires at least one component definition.
Here is an example of a component which regroups a constant, types (device, array, and structure), variables, and one function:
$ A.b# - Typical first line comment representing the B# source file's name containing the component A definition.
component A() { $ Define a component A.
const u8 C = 5; $ Define a constant C of type u8 representing the literal unsigned 8-bits 5.
device D : u8 { $ Define a device D of type u8.
readwrite data = 0x25; $ Define a read/write data register at address 0x25 in the device D.
};
array R u8[4]; $ Define an array type R representing an array of 4 unsigned 8-bits (u8).
struct S { $ Define a structure type S.
i8 f; $ Define a field f in the S structure.
};
var u8 v; $ Define a variable v of integer type u8.
R r; $ Define a variable r of type R.
func F(u8 u) u8 { $ Define a function F returning an u8 value with a parameter u.
var u8 n; $ Define a local variable n of integer type u8.
putu8(u); $ Call the kernel predefined function 'putu8' to print a u8 value to standard output.
return v + u - n; $ Return the sum value of the expression 'v + u - n'.
} init { $ Define the function constructor.
n = C; $ Initialize the local variable n to constant C.
}
} init { $ Define the component constructor.
v = 3; $ Initialize the component variable v to 3.
r.f = v; $ Initialize the component variable r.f to v.
F(r.f); $ Call the function F passing the variable value of r.f.
}
Who is the B# project for?
The B# project is not for everyone. It is a journey to make things better — better design, better software architecture, better decoupling, and target independence. The B# project is intended for embedded systems professionals who believe in this journey, who want to update or improve their software engineering practices, and who look to gain a deeper understanding of how to build better embedded systems.
What is different about the B# compiler?
In addition to catching syntactic and semantic errors, the B# compiler also supports software engineering principles that reinforce and apply practical "clean architecture/code" rules. For example, to minimize dependencies, components (1) are restricted to a maximum granular size and (2) have no public access to I/O devices, variables, and interrupt functions. The B# compiler therefore provides software engineering support to build better components.
The Next Step in the B# Project: Beta Program
The first next step in the evolution of B# is a Beta Program to build an engaged B# community, a community of those who wish to learn, contribute, and offer constructive feedback on the language, its compiler, and virtual machine. We hope this community broadens the awareness of B# and brings together the collective expertise of its enthusiasts.
To be part of the B# Beta Release Program, you have to submit your candidature application as B# Beta Tester to our Chief Architect of the B# Team, Michel de Champlain. Make sure to read carefully the "call for B# Beta Testers" submission form (will be available shortly via the LinkedIn B# Language Group), and fullfill all the prerequisites and experience required for tackling the three goals. Selected candidates will have a private access to the B# Playground: an online toolset (compiler and VM).
B# Playground
For decades, programming language playgrounds, such as Rust, Swift, and Go, have emerged, allowing you to experiment with a new programming language before installing it locally, or where a compiler may not be available. A playground is a tool for experimenting with and exploring new programming language code through a web interface, allowing for the evaluation of its applicability in the specific domain of applications it aims to support.
The B# Playground provides an Azure web service that enables a developer to compile and run a B# program within a sandbox, returning the output. Simply put, it is a browser interface to a compiler, allowing you to experiment with the language. The B# Playground will be available to beta testers, paving the way for a public release to all early adopters.
Sincerely yours,Michel de Champlain, Ph.D.
Creator of the B# Langage and Chief Architect of the B# Team