Merge pull request #4 from birth-software/design-goals

Design decisions addition and fix typo
This commit is contained in:
David 2024-06-06 12:14:06 -06:00 committed by GitHub
commit b148be1e7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@ title: Nativity
Nativity is the language and compiler for Birth Software. Nativity is the language and compiler for Birth Software.
# Design goals # Design decisions and goals
Nativity is aimed to be reliable, fast and secure. It's designed with performance in mind. A few goals: Nativity is aimed to be reliable, fast and secure. It's designed with performance in mind. A few goals:
@ -16,6 +16,8 @@ Nativity is aimed to be reliable, fast and secure. It's designed with performanc
- Statically-linked binaries when possible. - Statically-linked binaries when possible.
- Allocation in the standard library is based on virtual memory based arenas. - Allocation in the standard library is based on virtual memory based arenas.
- 64-bit platform focus - 64-bit platform focus
- Types are not values
- Uniforming runtime and comptime evaluation is inherently slow. Specialized solutions must be proposed in order to guarantee efficiency.
# Initial constraints # Initial constraints
@ -73,7 +75,7 @@ fn [cc(.c)] main [export] () s32 {
// With pointers // With pointers
>pointer: ?*u32 = a.&; >pointer: ?*u32 = a.&;
if (?a) { if (?pointer) {
// Here the variable is shadowed, the attribute "non-null" is added to the backend to the pointer variable // Here the variable is shadowed, the attribute "non-null" is added to the backend to the pointer variable
} else { } else {
// Here the pointer is null // Here the pointer is null