natefaubion/adt.js

Clarify when should one use adt vs adt-simple

Closed this issue · 5 comments

Hi!

I am a little confused. There is no mention on adt-simple in the README, however they seem to be related, but different, with a feature set that is not a subset of the other. How should I choose which to use?
Thanks for your hard work!

adt.js is usable as a standalone runtime library. You can ignore the macros (the macros were basically a prototype for adt-simple). adt-simple is only meant to be used in conjunction with sweet.js, as all the data definitions expand to constructors you might write by hand. Additionally, every feature is always baked into every definition, whereas adt-simple has a way of opting into generic behavior.

Thanks! Makes sense. And given you have absolute freedom over given project (you are free to add build steps, have access to npm, etc...), which one you would choose? I understand this is a matter of personal taste as well, but still, answering this would further clarify intent.

I would use adt-simple. The biggest complexity is introducing something like sweet.js. If you don't care about that then there isn't a reason to not use it.

Cool!

Umm, I closed this 'issue', but I still suggest writing what you just said in the README, so that others will benefit from this perspective :)