The V Programming Language

Simple, fast, safe language created for developing Volt, soon available for everyone.

Open source release in June 2019. Early access since April 15.
Install V from source in 0.5 seconds
wget vlang.io/v.c && gcc -o v v.c
1.9k

Compile-time Reflection

Alex
Apr 15 · 3 min read
ollykel Apr 23 06:56
I love Go, but I've never liked the way runtime reflection is implemented. It's a huge cause of binary size bloat (info for every type has to be stored), and actually programming with the reflect package is a pain. Worst is that it's used by all the encoding packages in the standard library, so it's hard to avoid.

I like that you've essentially implemented compile-time reflection for JSON encoding. Will you offer any other tools for compile-time reflection? Could be useful for building encoders for other data formats.
medvednikov Apr 23 07:15
Good question.

Current implementation of JSON encoding by the compiler is temporary. Soon everybody will be able to generate code at compilation time with a very simple syntax.
medvednikov May 4 18:44
https://vlang.io/docs#codegen
Log in via GitHub to comment



Powered by vtalk, open-source blogging/forum software written in V