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

pub, opt-in or opt-out?

Alex
Apr 15 · 3 min read
rwgk Jul 2 18:12
With your current design making something pub requires effort. I believe this will cause more harm (lost productivity and agility) than good (prevent accidents). Fast-forward 5-10 years when V is mainstream. Many (casual/inexperienced) users will be too rushed to care about pub, creating a lot of friction and copy-pasted code down the road. Some users will be judicious but also opinionated, creating a long and heated discussions. Making pub the default and private an effort, on balance the community may win. When people see "private", they know the author really meant it; it's not that it's private just because they were too rushed to think about pub/private.
medvednikov Jul 4 15:53
Hi

All major languages have `private` by default. I think it's the better choice, just like with immutability by default.

Adding `pub` is not much work :)
rwgk Jul 9 19:18
No doubt about both.
My suggestion is about balance; see above. Could you say something about that?
Are you familiar with this research? https://sparq.stanford.edu/solutions/opt-out-policies-increase-organ-donation
Question: What balance do you want your community to guide into?
ntrel Jul 11 07:41
Accidentally exposing symbols in libraries means library implementations can never change without breaking user code. Public symbols should only be exposed in a conscious way. Adding pub and making a point release is much better.

One issue with retiring grouping for access and mutability attributes is that changing them presumably breaks the binary layout of fields (i.e. the ABI).
ntrel Jul 11 07:42
retiring -> requiring
medvednikov Jul 12 10:34
> One issue with retiring grouping for access and mutability attributes is that changing them presumably breaks the binary layout of fields (i.e. the ABI).

This is a good point.
rwgk Jul 16 09:22
> Accidentally exposing symbols in libraries means library implementations can never change without breaking user code.

C and Python leave many symbols out in the open. Very popular, long-term-successful languages, with many, and some huge, evolving libraries.
Log in via GitHub to comment



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