masak / alma

ALgoloid with MAcros -- a language with Algol-family syntax where macros take center stage
Artistic License 2.0
138 stars 15 forks source link

Also add a "core modules" section to the API reference #401

Open masak opened 6 years ago

masak commented 6 years ago

Because, as soon as we have modules/imports, and as soon as we have some kind of language-extending pragmas, they're going to be in modules, modules that we'll want to describe.

I think there might be around syntax-extending 20 modules to describe among the issues.

masak commented 5 years ago

I had some time to spare today, so I put together a list. I kinda like the result.

I've also marked in bold the ones needed for #324. Seems like a good place to start.

Operators

Terms

Methods

Statements

Parameters

Destructuring

Spreads

Functions

Arrays

Junctions (and each)

Loop control

Misc

masak commented 5 years ago

Oh, what the heck. Let's go all-out on this one.

The "cheating" referred to in #324 can be extended to all of the core modules in the list in this issue. Let's cheat everywhere in the short run.

This will have two advantages:

  1. 007 will (externally) have more of its true shape. We can write more idiomatic programs using the core modules. It's good early feedback.

  2. Even though it will increase technical debt considerably, it will also create a kind of "pressure" pushing us to do these modules natively, using pure 007.

masak commented 5 years ago

All of the above modules are fairly orthogonal (to the extent grammar-modifying modules ever are orthogonal), expect for syntax.stmt.modifier. Conceivably, you'd get "all" of the statement keywords as modifiers by importing this module. But "all" isn't well-defined in a language where the statement keywords form an open set! Uh-oh.

So, do we:

I feel the last one, if we can pull it off, is the nicest one. But it'd require some more design.

masak commented 5 years ago

Coming back to this issue, it's pretty clear there was a bit of a "pressure valve" being released here; the issue started out talking about just documenting all of our modules, but it's also helped along the way to bring into focus that 007 will have all these modules in the first place, and that much of the development focus will go into them.

https://github.com/masak/007/issues/401#issuecomment-465883705 is a course correction, but I want to make it clear that it's (way) out of scope of the issue itself, which is still about documenting the modules. Work-wise, I'd say this can happen any time after the completion of #385.

Adding the "currently-blocked" label to indicate that we're still waiting for #385.

masak commented 5 years ago

I think there might be around syntax-extending 20 modules to describe among the issues.

48, at last count.