Update 'Guidelines'
parent
ef24ff8031
commit
7228c0bf3d
@ -4,15 +4,15 @@ These are guidelines to follow when designing new language features, working on
|
||||
In some languages, certain syntactical or environmental features depend on the presence of a standard library. Even C does to an extent, with the `= { 0 }` intializer (it calls memset in the background). The ARF standard library will be fully optional, and decoupled from the language. Parts of the standard library should be decoupled from eachother as well. There must be some internal dependencies among them (for example, things like IO and memory management, as well as common interfaces and generics) but it should be as non-monolithic as possible.
|
||||
|
||||
# 1. Keep It Simple
|
||||
The language itself must be extremely simple. It shouldn't have a lot of concepts, and its syntax should be as clean and regular as possible. The user should not feel like they're always discovering some new feature or quirk about it.
|
||||
The language itself must be extremely simple. It shouldn't have a lot of concepts, and its syntax should be as clean and regular as possible. The user should not feel like they're always discovering some new feature or quirk with it.
|
||||
|
||||
# 2. ARF is Immutable
|
||||
Language features, and for the most part program structure, must be immutable. This means nothing like reflection, or operator overloading.
|
||||
|
||||
# 3. Static over Dynamic
|
||||
When solving a problem, or implementing a necessary abstraction, prefer a static solution over a dynamic one. This makes a program's flow easier to analyze and reason about. The compiler should not generate new functions or complex logic that the user has not written.
|
||||
When solving a problem, or implementing a necessary abstraction, prefer a static solution over a dynamic one. This makes a program easier to analyze and reason about.
|
||||
|
||||
# 4. Immutable by Default
|
||||
# 4. Data is Immutable by Default
|
||||
Data must be immutable by default. If the user wants to modify a value at some point, they must explicitly delclare the variable to be mutable.
|
||||
# 5. Manual Memory Management
|
||||
We can't have anything like a garbage collector, because that violates guideline 4. A borrow checker similar to rust's could be implemented, though.
|
||||
@ -22,3 +22,9 @@ When looking at any part of ARF syntax, it should be abundantly clear what it me
|
||||
|
||||
# 7. One line at a Time
|
||||
You've probably seen some gross java code that flies off the right side of the screen before. We are here to avoid that. The language's syntax should encourage writing code that flows vertically and not horizontally, with minimal nesting.
|
||||
|
||||
# 8. Compile to Object Files
|
||||
Each ARF module will compile to it's own object file. This method has its own strengths and weaknesses—and the language should be designed and implemented accordingly.
|
||||
|
||||
# 9. Be Utterly Transparent
|
||||
Do not generate new functions or complex logic that the user does not explicitly write. The underlying processes behind high level operations should be extremely obvious.
|
Reference in New Issue
Block a user