A dynamically typed language built on top of a VM written in C#, exposing .NETs rich ecosystem of types and libraries The goal of Cb is to expose C#s rich libraries and type system to a quick-and-dirty scripting language without the need to set up Visual Studio projects for simple tasks such as data processing or cloud resource management.
Cb is a dynamically typed language with the types backed by C#s types, and isn't dissimilar to other dynamically typed languages like Javascript. The biggest difference would the be the .NET embeddable runtime, and future access to C# libraries.
fn WriteInt(n)
{
import "System.Console" as Console;
// calls C#'s Console.WriteLine, but within Cb
Console.WriteLine(n);
}
var x = 1 + (2 * 3) - 4 / 5;
WriteInt(x);
All of C#'s primitive types are available in Cb, but with a dynamic type system, they are exposed via literals
var money = 1.5m; // C#'s decimal type
var percentage = 0.6f; // C#'s float type
var iterations = 100000000L // C#'s long type
// etc..
Cb is still currently in development, C# types can be imported but the reflection facilities are not yet implemented.
✅ Lexer
❌ Parser
❌ Compiler
❌ Virtual Machine
❌ Access to C# types
❌ Calling C# functions