Skip to content

Commit d335c65

Browse files
committed
Add comparison to the Julia reference frontend
1 parent b1d1201 commit d335c65

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,31 @@ seems to be to flatten the generators:
440440

441441
# Comparisons to other packages
442442

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
466+
structures and FFI is complex and inefficient.
467+
443468
### JuliaParser.jl
444469

445470
[JuliaParser.jl](https://github.com/JuliaLang/JuliaParser.jl)

0 commit comments

Comments
 (0)