Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Langs and slangs #378

Closed
masak opened this issue Aug 21, 2018 · 0 comments
Closed

Langs and slangs #378

masak opened this issue Aug 21, 2018 · 0 comments

Comments

@masak
Copy link
Owner

masak commented Aug 21, 2018

I've had what I think is a conceptual breakthrough on slangs. Detailing it here.

Posit, for a moment, that there's not just slangs, but also "langs". I'd argue that this concept exists already, but didn't really have a separate name.

I see two main ways langs are different from slangs:

  1. In BASIC terms, a lang is a GOTO and a slang is a GOSUB. You expect to switch into a lang but not back. With a slang, you switch back at some point.

  2. A lang is "top-level" but a slang has an implicit — I don't have a good term for this yet — "outer environment", the lang or slang from which it was invoked.

Both langs and slangs have a thing in common — they are formed around grammars and the downstream processing into ASTs and fine-grained instructions. Functions, type declarations, and macros on the other hand extend an existing language out on its fringes. Langs and slangs start from a clean slate (though of course they can inherit from other langs and slangs if they want).

So, donkey-bridge explanation: a slang is "ok, let's open up a block of SQL here"; a lang is "it's time to be Prolog now".

Going to close this issue immediately as lacking a real observable. But I would like to see an implementation of the lang import idea, in some form. Even if it's faked at first.

@masak masak closed this as completed Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant