Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export which makes everything else private #296

Open
gavr123456789 opened this issue Oct 28, 2024 · 1 comment
Open

Export which makes everything else private #296

gavr123456789 opened this issue Oct 28, 2024 · 1 comment

Comments

@gavr123456789
Copy link
Owner

// library.niva
type Library
    books: MutableList::Book // private
    amount: Int // public
    name: String // public

Library addBook: book::Book = 
  books add: book

Package export: [
    Library amount
    Library name
    Library addBook
]
@gavr123456789
Copy link
Owner Author

Or maybe just make a way not to generate getters and setters.

@privateGetters
type Library
    books: MutableList::Book // private
    amount: Int // public
    name: String // public

// wanna make name and amout public, so create getters
Library amount = abount
Library name = name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant