Renderingen-US

Experimental through version 1. Version 0 was alpha. This is the first language release: the interface is relatively stable, not frozen. Nothing is promised stable until version 2.

unstable

Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.

Marks an interface method as planned but unavailable for a target.

Syntax: @ unstable [target] [reason]

Category#

annotation

Examples#

radix/corpus/reference/annotation/nondum/nondum-braced.fab (canonical · annotation)#

Braced canonical @ unstable availability record.

# =============================================================================
# unstable — Braced canonical @ unstable availability record.
# =============================================================================
#
# What this teaches:
#   • Unimplemented marker — `@ unstable` annotates a declaration as not yet
#     implemented for a specific backend target
#   • Braced annotation syntax — `@ unstable { target = rs, record = "…" }`
#     provides the target backend and a rationale string
#
# Common mistakes:
#   • using `@ unstable` on declarations that are actually implemented for the current target (SEM017)
#
# See also: unstable, annotation-sugar
# =============================================================================

interface tempus {
    @ unstable { target = rs, record = "timer handles are not implemented" }
    fn siste(int handle) → void
}

main {
    print "nondum-braced"
}

Expected output:

nondum-braced

radix/corpus/reference/annotation/nondum/nondum.fab (canonical · annotation)#

Marks an interface method as planned but unavailable for a target.

# =============================================================================
# unstable — Marks an interface method as planned but unavailable for a target.
# =============================================================================
#
# What this teaches:
#   • the `@unstable` annotation — marks interface methods as planned but not yet implemented for a target backend
#   • target-specific availability annotations with optional reason strings
#
# Common mistakes:
#   • Calling a method marked @ unstable — the compiler rejects calls to unstable methods for the current target (SEM017).
#
# See also: interface, @
# =============================================================================

# meta/nondum — planned-but-unavailable interface methods
#
# GRAMMAR:
#   interfaceMethod :← '@' 'unstable' target? stringLit
#
# EXPECTED OUTPUT:
#   unstable interface declared
#
# BACKEND:
#   Calls to @ unstable methods fail semantic check (SEM017); do not invoke here.

interface tempus {
    @ unstable { target = rs, record = "timer handles are not implemented yet" }
    fn siste(int handle) → void
}

main {
    print "nondum implendum declared"
}

Expected output:

nondum implendum declared

radix/corpus/reference/reject/nondum/nondum-call-reject.fab (supporting · reject)#

A function marked not yet for this target is declared but not callable.

# =============================================================================
# unstable — a call of a not-yet function is refused
# =============================================================================
#
# What this teaches:
#   • `@ unstable` without a target marks the declaration unavailable everywhere
#   • A signature-only `fn` under `@ unstable` is declared and exported, but any
#     use of it is refused
#
# Common mistakes:
#   • calling a declaration that is still pending for the current target (SEM017)
#
# See also: unstable, annotation-sugar
# =============================================================================

@ unstable "pending"
fn later(string t) → string

main {
    print later("x")
}

Expected: compilation rejects this example.