You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -440,6 +440,31 @@ seems to be to flatten the generators:
440
440
441
441
# Comparisons to other packages
442
442
443
+
### Official Julia compiler
444
+
445
+
The official Julia compiler frontend lives in the Julia source tree. It's
446
+
mostly contained in just a few files:
447
+
* The parser in [src/julia-parser.scm](https://github.com/JuliaLang/julia/blob/9c4b75d7f63d01d12b67aaf7ce8bb4a078825b52/src/julia-parser.scm)
448
+
* Macro expansion in [src/ast.c](https://github.com/JuliaLang/julia/blob/9c4b75d7f63d01d12b67aaf7ce8bb4a078825b52/src/ast.c) and [src/macroexpand.scm](https://github.com/JuliaLang/julia/blob/9c4b75d7f63d01d12b67aaf7ce8bb4a078825b52/src/macroexpand.scm)
449
+
* Syntax lowering in [src/julia-syntax.scm](https://github.com/JuliaLang/julia/blob/9c4b75d7f63d01d12b67aaf7ce8bb4a078825b52/src/julia-syntax.scm)
450
+
* The flisp runtime and C extensions for Julia in [src/flisp](https://github.com/JuliaLang/julia/tree/master/src/flisp)
451
+
* Supporting utility functions in a few other `.scm` and `.c` files.
452
+
453
+
There's two issues with the official reference frontend which suggest a rewrite.
454
+
455
+
First, there's no support for precise source locations and the existing data
456
+
structures (bare flisp lists) can't easily be extended to add these. Fixing
457
+
this would require changes to nearly all of the code.
458
+
459
+
Second, it's written in flisp: an aestheically pleasing, minimal but obscure
460
+
implementation of Scheme. Learning Scheme is actually a good way to appreciate
461
+
some of Julia's design inspiration, but it's quite a barrier for developers of
462
+
Julia language tooling. (Flisp has no user-level documentation but non-schemers
463
+
can refer to the [Racket documentation](https://docs.racket-lang.org) which is
464
+
quite compatible for basic things.) In addition to the social factors, having
465
+
the embedded flisp interpreter and runtime with its own separate data
0 commit comments