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.

as

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

Introduces an alias name.

Aliases: as

Syntax: <name> as <alias>

Category#

package

Examples#

radix/corpus/reference/keyword/ut/ut.fab (canonical · keyword)#

Introduces an alias name.

# =============================================================================
# as — Introduces an alias name.
# =============================================================================
#
# What this teaches:
#   • Parameter aliasing — `as` renames function parameters for clarity or disambiguation
#   • Import aliasing — also used in `import` contexts for renamed imports
#
# Common mistakes:
#   • confusing as (import or parameter alias) with sicut (comparison) or velut (pattern match)
#
# See also: from, args
# =============================================================================

# as — alias introducer
#
# GRAMMAR:
#   alias :← ident 'as' ident
#
# EXPECTED OUTPUT:
#   Scalar stdout smoke (see body).
#
# BACKEND:
#   Cross-ref: destructura/, import/, match/ (per-field as).
#

fn greet(string loc) → string {
    return loc
}

main {
    print greet("Roma")
}

Expected output:

Roma