Safe mode: Difference between revisions

No change in size ,  10 months ago
m
Text formatting.
(Created Nim answer.)
m (Text formatting.)
Line 118:
 
=={{header|Nim}}==
Nim doesn’t provide safe mode, but it make a distinction between safe and unsafe features. Safe features are those which cannot corrupt memory integrity while unsafe ones can.
which cannot corrupt memory integrity while unsafe ones can.
 
There is currently no restrictions for using unsafe features, but a programmer should be aware that they must be used with care.
used with care.
 
Here are some unsafe features:
 
* The ones dealing with raw memory and especially those using pointers. Note that Nim makes a difference between pointers which allow access to raw (untraced) memory and references which allow access to traced memory.
difference between pointers which allow access to raw (untraced) memory and references which allow access to
traced memory.
 
* Type casting which, contrary to type conversion, is a simple assignment of a new type without any conversion to make the value fully compatible with the new type.
conversion to make the value fully compatible with the new type.
 
* Using <code>cstring</code> variables as no index checking is performed when accessing an element.
256

edits