Tech News
← Back to articles

Show HN: Bolt – A super-fast, statically-typed scripting language written in C

read original related products more articles

⚡ Bolt

A lightweight, lightning-fast, type-safe embeddable language for real-time applications.

import print , error , Error from core import abs , epsilon from math // The return type of safe_divide is inferred to be `Error | number` fn safe_divide ( a : number , b : number ) { if abs ( b ) < epsilon { return error ( "Cannot divide by zero!" ) } return a / b } match let result = safe_divide ( 10 , 5 ) { is Error { // The type of result is narrowed in this branch! print ( "Failed to divide:" , result . what ) } is number { print ( "The answer is" , result ) } }

Features

Lightning-fast performance, outperforming other languages in its class

Compact implementation, leaving a minimal impact on build size while remaining consise enough to browse.

Blazingly quick compilation, plow through code at over 500kloc/thread/second. That's 50'000 lines in the blink of an eye.

Ease of embedding, only a handful of lines to get going

Rich type system to catch errors before code is ran, with plenty of support for extending it from native code

Embed-first design, prioritizing inter-language performance and agility

... continue reading