Skip to content

V coding style coming from JS/Deno #21034

Discussion options

You must be logged in to vote

V doesn't recommend globals at all. While you can have them, they require both an extra keyword and a command line switch to enable them.

What you have will work fine, but V supports the idea of methods which can be used to modify struct values, so you don't have to pass the struct around to all the functions.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Brixy
Comment options

Answer selected by Brixy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants