रेंडरिंगhi

स्वेच्छा

Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi 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

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
}