Skip to content

Pilang

v0.1.2 Feature

This release adds 3 notable features for engineering teams evaluating rollout.

✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

c javascript machine-learning mathematics neural neural-networks
+3 more
programming-language python tensors

Summary

AI summary

Updates Language, Highlights, and Documentation And Tests across a mixed release.

Full changelog

Pilang v0.1.2 Release Notes

Pilang v0.1.2 is a language-focused release with new syntax for cleaner data
flow, better control flow, richer iteration, and a much faster runtime. This
release also expands the standard library feel of built-in types with method
style calls and adds more tests and documentation around the language core.

Highlights

  • Added the => pipeline operator for readable left-to-right data transforms.
  • Added literal fill syntax such as [1, ..., 5], (1, ..., 5), and
    {1, ..., 5}.
  • Added switch statements with explicit conditions, block bodies, and _
    default cases.
  • Added multi-variable for loops for index/value and key/value iteration.
  • Improved runtime performance by roughly 2x on current benchmark workloads.
  • Expanded native method support for strings, lists, tuples, sets, and maps.

Language

Pipeline Operator

The new => operator passes the value on the left into the next function call,
making chained transformations easier to read:

let total = [1, 2, 3, 4] =>
    filter(x -> x % 2 == 0) =>
    map(x -> x * 2) =>
    reduce((a, b) -> a + b)

Pipeline stages can call functions directly, pass extra arguments, and chain
left to right.

Literal Fill

Lists, tuples, and sets now support integer fill expansion:

let values = [1, ..., 5]      // [1, 2, 3, 4, 5]
let down = (5, ..., 1)        // (5, 4, 3, 2, 1)
let unique = {1, ..., 5}

Fill works in both directions and can be mixed with other literal items.

Switch Statements

switch now supports condition cases and a _ default:

switch score {
    score >= 90:
        grade = "A"
    score >= 80:
        grade = "B"
    _:
        grade = "C"
}

Switch cases run the first matching condition and do not fall through.

Better For Loops

for loops can now bind one or two variables depending on the iterable:

for index, value in [10, 20, 30] {
    println(index, value)
}

for key, value in {name: "pi", version: "0.1.2"} {
    println(key, value)
}

This works across lists, tuples, ranges, strings, maps, and sets.

Spread, Slicing, And Destructuring

This release also improves core collection ergonomics:

  • Spread values into list literals, map literals, and function calls.
  • Slice lists with start:end:step, including negative indexes and reverse
    slices.
  • Assign into list slices.
  • Destructure list-shaped values with assignments like [a, b] = pair().

Standard Library And Built-ins

Native values are easier to work with using method-style calls:

"hello".upper()
[1, 2, 3].map(x -> x * 2)
("pi", "lang").join("-")
set([1, 2]).union(set([2, 3]))

This release adds or improves method aliases for common string, list, tuple,
and set operations while preserving normal function-call style.

Performance

The VM and runtime received performance work that makes current benchmark
workloads run roughly twice as fast as before. The benchmark suite was also
expanded so future releases can track runtime changes more reliably.

Documentation And Tests

  • Added documentation for pipeline syntax, switch statements, literal fill,
    iterators, native methods, and performance tips.
  • Expanded core tests for pipeline behavior, switch matching, literal fill,
    iterable for loops, native methods, slicing, spread, and destructuring.
  • Added release packaging scripts for building the project and producing
    versioned archives.

Upgrade Notes

This release is intended to be compatible with existing Pilang programs. The
new syntax is additive. If your code uses _ as a special case name inside a
switch, it now acts as the default branch marker there.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track Pilang

Get notified when new releases ship.

Sign up free

About Pilang

All releases →

Related context

Beta — feedback welcome: [email protected]