Jaql Programming Language: A New Contender in Memory-Safe Systems Programming

BigGo Editorial Team
Jaql Programming Language: A New Contender in Memory-Safe Systems Programming

In the ever-evolving landscape of programming languages, Jaql emerges as a new contender in the memory-safe systems programming space. However, community discussions reveal an interesting case of mistaken identity, as most commenters appear to be discussing Jakt, a different programming language associated with the SerenityOS project, rather than Jaql itself.

The Confusion Between Jaql and Jakt

The community discussion primarily centers around Jakt, a memory-safe systems programming language developed as part of the SerenityOS project. This confusion is understandable given the similarity in names and goals between the two languages. While the article describes Jaql as a memory-safe systems programming language with features like automatic reference counting and strong typing, the commenters discuss Jakt's development history, its relationship with SerenityOS, and its current status.

Current Status of Jakt Development

Based on community insights, Jakt appears to be in a dormant state. Several commenters note that development activity has significantly decreased, with one user pointing out the sparse commit history. The language was initially championed by Andreas Kling, the creator of SerenityOS, but development momentum seems to have shifted.

I watched some videos of Andreas working on Jakt some years ago but right now it seems kind of dead looking at the commit history.

This observation aligns with other comments suggesting that Andreas has moved on to focus on the Ladybird browser project, which has reportedly chosen Swift as its language of choice for future development rather than Jakt.

Swift as the Chosen Path for Ladybird

A significant portion of the discussion revolves around the decision by the Ladybird browser team (a project originally forked from SerenityOS's browser) to adopt Swift rather than Jakt or other alternatives. This decision appears to have been made through what one commenter described as a pragmatic process where team members implemented features in various candidate languages and ultimately found Swift most enjoyable to work with. The object-oriented programming model of Swift reportedly fits well with the architecture needs of a web browser.

However, some community members express surprise at this choice, particularly noting concerns about Swift's C++ interoperability challenges. One commenter points out that Swift requires Apple's fork of LLVM, potentially limiting compatibility with GNU or mainstream Clang environments.

Memory Safety and Language Design Philosophies

Returning to the actual subject of the article, Jaql shares the broader industry trend toward memory-safe systems programming languages. According to the article, Jaql incorporates features like compile-time checking, borrowing, lifetime tracking, and prevention of null pointer dereferences. These features align with the industry's growing emphasis on memory safety, also seen in languages like Rust.

The article details Jaql's approach to memory safety, including prevention of integer overflow, infinite loops, stack overflow, data races, and memory leaks in its Safe-Jaql mode. This focus on safety while maintaining systems programming capabilities reflects the ongoing industry shift toward safer alternatives to traditional languages like C and C++.

Jaql Key Features

  • Memory safety features:

    • Compile-time checking
    • Borrowing (tracing)
    • Lifetime tracking
    • No null pointer dereference
    • Integer overflow prevention
    • No infinite loops in Safe-Jaql
    • Stack overflow protection
    • No data races
    • No memory leaks (unless explicitly leaked)
  • Language design:

    • Distinction between mutable "class" types and immutable "data" types
    • Encourages small functions (2-3 lines maximum per method)
    • No side effects
    • Support for generics and higher-order functions
    • Type traits system
    • Operator overloading through traits
  • Implementation:

    • Initially implemented in Java for accessibility
    • Self-hosting compiler as a goal
    • Interoperability with C/C++

Language Features and Design Choices

Jaql's design includes interesting features like the distinction between mutable class types and immutable data types, similar to Swift's class/struct differentiation. The language encourages small functions with minimal side effects and provides standard functional libraries for data management.

The article also highlights Jaql's support for generics, higher-order functions, and type traits, allowing for flexible and type-safe programming patterns. These features position Jaql as a modern language that aims to balance safety, expressiveness, and performance.

In conclusion, while community discussion has largely focused on a different language (Jakt), the article itself presents Jaql as an ambitious project with a strong focus on memory safety and modern language features. As with many new programming languages, its success will likely depend on community adoption, continued development, and finding its niche in an increasingly crowded landscape of memory-safe systems programming languages.

Reference: The Jaql programming language