Page:
Permissions
Pages
Arguments
Body
Control Flow
Data
Enum Definitions
Error Handling
File Structure
Functions and Methods
General Syntax
Guidelines
Home
How to Parse
Identifiers
Interface Definitions
Metadata
Modules
Object Type Definitions
Permissions
Phrases
Return Direction
Style Guide
Tokens
Type Definitions
Type Specifiers
Variable Definition
1
Permissions
Sasha Koshka edited this page 2022-08-30 05:59:17 +00:00
ARF has a permissions system that functions similarly to public/private keywords in other languages, although the actual way in which it works is most simialr to Go. That is to say, permissions control how other modules can access a particular thing. Every entity defined in a module is "friends" with everything else, to put it in C++ terms.
ARF has three permission levels:
- pv: Private, other modules cannot even see the entity.
- ro: Read only, other modules can access the entiry but not alter it. In the context of methods, this means that other modules are forbidden from overriding the method if they define an object that inherits from the method's receiver.
- rw: Read and write, other modules will be able to access and alter the entity, or in the case of methods, override it.
As far as I know, the read only permission is a novel concept. It is designed to help cut back on the need for accessor functions in large codebases and libraries where data hiding can be important.
- Home Page
- List of Pages
- Guidelines
- Language Reference/Design Spec
- Compiler Design