| README.md | fix link | |
NOTE: just thinking out loud here for now.
Ideas here derived from my prior work on Jevkalk, in particular the exercise of translating of SICP to Jevkalk while making up necessary features.
JevoScript
JevoScript is a conceptual programming language which has the following features:
- minimal syntax provided by Djevko or a similar variant or derivative of Jevko
- compiles to JavaScript with seamless interop
- is a thin syntactic and semantic layer over JavaScript
- compared to JavaScript, it is much more minimal and uniform
- there are no statements, only expressions (everything has a value)
- various language constructs are generalized (e.g. the
?/ifexpression) - it provides two very simple and generic mechanisms: Uniform Call Syntax and
.variable as an alternative to many specialized constructs
Uniform Call Syntax and the dot . variable
The language introduces the Uniform Call Syntax (UCS) and automatically assigns the value of the last evaluated expression to the . (dot) variable, which obviates the need for methods, pipeline operators, and various other specialized language constructs.
Under UCS, the following may be equivalent (not sure yet if all):
op[arg]
[arg].op[]
[arg].[op]
[arg].[`op`]
[arg] op[.]
[arg] op[[.]]
That is, only one function named op of one argument in scope is sufficient for all of these invocations to succeed. However, more specialized variants can also be defined that would be applied to some of these invocations with a higher precedence than others. Exact rules to be decided.
For example an .op function in scope would have a higher precedence in [arg].op[] than an op (without the leading dot) function.
Hello, world!
const[ [hello] fn[ log[`Hello, world!`] ] ]
hello[]
const hello = () => console.log("Hello, world!")
hello()