Update 'Guidelines'
parent
f353b7d0e2
commit
1c8aaafb0c
@ -1,3 +1,5 @@
|
||||
# Introduction
|
||||
These are guidelines to follow when working on the compiler, or designing new language features.
|
||||
# 0. Decouple Standard Library
|
||||
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.
|
||||
|
||||
@ -15,8 +17,8 @@ Data must be immutable by default. If the user wants to modify a value at some p
|
||||
# 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.
|
||||
|
||||
# Zero Ambiguity
|
||||
# 6. Zero Ambiguity
|
||||
When looking at any part of ARF syntax, it should be abundantly clear what it means. A good rule of thumb is if its hard for the parser to reason about it, its hard for the user to reason about it too. Syntax should be thematically cohesive, but asymmetrical. Conceptually different things should *look* different.
|
||||
|
||||
# One line at a Time
|
||||
# 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.
|
||||
|
Reference in New Issue
Block a user