• TootSweet@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 hours ago

    To be honest, when I hear news of a language I’ve never heard of before, my reaction is usually “oh god, another language”. And to be fair, that is still largely how I feel about V. (There’s close to zero chance it’s going to gain widespread adoption, especially with being so similar to Go as it is. And I’m probably not going to start writing “real world” stuff in a language that’s going to die without ever receiving enough usage that libraries and such are going to be widely available for most use cases I can think of.)

    Buuuuuuut… also, being honest, I write a fair amount of Go because it like it. V is apparently very similar to Go, but also has some differences that mostly feel… pretty fuckin’ cool, actually. The one that made me salivate most is definitely “no null”.

    I will say a few feel gross to me. Specifically string interpolation, primitive types having methods, enums, and maybe centralized package manager. Oh, and I don’t like that there are compiler flags as implied by GC is optional, globals can be enabled for low-level applications like kernels, and development/debugging mode. (Compiler flags are for things like what architecture to cross-compile to and how much optimization to do and such. Not for enabling/disabling specific features in the language or changing behavior. Like, compiler flags shouldn’t change whether a given program compiles or how a program behaves.) And it’d be nice if there was no runtime at all.

    But a lot of what is listed there is pretty frickin’ cool too. Sum types, immutability by default, only one declaration style, and of course no null as I mentioned earlier are very good things, IMO. Those definitely make the language more appealing even than Go.

    Beyond that, given that the V folks seem very specifically to be trying to appeal to Go fans, I’m thinking there might be benefit if there was some nice way of interoperating with Go. (Or if there is such a way, it’d be nice if it was more prominently featured in the documentation.)

    (One final footnote. I said when I hear about a new language, I groan. That doesn’t apply to domain-specific languages for making things other than programs unless they’re in a niche that’s already occupied by something that’s already good and popular. OpenSCAD and Graphviz, for instance, are awesome things and we need more things like that for making stuff. Especially stuff that can’t otherwise reasonably be made without a GUI.)