سكوني
Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.
Marks a class member as belonging to the type itself.
Syntax: سكوني <type> <name> [= <expression>]
Category#
type
Related#
Examples#
radix/corpus/generis/generis.fab (canonical · keyword)#
Marks a class member as belonging to the type itself.
# =============================================================================
# سكوني — Marks a class member as belonging to the type itself
# =============================================================================
#
# What this teaches:
# • Marks a class member as belonging to the type itself.
# • Related keywords: صنف, ego
#
# Common mistakes:
# • Accessing a `سكوني` field on an instance instead of the type — `سكوني` fields are static members accessed via the صنف name, not via `ego`.
#
# See also: صنف, ego
# =============================================================================
# سكوني marks a static صنف field (shared across instances)
#
# سكوني <type> <field> = <initium> -- class-level binding, not per-instance
#
# GRAMMAR:
# fieldDecl inside genusDecl :← 'سكوني'? type ident ('=' expr)?
#
# EXPECTED OUTPUT:
# ruber
#
# Instance field `اسم` is per-object; `سكوني ruber` would be accessed on the
# صنف type in full programs (here only instance fields are read).
class Color {
static string ruber = "#ff0000"
var string اسم = "ruber"
}
main {
const Color color ← Color {}
print color.nomen
}Expected output:
ruber