银杏叶提取物治什么病| 女性排卵有什么症状或感觉| 腰椎间盘突出和膨出有什么区别| 鹅蛋脸适合戴什么眼镜| 藿香正气胶囊治什么病| 什么是肠易激综合征| 阿是什么意思| 失眠有什么办法解决| 50至60岁吃什么钙片好| 仪仗队是什么意思| 雪燕适合什么人吃| 吃饭老是噎着是什么原因| 舌系带挂什么科| 两个人在一起的意义是什么| 瑜伽是什么运动| 愚不可及是什么意思| 什么的知了| 闰月什么意思| 扁桃体炎吃什么药| 早上喝一杯温开水有什么好处| 手掌像什么| 普贤菩萨的坐骑是什么| ap手表是什么牌子| 舌头溃疡吃什么药最好| 精子像果冻是什么原因| ig是什么意思| 限行是什么意思| 三点水一个希读什么| 红糖的原料是什么| 静脉炎的症状是什么| 庸人自扰之是什么意思| 女人吃牛油果有什么好处| 先天性聋哑病属于什么遗传病| 修心是什么意思| 69年什么时候退休| 牙龈肿大是什么原因| 尿液粉红色是什么原因| 印第安老斑鸠什么意思| 营养性贫血是什么意思| 肠漏是什么| 所向披靡什么意思| 孕吐是什么原因造成的| 复三上坟是什么意思| 水泻拉肚子吃什么药| 静脉炎的症状是什么| 达泊西汀有什么副作用| 前胸后背出汗多是什么原因| 兵痞是什么意思| 精尽人亡什么意思| 不锈钢肥皂是什么原理| 宝宝吃益生菌有什么好处和坏处| 空腹血糖偏高是什么原因| 阿修罗道是什么意思| 吃什么长胎不长肉| 香港电话前面加什么| 甘油三酯查什么项目| 痛风可以吃什么肉类和蔬菜| 带状疱疹不能吃什么| 宫颈粘液栓是什么样的| 内科查什么| 官员出狱后靠什么生活| 羡慕不来是什么意思| 大便稀溏是什么意思| 牙龈起包是什么原因| 不劳而获是什么生肖| 日字五行属什么| 江西简称是什么| 子母环是什么形状图片| 狗尾续貂是什么意思| 西夏是什么民族| 梦见杀鸡是什么预兆| 世界上什么动物牙齿最多| 男人的精子对女人有什么好处| 豫州是现在的什么地方| 代谢慢是什么原因引起的| 积劳成疾的疾什么意思| 看舌头挂什么科| 企业hr是什么意思| 老是流眼泪是什么原因| 夜深人静是什么意思| 心急如焚是什么意思| 黄皮果什么味道| 10月21是什么星座| 一个王一个八念什么| 普洱茶有什么功效与作用| 1985年海中金命缺什么| 175是什么尺码| catl是什么意思| 神经官能症有什么症状表现| 梦见针是什么意思| 属相牛和什么属相配| 人中短代表什么| 双性人是什么意思| 顺利是什么意思| 吃桑葚对身体有什么好处| 壑是什么字| 午饭吃什么| 老佛爷是什么意思| 辟谷期间可以吃什么| 检查肠胃挂什么科| 舌头白苔厚是什么原因| 牙根发黑是什么原因| 肠鸣是什么原因| 喉咙不舒服吃什么水果好| 2021属什么| 彩色多普勒超声检查是什么| 人间蒸发是什么意思| 抖腿有什么好处| 喝鲜羊奶有什么好处和坏处| 4个火念什么| 用淘米水洗脸有什么好处| 口坐念什么| 舌头短的人意味着什么| dob值阳性是什么意思| 淋症是什么意思| 马铃薯什么时候传入中国| 为什么兔子的眼睛是红色的| 人为什么要吃盐| 预判是什么意思| 我国的国球是什么球| 结婚登记需要什么| oa是什么意思| 百雀羚属于什么档次| 白芍的功效与作用是什么| 肝脏低回声意味着什么| 杭州什么宽带好又便宜| 凉粉是什么材料做的| 心跳过速是什么原因| 隆科多为什么不姓佟| 便秘吃什么药见效快| 动物奶油是什么做的| 肾虚去医院挂什么科| 上司是什么意思| hpu是什么意思| 哈尼是什么意思| 重症肌无力是什么病| 观落阴是什么意思| 1007是什么星座| 左侧卵巢囊肿是什么原因引起的| 无奇不有是什么意思| 三点水加累读什么| 彩棉是什么面料| 出球小动脉流什么血| 1999年发生了什么事| 泰安有什么大学| 梦见衣服是什么意思| 中的五行属性是什么| 缺锌有什么表现和症状| 大姨妈来了吃什么对身体好| 仓鼠为什么喜欢跑轮| cdg是什么牌子| 血脂稠喝什么茶效果好| 白细胞数目偏高是什么意思| 庶母是什么意思| 猫对什么颜色感兴趣| 四时感冒什么意思| 火龙果有什么好处| 左后脑勺疼是什么原因| 玉屏风颗粒治什么病| 昆明有什么特产| 皮肤是什么组织| 两班倒是什么意思| 什么情况下吃丹参滴丸| 若无其事的若是什么意思| 脚气应该挂什么科| 什么是阳痿| 抑郁症看什么科| 什么东西补气血| 自相矛盾的道理是什么| diptyque属于什么档次| loho眼镜属于什么档次| 苎麻是什么| 乳头是什么| 纹身有什么危害| sm是什么| 肺气肿吃什么药| lgbtq是什么意思| 绿是什么| 四月初七是什么星座| 养殖什么最赚钱| 吃什么肝脏排毒| 血红蛋白浓度偏高是什么原因| 先兆临产是什么意思| 产复欣颗粒什么时候吃| 下午三点是什么时辰| 上火吃什么食物| 食伤泄秀是什么意思| 未免是什么意思| 早上起来口苦是什么原因| 风景旧曾谙是什么意思| 杀鸡吓什么| 婴儿奶粉过敏有什么症状| 人体最大器官是什么| 中央候补委员是什么级别| 丙氨酸氨基转移酶高吃什么药| 割痔疮后吃什么恢复快| 皮肤糖化是什么意思| 肾结石喝酒有什么影响| 木薯粉是什么| 慢性活动性胃炎是什么意思| 泼皮是什么意思| 鸽子咳嗽吃什么药最好| 八一建军节是什么节日| 仰仗是什么意思| 雷人是什么意思啊| 头发没有光泽是什么原因| 全身酸痛吃什么药| 月牙是什么| 口腔溃疡挂什么科| 水中加什么擦玻璃干净| 红旗代表什么生肖| 嘎哈是什么意思| 漂流需要带什么| 偏头痛挂什么科| 月经不调是什么意思| 眼睛模糊什么原因| 什么的海风| 唱歌有什么好处| 肾阳虚吃什么中成药| 烧高香是什么意思| 怀孕一个月吃什么对宝宝发育好| 官运是什么意思| 小名是什么意思| 尿道感染是什么原因引起的| 芭乐什么味道| 霍乱时期的爱情讲的是什么| 什么的形象| 星期六打喷嚏代表什么| 检查hpv挂什么科| 乳腺4a是什么意思| 什么验孕棒准确率高| 突然戒烟对身体有什么影响| 报单什么意思| 平步青云什么意思| 什么人不能喝丹参| 体格检查是什么意思| 发现新大陆是什么意思| 八百里加急是什么意思| 豆包是什么| 什么是智齿牙| 苹果是什么季节的水果| 带状疱疹用什么药膏| 美国为什么叫鹰酱| 梦见别人死了是什么预兆| 口腔医学技术是干什么的| 狐臭看什么科| 哪吒的武器是什么| 颈椎反弓有什么症状| dx是什么意思| 1950年属虎的是什么命| 老汉推车是什么意思| 胃火牙疼吃什么药好| 硒对身体有什么好处| 湿气重吃什么药| 大便出血什么原因| 月球是地球的什么| 幽门螺旋杆菌阳性吃什么药| 不想说话是什么原因| 小腿痒是什么原因| 流动人口是什么意思| 胚芽是什么意思| 火腿是什么肉| 泡芙是什么| 牙周康又叫什么名字| 百度Jump to content

警惕网贷平台登记备案的过程中的“隐藏关卡”

From Wikipedia, the free encyclopedia
V
A capitalized letter V colored blue
The official V logo
ParadigmsMulti-paradigm: functional, imperative, structured, concurrent
Designed byAlexander Medvednikov[1]
First appeared20 June 2019; 6 years ago (2025-08-06)[2]
Stable release
0.4.11[3] Edit this on Wikidata / June 19, 2025; 39 days ago (June 19, 2025)
Typing disciplinestatic, strong, inferred
Memory managementoptional (automatic or manual)
Implementation languageV
Platformx86-64
OSLinux, macOS, Windows, FreeBSD, OpenBSD, NetBSD, DragonflyBSD, Solaris
LicenseMIT
Filename extensions.v, .vsh
Websitevlang.io
Influenced by
Go, Kotlin, Oberon, Python, Rust, Swift
百度 从某种意义上讲,城市学既是“城市系统学”又是“城市生命学”。

V, also known as vlang, is a statically typed, compiled programming language created by Alexander Medvednikov in early 2019.[4] It was inspired by Go, and other programming languages including Oberon, Swift, and Rust.[5][6][7] It is free and open-source software released under the MIT License, and currently in beta.[8]

The goals of V include ease of use, readability, and maintainability.[9][10][11]

History

[edit]

The new language was created as a result of frustration with existing languages being used for personal projects.[12] It was originally intended for personal use, but after being mentioned publicly and increasing interest, it was decided to make it public. V was initially created to develop a desktop messaging client named Volt.[6] On public release, the compiler was written in V, and could compile itself.[4][12] Key design goals in creating V were being easy to learn and use, higher readability, fast compiling, increased safety, efficient development, cross-platform usability, improved C interoperability, better error handling, modern features, and more maintainable software.[13][14][10][15]

V is released and developed through GitHub,[16][6] and maintained by developers and contributors internationally.[4] It is among the languages that have been listed on the TIOBE index.[17]

Veasel is the official mascot of the V programming language[18]

Features

[edit]

Safety

[edit]

V has policies to facilitate memory-safety, speed, and secure code,[13][19][6] including various default features for greater program safety.[7][13][12] It employs bounds checking, to guard against out of bounds use of variables. Option/result types are used, where the option data type (?) can be represented by none (among possible choices) and the result type (!) can handle any returned errors. To ensure greater safety, error checking is mandatory. By default, the following are immutable: variables, structs, and function arguments. This includes string values are immutable, so elements cannot be mutated. Other protections, which are the default for the language, are: no use of undefined values, variable shadowing, null pointers (unless marked as unsafe), or global variables (unless enabled via flag).

Performance

[edit]

V uses value types and string buffers to reduce memory allocations.[20][21][13] The language can be compiled to human-readable C,[7][4] and in terms of execution and compilation, it's considered to be as performant.[13][14][12]

Memory management

[edit]

V supports 4 memory management options:[22][6][12]

  1. Use of an optional garbage collection (GC), that can be disabled, for handling allocations, and is the default.
  2. Manual memory management via disabling the GC (-gc none).
  3. Autofree, which handles most objects via free call insertion, and then the remaining percentage is freed by GC (-autofree).
  4. Arena allocation (-prealloc).

Source code translators

[edit]

V supports a source-to-source compiler (transpiler) and can translate C code into V.[14][23][10]

Working translators are also being developed for Go, JavaScript, and WebAssembly.[24][25][4]

Syntax

[edit]

Hello world

[edit]

The "Hello, World!" program in V:[13]

fn main() {
	println("Hello, World!")
}

Variables

[edit]

Variables are immutable by default and are defined using := and a value. Use the mut reserved word (keyword) to make them mutable. Mutable variables can be assigned to using =:[26]

x := 1
mut y := 2
y = 3

Redeclaring a variable, whether in an inner scope or in the same scope, is not allowed:[26]

x := 1
{
    x := 3 // error: redefinition of x
}
x := 2 // error: redefinition of x

Structs

[edit]

Heap structs

[edit]

Methods

[edit]

Methods in V are functions defined with a receiver argument. The receiver appears in its own argument list between the fn keyword and the method name. Methods must be in the same module as the receiver type.

The is_registered method has a receiver of type User named u. The convention is not to use receiver names like self or this, but preferably a short name. For example:[9][10]

Error handling

[edit]

See also

[edit]

References

[edit]
  1. ^ "Creator of V". GitHub.
  2. ^ "First public release". GitHub. 20 June 2019.
  3. ^ "Release 0.4.11". 19 June 2025. Retrieved 20 June 2025.
  4. ^ a b c d e f Rao 2021.
  5. ^ Lewkowicz, Jakub (25 June 2019). "SD Times news digest: V language now open sourced". SD Times. SD Times. Retrieved 25 June 2019.
  6. ^ a b c d e James, Ben (23 July 2019). "The V Programming Language: Vain Or Virtuous?". Hackaday. Hackaday. Retrieved 23 July 2019.
  7. ^ a b c d e Umoren, Samuel. "Building a Web Server using Vlang". Section. Archived from the original on 13 March 2023. Retrieved 5 April 2021.
  8. ^ "The V Programming Language". vlang.io. Retrieved 4 November 2023.
  9. ^ a b c d Knott, Simon (27 June 2019). "An introduction to V". Retrieved 27 June 2019.
  10. ^ a b c d Nasufi, Erdet. "An introduction to V - the vlang". Debian Conference (DebConf). Retrieved 24 July 2022.
  11. ^ Sharma, Gaurav (19 March 2024). "Exploring the newest programming languages for developers in 2024". TechGig. TechGig.com.
  12. ^ a b c d e Chakraborty & Haldar 2023.
  13. ^ a b c d e f Galuh, Rosa (8 August 2022). "A Brief Introduction to the V Language". MakeUseOf (MUO). Valnet. Retrieved 8 August 2022.
  14. ^ a b c Choudhury, Ambika (9 February 2022). "Meet V, The New Statically Typed Programming Language Inspired By Go & Rust". Analytics India Magazine (AIM). Retrieved 7 July 2024.
  15. ^ "V language: simple like Go, small binary like Rust". TechRacho. Retrieved 3 March 2021.
  16. ^ "GitHub Programming Languages (repository details)" – via OSS Insight using TiDB.[permanent dead link]
  17. ^ "TIOBE Index". tiobe. TIOBE. Archived from the original on 11 April 2025. Retrieved 11 April 2025.
  18. ^ "V's official mascot". GitHub. Retrieved 8 November 2023.
  19. ^ Abbas, Hazem (5 August 2024). "Introduction to V Language and Desktop App Development". medevel. Retrieved 3 January 2025.
  20. ^ Rao 2021, p. 7.
  21. ^ "The V programming language is now open source". Packt Hub. Packt Publishing. 24 June 2019. Retrieved 24 June 2019.
  22. ^ a b Tsoukalos 2022.
  23. ^ Schlothauer, Sarah. "The trendy five: Blazing hot GitHub repos in June 2019". JAXenter. Archived from the original on 17 February 2020. Retrieved 1 July 2019.
  24. ^ "Convert Go to V with go2v". Zenn. 26 January 2023. Retrieved 26 January 2023.
  25. ^ "The V WebAssembly Compiler Backend". l-m. 26 February 2023. Archived from the original on 8 July 2024.
  26. ^ a b Rao 2021, pp. 28–40.

Further reading

[edit]
[edit]
十月二十七是什么星座 激情什么意思 相濡以沫是什么意思 眼睛发胀是什么原因 咖啡因是什么东西
眼睛出现重影是什么原因 现在什么年 什么叫语言障碍 喝什么解渴 幽门螺旋杆菌有什么危害
英红九号红茶什么档次 8月15日是什么星座 为什么手术服是绿色的 盆腔积液有什么症状 7月初7是什么日子
避孕药什么时候吃 梦见女鬼是什么意思 儿童尿路感染吃什么药 嘎嘎嘎是什么意思 spoRT是什么
夏雨什么hcv8jop1ns9r.cn 血尿是什么颜色的weuuu.com 扁平足为什么不能当兵hcv9jop1ns1r.cn 手心脚心出汗是什么原因hcv8jop0ns8r.cn lee是什么档次hcv8jop2ns0r.cn
室性早搏是什么原因引起的hcv9jop0ns2r.cn 凤凰男是什么意思hcv8jop5ns1r.cn 宝宝什么时候开始长牙hcv8jop2ns6r.cn 奶白色是什么颜色hcv9jop4ns9r.cn 分野是什么意思hcv8jop5ns9r.cn
乌黑乌黑的什么hcv9jop5ns7r.cn 双龙什么hcv9jop6ns9r.cn 梦见在天上飞是什么意思sscsqa.com hp是什么牌子的电脑huizhijixie.com 早泄是什么原因引起的luyiluode.com
偶数是什么hcv8jop4ns7r.cn 不care是什么意思hkuteam.com 脱发用什么药最好hcv8jop6ns5r.cn 肌张力高有什么表现hcv9jop6ns7r.cn 悬饮是什么意思520myf.com
百度