Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.5k
stars
2.15k
forks
source link
Allows annonymous struct type to be passed as args #21703
Describe the feature
Allows passing anonymous struct type where a method parameter requires a type
Use Case
For example the json decoding:
there's no need to create a named struct type if the decoding of this type only exists here
Proposed Solution
No response
Other Information
https://discord.com/channels/592103645835821068/700746775962714232/1252377577083895919
Acknowledgements
Version used
V 0.4.6 58f4e12
Environment details (OS name and version, etc.)
V full version: V 0.4.6 30d6f7b.58f4e12 OS: windows, Microsoft Windows 11 רҵ�� v22631 64 λ Processor: 12 cpus, 64bit, little endian,
getwd: xxx vexe: E:\Programs\v\v.exe vexe mtime: 2024-06-19 12:43:43
vroot: OK, value: E:\Programs\v VMODULES: OK, value: C:\Users\xxx.vmodules VTMP: OK, value: C:\Users\xxx\AppData\Local\Temp\v_0
Git version: git version 2.38.1.windows.1 Git vroot status: weekly.2023.24-2387-g58f4e126 .git/config present: true
CC version: Error: 'cc' is not recognized as an internal or external command, operable program or batch file.
thirdparty/tcc status: thirdparty-windows-amd64 a39eb79b