What don't you like about V / what would you like to be changed? #7610
Replies: 207 comments 838 replies
-
What i like:
What should be changed imho:
i hope i covered everything. otherwise i will extend this list. |
Beta Was this translation helpful? Give feedback.
-
@danieldaeschle's list is quite well, however I still have a few things to ask for For V itself:
For vlibThis portion could be done after 0.3 as no syntax changes are needed. Just wanted to see your opinion.
|
Beta Was this translation helpful? Give feedback.
-
I would request you to reconsider default function arguments. It has a lot of utility while avoiding code duplication. This will specially help as there is no function overloading. This will also make the standard library less bloated. |
Beta Was this translation helpful? Give feedback.
-
My very subjective ideas are: //A constants declaration
to be
//B << operator // C logical operators
to be
|
Beta Was this translation helpful? Give feedback.
-
Something like pythons |
Beta Was this translation helpful? Give feedback.
-
What are you thinking about chained comparison? |
Beta Was this translation helpful? Give feedback.
-
Why not initialize with simple = automatically at first appearance, instead of requiring := ? A thing that I find somewhat contradictory is to need types "after varname", except when using mut, which has to be "before varname". Why not let the types come before or after the var name, as a user choice rather than a required order? |
Beta Was this translation helpful? Give feedback.
-
hello all, really thanks for the excellent language! I am working on Linux kernel (with real-time extension: Preempt-RT or Xenomai )and driver development for hard real-time control system, so I hope V to be a "modern C", can 100% replace C in low level , the first layer over hardware. the missing part:*) Data structure alignment: support enforce data structure padding&packing&align manually. This feature is need due to hardware's register are fixed already, software need follow the hardware spec when define a struct/array for register set. Also need by cache line fits. https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Common-Type-Attributes.html#Common-Type-Attributes *) sperate API for creation of real threads and co-routine: real threads are needed by time critical code (e.g. hard realtime OS); co-routines are for non-realtime code. nice to have if possiable:*) stack size estimation at compile time: maybe with certain limits (e.g. don't allow variable logic arrays, disable recursion...), stack size can be estimation at compile time, avoiding stack overflow and gain good performance by avoiding dynamic stack size allocation (as Go's design); performance is important for hard real-time system (Preempt-RT Linux, Xenomai, Vxworks and other RTOS), latency/jitter is < 10us on a fine tuned x86_64 CPU, so they need avoid dynamic memory allocation in the realtime loop. various embedded system with small memory may also benefits. Thanks & best regards, fino/ |
Beta Was this translation helpful? Give feedback.
-
My personal list from what I've found playing around, beyond what I've seen above:
A bit more iffy:
|
Beta Was this translation helpful? Give feedback.
-
'Gated' arrays a:='0123456789'
assert a#[..20]=='0123456789' // true
assert a#[-20..]=='0123456789' // true
assert a#[-4..20]=='6789' // true
assert a#[20..]=='' // true, it never return an error, it return an empty array.
a[-4..20] ==> ERROR
a[20..] ==> ERROR // without gate symbol the behaviour will be the usually where the |
Beta Was this translation helpful? Give feedback.
-
Struct Memory Layout Struct A{
a int
b int
}
Struct B{
a f32
b int
}
v1 := A{b:1} // A b's displacement in memory is 4
v2 := B{b:1} // B b's displacement in memory is 4 This feature is needed to use V for low level in OS and system programming |
Beta Was this translation helpful? Give feedback.
-
It would be nice if you could do something like |
Beta Was this translation helpful? Give feedback.
-
[fixed]
mut arr := []int{ 2, 0 }
arr[0] = 4 // valid
arr << 4 // compile error |
Beta Was this translation helpful? Give feedback.
-
I know this might create a heated discussion, but I'd love to be allowed to use
. I know this is against the "one way to do things" philosophy and I completely understand that point of view and the reasons for not allowing this, but I think most people are used to doing it this way and probably all or most new V developers will run into this 'feature' of V. We're a team and just checking if V is for us, and all of us are annoyed by this behaviour. In our opinion it also makes sense to wrap a condition in brackets. By the way, why is this possible:
? The brackets aren't necessary - but they do improve readability. And I know cases where there will be an improvement to readability when you wrap one single condition in brackets as well. So I propose: Please allow brackets around conditions, even if they are not necessary. Thank you a lot for that nice language nevertheless! |
Beta Was this translation helpful? Give feedback.
-
Feature request: Overloadable array indexing numpy's If a struct could overload indexing, that would make great syntax for a version of Example syntax: voxels := ndarray([1,2,3,4,5,6,7,8,9], [3,3,3])
assert voxels[0,0,0] == 1
assert voxels[0,0,1] == 2
assert voxels[0,0,2] == 3
assert voxels[0,0,0..2] == [1,2,3] For serialization, you often need to support runtime editable strides/offsets, which limits the amount of compiler magic one can do. |
Beta Was this translation helpful? Give feedback.
-
not trolling but frustrated because been following vlang since 2019 and real life example production use is still not happening. we need 1. and 3. so more serious use can be done on it. a) e.g. gofiber, gnet, hertz golang, are some of the proj that drives golang dev. language wise, once major enterprise serious use-case scenarios are done, i'm sure large corp's "serious" advisor / serious dev / researcher can help bring this language to the next level. it's 0.4 now but i hope it stays below 1.0 for at least 3 years until someone strong in enterprise area can really help define the steps forward. i'm a golang dev extremely frustrated with the allocation of golang. hope vlang can be a rust replacement. |
Beta Was this translation helpful? Give feedback.
-
Vlang seems to be involved in all fields, but it is not perfect in any field. At least for now, it is just a toy. eg. HTTP currently does not support streaming sending and reading. There is too little support for encryption algorithms in the standard library, etc. Put the limited energy into important things. Otherwise, it may take another 10 years for vlang 1.0 to be released. Who will remember vlang by then? Refer to zig, which has not yet released 1.0, but already has a mature community and products. |
Beta Was this translation helpful? Give feedback.
-
Nothing
…On Tue, May 21, 2024, 10:51 AM Alexander Medvednikov < ***@***.***> wrote:
x.vweb which is now veb is built on top of pico.v
—
Reply to this email directly, view it on GitHub
<#7610 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHJW54ZOE765CXXUMDFF7TZDNUORAVCNFSM4VKY2OA2U5DIOJSWCZC7NNSXTOKENFZWG5LTONUW63SDN5WW2ZLOOQ5TSNJRGA2DKNY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
There are two ways to increment a number
Personally, I never liked the New here so maybe this has already been discussed? |
Beta Was this translation helpful? Give feedback.
-
Formatting request: Align multi-line struct initializers Current:
Desired:
or
|
Beta Was this translation helpful? Give feedback.
-
Another formatting request: Align Current
Desired
|
Beta Was this translation helpful? Give feedback.
-
Saw this in a twitter post and verified it in V repl
Is this expected behavior? |
Beta Was this translation helpful? Give feedback.
-
structural concurrency |
Beta Was this translation helpful? Give feedback.
-
This says it all:
|
Beta Was this translation helpful? Give feedback.
-
I landed in V world to cover the shortcomings of Go. I am a 'data scientist' professionally and explore many languages as alternatives to Python. I like the following feature of V which I miss in Go.
My opinion on the downsides are :
Though I decided not to use V for 'machine learning' library development due to it's complexities ( bugs or partially implemented features will improve over time), I feel V is nice language to work with. |
Beta Was this translation helpful? Give feedback.
-
For me the current show-stopper is the automatic download of tcc binary compiler when building from source. |
Beta Was this translation helpful? Give feedback.
-
I find fixed size array handling frustrating, e.g.
results in a compiler error of: "cannot assign to |
Beta Was this translation helpful? Give feedback.
-
I've just noticed that extended syntax in the documentation...that's great |
Beta Was this translation helpful? Give feedback.
-
idk but I'm always getting more and more interested in V... I always thought it a toy language for everyone's fun, but now at least it seems that it's a promising tool for me to do toy things. |
Beta Was this translation helpful? Give feedback.
-
Please add ROR/ROL circular shift (rotate) operators alongside left and right shift operators. As a bare-metal programmer, I find this very useful and the lack of these operators in C is a pain. In C you have to use different hacks, such as Inline asm or compilers intrinsics like __builtin_rotateleft8 for Clang or __rolb for GCC. These methods do not help to write portable code. Of course, you can write a function for this and pray that the compiler is smart enough to optimize rotate_left_8 in one instruction. Alternatively, you can always check the compiled code. However, it's not a solution. Therefore, the rotr and rotl were added to C++20. I think that in any reasonably low-level language like C, circular shift operators should be part of the language. Also, efficient implementation of bitwise operations is a necessary condition for writing performance code. |
Beta Was this translation helpful? Give feedback.
-
After
0.40.6, we'll be going for 1.0 right away, freezing the syntax, similar to what Go did.So if something has to be changed, now is the time to do it.
Please post your criticisms of V, there's a good chance that things you don't like will be fixed/improved.
Beta Was this translation helpful? Give feedback.
All reactions