alpaca-lang / alpaca

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

Automatic code formatter #99

Open lpil opened 7 years ago

lpil commented 7 years ago

One of the things I'm really enjoying about Elm is the official style guide and automatic code formatting tools. One can write code in any sloppy style, hit save, and then the formatter will rewrite the file in the correct style.

This allows us to avoid extra typing and removes all code style squabbling between developers! Hooray! It'd be great to have this for Alpaca.

I believe this is generally done by converting source code into AST, and then pretty-printing that back. We could leverage the compiler for the parsing/AST generation if there is a public function to do this in the compiler source code.

Cheers, Louis

j14159 commented 7 years ago

Thanks for filing this, definitely in the plans! It's come up a little on the mailing list and is actually next up on my list after v0.2.6 :)

lpil commented 7 years ago

I should join the mailing list :)

j14159 commented 7 years ago

Please do! And IRC! I'd like to be more transparent about the roadmap in my head to and make it easier for us all to collaborate (prompted initially by @lepoetemaudit) - the mailing list seemed like a good place to start that :)

lpil commented 7 years ago

Ah, I may have to reinstall the irc client. With Elixir, Erlang, Elm and the companies I've worked for all being on slack I've not used it in some time.

CrowdHailer commented 6 years ago

I found this issue and it made me smile. I would like to add a :+1: and :whale: