3 ms·
Ironically, this article got me interested in V.
by nurettin 6y ago
Ironically, this article got me interested in V.
- setr 6y agoIf I remember correctly, V had a lot of controversy because the author failed to clearly communicate between what was planned, and what was already done, and wrote as if it were feature-complete with blisteringly fast compile times when it was in fact fairly simple in its general capabilities. So.. perhaps be interested in it with a grain of salt.
- renox 6y agoAlso for non-optimised compilations, Zig devs are working on their own backend which should be much faster. That said, I don't know if I'm interested in Zig: I like comptime but passing around allocators doesn't seem pleasant I think I prefer Odin's 'context' concept.
- dnautics 6y agohonestly passing around allocators is only a thing to worry about if you're a library writer, if you're a library consumer, just make a global GP allocator for your program, and pass that in when you need it.
- deleted 6y ago[deleted]
- forgotpwd16 6y agoSupposing you got interested because of the speed it claims, comparisons on the site shouldn't be taken at face value. Fixing any errors* and for N=2 (2K prints), the times for some of the languages (running ten times and taking the average) are: C 0.24s (gcc 9.3.0, gcc $file) C++ 0.96s (gcc 9.3.0, g++ $file) Go 0.12s (go 1.15.2, go build $file) Nim 0.44s (nim 1.2.6, nim c $file) V 1.37s (v 0.1.29, v $file) Zig 16.9s (zig 0.6.0, zig build-exe $file) I guess Zig does some optimizations but not sure how to turn them off. Someone should do an analytical comparison for all of them and different values of N. *The generated V test doesn't work with the latest version as `;` between expressions throws a bad token error and zig requires `a` to be `.{a}`.
- nurettin 6y agoWhat I look for in a language (in no particular order): - Yes, fast compilation. - Generics, templates or a decent macro system - Defer, finally or scope based resource allocation - Some way of handling coroutines (async/await or channels) - Supports Linux AIX/x64, Win64, ARMv7/8, Darwin - Tooling for OSX, Android, Linux, Windows - Supports clojures, blocks or at least inline functions - Supports ranges, lazy iterations, generators or at least yield FPC actually comes close, except it doesn't have clojures coroutines or generics.
- TurboHaskal 6y agoIt's actually disappointing to see so many people looking for a cleaner C++ with faster compilation times, or a Go with generics and manual memory management, yet completely overlooking FPC.
- pjmlp 6y agoIt does have generics.