authorchloe caruso <git@paperclover.net> 2024-10-28 23:50:52-07:00
committerchloe caruso <git@paperclover.net> 2024-10-28 23:50:52-07:00
log098fb8515e8ab883328562398778dd4960d752cf
tree736763169e81c643e22125a011c5b24064bd651b
parent2bcfa5e47db1ba080d7add7d2cd7a59e0e249bd1
signature Commit is signed but in an unrecognized format.

chore: begin design doc


1 files changed, 38 insertions(+), 0 deletions(-)

doc/design.md created+38
...@@ -0,0 +1,38 @@
1# Design
2
3The largest pain point of using other languages is that they are slow to
4compile, especially at scale. A core belief is that the less time a developer
5waits, the more productive they can be. The obvious solution for this is to
6reduce what happens during re-compilation, which is what Ix's incremental
7compilation model has been fundamentally designed for. Unlike with JavaScript,
8Ix starts on a fresh canvas that a perfect system can be built on.
9
10This document assumes one already read the language manual document, and will
11build on top of it to justify all of the design choices taken to provide an easy
12to use language with a performant compiler.
13
14## Motivations
15
16- How easy it is to write web applications with HTML, CSS, and JavaScript
17- Result location semantics, decl literals, and `comptime` from Zig being
18 productive tools that have led to more concise code.
19- Rust `enum`s and `match` being very powerful and expressive.
20- The desire for a compiler and LSP that never slows down, unlike `tsc`
21- The lack of exploration in how debugging applications can be made better
22
23## Garbage Collection and JavaScript as a compilation target
24
25Ix intentionally includes automatic memory management via garbage collected
26reference types. This was chosen as manual memory management is already explored
27and executed better in the Zig language than what Ix could achieve.
28
29## Macros
30
31Macros are unambiguously hard to read, write. By definition, they make all code
32harder to understand and maintain. Ix will never implement macros.
33
34## Configuration
35
36It is important that configuration is kept to a minimum. Teams shouldn't argue
37on linting and formatting rules, libraries shouldn't conflict due to flags, and
38code shouldn't look unfamiliar.