اختياري
Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.
Marks a named declaration slot (parameter or صنف field) as voluntary — the caller or provider may omit the value.
Aliases: optional, voluntary
Syntax: <type> <name> اختياري [= default | عوض default]
Category#
declaration
Related#
Examples#
radix/corpus/sponte/sponte.fab (canonical · keyword)#
Marks a named declaration slot (parameter or صنف field) as voluntary — the caller or provider may omit the value.
# =============================================================================
# اختياري — Marks a named declaration slot (parameter or صنف field) as voluntary — the caller or provider may omit the value.
# =============================================================================
#
# What this teaches:
# • Voluntary parameter syntax — using `اختياري` to mark function parameters or صنف fields as optional
# • Default values — combining `اختياري` with `vel` to provide fallbacks when the value is omitted
#
# Common mistakes:
# • confusing اختياري (optional parameter with a default) with ∪ نوع_لاشيء (nullable type) — اختياري marks omission, ∪ نوع_لاشيء marks absence
#
# See also: vel, نوع_لاشيء, ∪, دالة, صنف
# =============================================================================
# اختياري — optional parameter / field marker
#
# GRAMMAR:
# optionalMarker :← 'اختياري'
#
# EXPECTED OUTPUT:
# No بداية — declaration or test-runner surface only.
#
# BACKEND:
# declaration-only optional slots (whitelist: اختياري/sponte.fab). Cross-ref: optionalis/optionalis.fab.
#
fn greet(string اسم, string titulus optional) → string {
return اسم
}
fn paginate(int pagina optional coalesce 1) → string {
return "page"
}
class User {
var string name
var string email optional
}