Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 1.58 KB

syntax.md

File metadata and controls

17 lines (13 loc) · 1.58 KB

Syntax

Lej's syntax is inspired by a few different sources, each of which is meant to make the language closer to natural language while carrying enough technical precision to be useful for programming. The main syntactic influences on Lej are:

  1. Semantic primes. Lej's syntax is primarily inspired by Natural Semantic Metalanguage, a theory of language that posits that all human languages are built from a set of universal "semantic primes". While Lej doesn't and cannot follow NSM perfectly, it does try to keep its syntax as simple and intuitive as possible.
  2. Gricean-cooperative programming languages. Lej is also inspired by the Gricean cooperative principle, which posits that human communication is inherently cooperative and that speakers and listeners work together to understand each other. A Gricean-cooperativeness survey of the most popular programming languages yielded these six programming languages as key influences for Lej:
    • Ada,
    • Dart,
    • Delpi (Object Pascal),
    • Go,
    • Haskell, and
    • Swift.
  3. Empirical studies of readability. These studies attempt to uncover what makes code more readable to humans. Some languages, such as Quorum, have been designed with these studies in mind. Lej tries to follow the results of these studies to guide future implementation decisions.