alpaca-lang / alpaca

Functional programming inspired by ML for the Erlang VM
Other
1.44k stars 48 forks source link

Refactoring AST: remove Alpaca-native AST work #266

Closed j14159 closed 5 years ago

j14159 commented 5 years ago

As preparation for some more extensive work I'm refactoring the main Alpaca AST in alpaca_ast.hrl, removing all Alpaca-native AST work to date. This has two immediate benefits:

  1. Removes dependency on Alpaca itself, simplifying builds that cross OTP versions.
  2. (Enabling) a lot more consistency in some of Alpaca's internals.

As I get back into Alpaca's source and start thinking of larger features/functionality, the mixed-language AST has been quite cumbersome. On top of that, the existing Erlang implementation of the AST is terribly inconsistent. This PR is the first (messy) step towards a cleaner AST.

On removing Alpaca-native AST work: I'm starting to think that in at least the medium term, self-hosting is a nice-to-have, not a value-delivering feature. At worst, it biases Alpaca towards being a language for implementing itself.

More to come in the next week or two.