pub, opt-in or opt-out?
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.
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 :)
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?
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).
retiring -> requiring
> 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.
> 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
, open-source blogging/forum software written in V