V (programming language): Difference between revisions

Content deleted Content added
m Updated references.
fix grammar
Line 37:
 
===Safety===
V has policies to facilitate memory-safety, speed, and secure code.<ref name="section"/><ref name="MUO">{{cite web |last1=Galuh |first1=Rosa |title=A Brief Introduction to the V Language |url=https://www.makeuseof.com/v-language-brief-introduction |website=MUO |date=8 August 2022 |access-date=8 August 2022}}</ref><ref name="HA">{{cite web |last1=Abbas |first1=Hazem |title=Introduction to V Language and Desktop App Development |url=https://medevel.com/v-desktop-app-tutorial/ |website=medevel |date=5 August 2024 |access-date=3 January 2025}}</ref> The language has various default features for greater program safety.<ref name="section"></ref><ref name="MUO"></ref><ref name="hackaday"/><ref name="Knott"/> It employs [[bounds checking]], to guard against out of bounds usage of variables. Option/result [[Type_system|types]] are used, where the option type ({{code|?}}) can be represented by {{code|none}} (among possible choices) and the result type ({{code|!}}) can handle any returned errors. To ensure greater safety, the checking of errors are mandatory in V. By default, among the following are [[immutable]]: variables, structs, and function arguments. This includes string values are immutable, so elements can not be mutated. Other protections, which are the default for the language, are: no usage of [[undefined value|undefined values]], no [[variable shadowing|shadowing of variables]], no usage of [[null pointer|null]] (unless code marked as unsafe), and no usage of [[global variable|global variables]] (unless enabled via flag).
 
=== Performance ===