Handbook
Glossary
initial-value ( class -- object ? )
Factor handbook
»
The language
»
Objects
»
Tuples
»
Tuple slot declarations
»
Initial values of slots
Vocabulary
slots
Inputs
class
an
object
Outputs
object
an
object
?
an
object
Definition
USING:
alien
arrays
byte-arrays
classes.algebra
combinators
kernel
math
quotations
sequences.private
strings
words
;
IN:
slots
:
initial-value
( class -- object ? )
{
{
[
dup
only-classoid?
]
[
dup
initial-value*
]
}
{
[
dup
"initial-value"
word-prop
]
[
dup
"initial-value"
word-prop
t
]
}
{
[
\
f
bootstrap-word
over
class<=
]
[
f
t
]
}
{
[
\
array-capacity
bootstrap-word
over
class<=
]
[
0
t
]
}
{
[
\
integer-array-capacity
bootstrap-word
over
class<=
]
[
0
t
]
}
{
[
bignum
bootstrap-word
over
class<=
]
[
0
>bignum
t
]
}
{
[
float
bootstrap-word
over
class<=
]
[
0.0
t
]
}
{
[
string
bootstrap-word
over
class<=
]
[
""
t
]
}
{
[
array
bootstrap-word
over
class<=
]
[
{
}
t
]
}
{
[
byte-array
bootstrap-word
over
class<=
]
[
B{
}
t
]
}
{
[
pinned-alien
bootstrap-word
over
class<=
]
[
<bad-alien>
t
]
}
{
[
quotation
bootstrap-word
over
class<=
]
[
[
]
t
]
}
[
dup
initial-value*
]
}
cond
nipd
;