Null object: Difference between revisions
→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)"
No edit summary |
(→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)") |
||
Line 2,170:
</syntaxhighlight>
=={{header|V (Vlang)}}==
V (Vlang) does not have nor normally allow null or nil (also called "the billion dollar mistake"):
1) All primitive types/variables have default values.
Line 2,178:
3) Usage of voidptr or nil, only done in unsafe, and is usually only for the purposes of interoperability with other languages.
<syntaxhighlight lang="v (vlang)">
// Null or nil not used, default values for various primitive types/variables instead:
|