I just heard your talk at ICFP. You are using a s-expression syntax, and expressed interest in an "extensible syntax" your language could use. I'm of the opinion that, usually, an extensible syntax is not what you want, so for your consideration I would like to show you the approach I prefer to use in programming language design.
LES is a language* designed to feel extensible while having a fixed syntax. It is built on the syntax-agnostic and language-agnostic concept of Loyc trees.
A fixed syntax offers the following advantages relative to a extensible syntax:
Syntax highlighting can show structure in isolation, without access to referenced libraries or any other files. And similarly for structure editors.
There is no feedback between semantic analysis and the parser, which makes parsing of large projects embarrasingly parallel; all source files can be parsed simultaneously. It also makes parsing cacheable, e.g. a memory-resident compiler can cache the parsed version of all files to improve compilation speed, or a non-resident compiler can cache blittable data structures in files that represent source code.
LES has the following additional advantages/characteristics:
LES version 2 is a superset of JSON
Unlimited set of binary operators, unary operators and "superexpressions"
The parser is relatively simple, and therefore can be included in the language's standard library for use at runtime, enabling homoiconicity
LES parses to Loyc trees. Loyc trees are syntax-agnostic, so it offers "separation of concerns" between syntax and semantics. In principle this allows you to support additional syntaxes like Python, Java, etc., although the only parser I've written for a mainstream language that produces Loyc trees is for C# (Enhanced C#).
Less wheel reinvention: it is conventional to design a new syntax for every new language. It's easier if you don't.
* really a family of languages, as LES3 will replace LES2; I'm planning to split LES3 into multiple versions while sunsetting LES2. Also Enhanced C# (and its language-agnostic macro processor, LeMP) is based on the same Loyc trees as LES.
Let me know if this is an interesting concept to you (and if not, why not).
I just heard your talk at ICFP. You are using a s-expression syntax, and expressed interest in an "extensible syntax" your language could use. I'm of the opinion that, usually, an extensible syntax is not what you want, so for your consideration I would like to show you the approach I prefer to use in programming language design.
LES is a language* designed to feel extensible while having a fixed syntax. It is built on the syntax-agnostic and language-agnostic concept of Loyc trees.
A fixed syntax offers the following advantages relative to a extensible syntax:
LES has the following additional advantages/characteristics:
* really a family of languages, as LES3 will replace LES2; I'm planning to split LES3 into multiple versions while sunsetting LES2. Also Enhanced C# (and its language-agnostic macro processor, LeMP) is based on the same Loyc trees as LES.
Let me know if this is an interesting concept to you (and if not, why not).