rfcs
rfcs copied to clipboard
RFCs for changes to V
Standardise the current functionality with pointers and references, and remove ambiguities. Created after a lengthy talk with @spytheman and @medvednikov in #compiler-and-vlib-dev.
### Describe the feature Extend build system with a `build.v` in the project to improve it and add steps to build project. It's inspiring from Zig lang (https://ziglang.org/documentation/master/#Zig-Build-System). This file...
I am very interested in lots of small languages and I wonder if companies can use them. Often with this language (open source) to share a library there is a...
```v mut i := (u16 | null)(78) i = (u16 | null)(49) // or i = u16(49) i = (u16 | null)(null) // or i = null // ?u16 is...
```v struct Sct { set: n int } s := Sct{n: 5} s.n = 7 // ok println(s.n) // error ```
`mut` can already be used to indicate that it will modify the object, just like in function arguments, with the difference that it is not required. Example: ```v mut a...
```v [a, b, c] := [1 2 3] ```
```v fn e(x int) !int { // implicitly any Error if x < 5 { return 8 } return error('greater than or equal 5') } fn n(x int) ?int {...
Wrapping Operations for Integers These operations have guaranteed wraparound semantics. Failing when the result cause overflow - +~ (wraparound addition) - -~ (wraparound subtraction) - *~ (wraparound negation) - /~...
```v match x, y { (2, 3, 7..12, >= 19) && (4, 6, 11.=15, < 0) {} (2, 3, 7..12, >= 19) || (4, 6, 11.=15, < 0) {} }...