Skip to main content


:o vlang looks... very very cool to me. I am surprised that it's more than 5 years old, since it seems to offer many things that I've been wanting from a programming language and periodically searching for without luck:

  • Sum types
  • interfaces/traits/similar
  • generics
  • Reasonably fast at runtime (roughly on par with e.g. Go, from what I can tell)
  • optional GC
  • cares about development time (e.g. compilation times are fast)
  • cares about various kinds of safety (not as much as Rust, more than Zig). I think there are some substantial tradeoffs here around what happens if you avoid using the GC, since I think there's no borrow checking; e.g. does the stdlib have types that grow and invalidate your references?
  • extremely good cross-platform support (cross-compile GUI libraries for ~any platform including mobile, except that you can only build for macOS from macOS)

Basically it seems like they've added the ~3 features whose lack has made Go unpleasant for me when I've tried to use it.

vlang.io/

in reply to Ben Weinstein-Raun

It does look exciting, but the memory management story makes me nervous: github.com/vlang/v/blob/master… . E.g. it sounds like the compiler makes automatic choices about whether to stack-allocate or heap-allocate in a way that could lead to surprising memory unsafety.
in reply to Ben Weinstein-Raun

Hmm, having done a bit more research (especially: justinas.org/the-bizarre-world…) I think I was too quick to assume that they actually know how to implement all of the things they're promising. Disappointing, since those are pretty great promises.
in reply to Ben Weinstein-Raun

Alas. Man, I would really like a slightly more ergonomic Go with algebraic data types and a bit more static typing. Maybe OCaml is actually pretty close?
in reply to Daniel Ziegler

Yeah, or even Haskell; I always crave traits/typeclasses/interfaces when they're not available.
in reply to Ben Weinstein-Raun

I think one of the key helpful things about my OCaml experience was learning about how much typeclass stuff can or can't be replaced with other mechanisms (e.g. making it convenient to locally control namespaces so that you can easily specify "I want X from module Y" instead of having it be type-driven).

It both lets you notice when you shouldn't (or at least needn't) be using ad-hoc polymorphism but also when you really do need it (e.g. OCaml I think would struggle to properly replicate Traversable and some other higher-order-polymorphism things).