← J3Script Web Studio

J3Script 0.9.1 alpha - Complete Language Reference

Complete 72-page PDF guide · 19-page bold/color-coded cheat sheet

This reference reflects the tested J3Script 0.9.1 compiler. Alpha is not the completed general-purpose release. HTML/CSS/SQL are special-purpose languages, and not every capability belongs to every executable target.

Seven exact language headers

HeaderResultNotes
HTML.htmlStatic pages
CSS.cssStylesheets
JavaScript.jsStandalone logic, event handlers
C.cOptional native executable
SQL.sqlMySQL/MariaDB statements
Python.pyStandalone by default; project app is explicit
PHP.phpStandalone by default; plugin/app/wordpress-app explicit

Python class example

New: Top-level classes, default fields, constructors without arguments, and methods with an implicit self. Tested in Python, JavaScript, PHP and C standalone targets.

Python Counter
    class Counter
        field value default 0
        to increase amount
            set self.value to self.value + amount
            give back self.value
    set counter to Counter()
    print counter.increase(5)
    print counter.increase(7)
    print counter.value

Output: 5, 12, 12. Fields must be declared. Methods must have a statically inferable receiver. Inheritance, method overriding and class support in database-app buttons are still missing.

Python / JavaScript async task example

New: start a user function and await its task handle. Currently supported only in standalone Python and JavaScript. C and PHP reject this syntax.

JavaScript Async Work
    to double number
        give back number * 2
    start double 8 into work
    await work into answer
    print answer

Output: 16. Python uses a bounded thread pool; JavaScript uses promises. Cancellation and guaranteed scheduling order are not implemented.

Variables, functions, and loops

Python
    to double n
        give back n * 2
    set numbers to [1, 2, 3]
    for each n in numbers
        print double(n)
    repeat 2 times
        print "Done"

Local package locking

Import modules within your project and pin exact local dependencies by SHA-256. The compiler verifies the hash before importing.

python -m j3c lock helpers@1.0.0 helpers.j3 --project .
Python
    use package "helpers@1.0.0"
    print double(8)

No automatic registry downloads, transitive solver, or package namespace support.

IDE functionality

Web Studio provides the actual browser compiler, live syntax coloring, autocomplete, multi-file editing, ZIP import/export, IndexedDB local project recovery, HTML preview, and a limited Run JS button that executes compiled JavaScript in a Web Worker. The runner is not a hardened untrusted-code sandbox; run only trusted code.

What is still unfinished?

Native classes in database-app logic; full class inheritance/interfaces/access control; portable async on C/PHP; cancellation; portable system/HTTP/file APIs; transitive packages; security certification; full graphical debugger; and live browser acceptance remain open.

The 72-page main PDF includes the earlier 0.9 baseline manual after the new 0.9.1 supplement; the supplement takes precedence wherever an older statement has changed.