भविष्य
Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.
Compatibility annotation for asynchronous posture.
Syntax: @ भविष्य
Category#
async
Related#
- futura
- annotation-sugar
Examples#
radix/corpus/annotation-sugar/futura-braced.fab (canonical · annotation)#
Braced canonical @ भविष्य unit marker.
@ future { }
fn f() → void {
return
}
main {
print "futura-braced"
}Expected output:
futura-braced
radix/corpus/futura/futura.fab (canonical · annotation)#
Compatibility annotation for asynchronous posture.
# =============================================================================
# भविष्य — Compatibility annotation for asynchronous posture
# =============================================================================
#
# What this teaches:
# • Preferred async posture — write `async` for a finite async function.
# • Compatibility annotation — `@ भविष्य` remains accepted and preserved as
# the legacy spelling for async posture.
# • Related keywords: संकेतक, रुको_स्थिर, रुको
#
# Common mistakes:
# • Calling an async function and forgetting to consume the वादा with
# `रुको_स्थिर`, `रुको_चर`, `रुको_लौटाओ`, or `रुको`.
#
# See also: संकेतक, रुको_स्थिर, रुको
# =============================================================================
# @ भविष्य — compatibility async function annotation
#
# @ भविष्य
# फलन नाम(…) → प्रकार { … }
#
# GRAMMAR:
# annotatedFunc :← '@' 'भविष्य' funcDecl
# callablePosture :← 'async'
#
# EXPECTED OUTPUT:
# none — Rust async runtime whitelist (compile-only in harness)
#
# BACKEND:
# Rust async runtime not linked in exempla harness (whitelist: भविष्य/futura.fab).
@ future { }
fn responde() → int {
return 42
}
async_main {
# रुको_स्थिर awaits the वादा and binds the resolved value
await_const int responsum ← responde()
print responsum
}Expected output:
42