V 0.3 is out! #14895
Replies: 12 comments 24 replies
-
What a time to be alive |
Beta Was this translation helpful? Give feedback.
-
But wait, I thought they could for some time already. Edit: I think I got it - the list of updates is v0.3 compared to the initial release of the previous version, v0.24 |
Beta Was this translation helpful? Give feedback.
-
Damn!!! What an update! Absolutely brilliant!! Unrelated to this (and probably must have been asked many times): Thanks.. |
Beta Was this translation helpful? Give feedback.
-
Aggressively awaiting progress on volt, gitly, vinix, and many other tools written in V :D |
Beta Was this translation helpful? Give feedback.
-
Is the garbage collector here to stay? When can we expect some progress with |
Beta Was this translation helpful? Give feedback.
-
Will the go backend use go’s runtime, make v’s go keyword behave just like go’s? |
Beta Was this translation helpful? Give feedback.
-
Does the version 0.3 mean that the language specification is now almost finalized? |
Beta Was this translation helpful? Give feedback.
-
the key reason for V's survival is performance. |
Beta Was this translation helpful? Give feedback.
-
quite awesome, V is the most sane language created since C. Will be quite gratifying when we are done with our full transformation of our cloud platform ecosystem to be run and fully developed with V |
Beta Was this translation helpful? Give feedback.
-
...... Then came V. And it hit the exact right spot. A single universal language for all domains. From embedded systems to large enterprise systems spanning multiple, heterogeneous clouds. If what is claimed about language is all true, be ready to face a lot of attacks on this language. Huge companies and huge many people are heavily invested into competing ecosystems..... My suggestion: Best wishes... |
Beta Was this translation helpful? Give feedback.
-
Great work. Thank you very much! I am curious if there are plans to improve on the threading system. I am looking for a more functional approach with lots of threads started by the But even with this I am not too sure that this would be sufficient to develop multi parallel code in a style one would do in Erlang etc. I know you already stated that you are going to improve here but what are your thoughts and maybe your timeline? |
Beta Was this translation helpful? Give feedback.
-
I only dip into this repo every now again to check on progress, so I've missed the news. Can someone catch me up on why Option and Result have ceased to be the same type? That was one of the features that I liked! |
Beta Was this translation helpful? Give feedback.
-
V 0.3 is out!
5769 commits pushed to master, 1697 bugs closed since V 0.2.
It's been a while since the last major release, from now on we'll do major releases every ≈4 months.
v translate file.c
. (Demo video: Translating DOOM from C to V, building it in under a second and running it!)Option
andResult
are now separate types:?Foo
and!Foo
respectively. Old code will continue working for 1 year and will result in a warning/hint.m[bad_key] or { ... }
,if x := arr[key] { ... }
.ustring
has been replaced with[]rune
(works just like in Go).v self
). It eliminates unreachable branches and performs other simple optimizations and transformations.byte
has been renamed tou8
. Old code will continue working for 1 year and will result in a warning/hint.datatypes
module now hasHeap, Queue, Stack, BSTree, LinkedList
.[]int{init: it}
).>>>
and>>>=
have been added to V. (They work exactly like in Java.)-nofloat
option, which is useful for writing kernels and for embedded systems without an FPU (used in Vinix).unsafe
only (for example, for C interop).unsafe
.compress.gzip
.net
/net.http
/vweb
fixes (also used for the upcoming Gitly launch).net.http
headers are now enum fields instead of strings. This allows to avoid typos and offers autocomplete.rand
).[heap]
.regex
module.gg.draw_polygon_filled(), gg.draw_arc_empty()
etc)gg
.gg
.for in
now works with fixed arrays.vfmt
code when not invfmt
mode (by using-d vfmt
).#[index]
syntax for negative indexing (like in Python, but needs special syntax instead of being used by default).pub
).foo(bar()?)
).const x := opt() or {}
).sync
improvements includingsync.thread_id()
,sync.Once
..foo.o
) that can be used in existing C projects.-usecache
and-skip-unused
fixes, they are close to being on by default.term.ui
improvements, including multi byte/UTF-8 events.crypto
modules, includingcrypto.des, crypto.cipher, crypto.blowfish
.-d 4bytebool
) for compatibility with some C software.strconv
(pure V formatting module used in string interpolation) fixes and performance improvements.volatile
keyword."stringliteral".len
optimization (replaced by the actual number by the newtransform
pass).math
module.1_000_000
.strings.Builder
optimizations and new methods.-autofree
flag).v -b go -o file.go file.v
).isize
andusize
types, deprecatesize_t
in favor ofusize
.datatypes
anddatatypes.fsm
modules.compile_error
andcompile_warn
comptime functions.with a much cleaner and faster implementation. Previously libc's
sprintf
was used.
unused variable
warning. Assigning to a variable no longer marks it as used.vweb
now uses struct embedding:app.vweb.text('hello') => app.text('hello')
.const()
blocks:const x = 0
.>
,<
,!=
,==
,<=
and>=
operators.User{ ...u, name: 'new' }
to replace{ u | name: 'new' }
.byte.str()
has been fixed and works like all other numbers.byte.ascii_str()
has been added.for mut x is string {}
.[noinit]
struct attribute to disallow direct struct initialization withFoo{}
.[1, 2, 3]...
is now...[1, 2, 3]
enum
asint
and operations onenum
except==
and!=
are removed for strict type checking.[manualfree] fn f1(){}
and[manualfree] module m1
, for functions doing their own memory management.<
and>
operators for struct in.sort
method for arrays, i.e.arr.sort(a < b)
.+=
,-=
,*=
,/=
and%=
if the operators are defined.go
with a generic function:go test<string>(c, 'abcd')
.x := $embed_file('v.png') println(x.len) println(ptr_str(x.data()))
, for embedding files into binaries.left()
/right
were removed in favor of slicing syntax:str[..pos]
.from local variables.
__offsetof
for low level needs (works likeoffsetof
in C).$env('ENV_VAR')
.==
and<
operators and auto generate!=
,>
,<=
and>=
.dump(expr)
, i.e. tracing of both the location, name and value of an expressionfn sum(i ...int) int
=>a := [2,3,4] println(sum(a...))
Beta Was this translation helpful? Give feedback.
All reactions