(no title)
alexmingoia | 3 years ago
- No linters. Code is auto-formatted.
- No modules. Includes can be namespaced/aliased.
- No package manager. Include by Git URL with tags.
- No type annotations. Automatic type-checking.
- No user-defined types. A few good types is better.
- No null. Set membership with maps is better.
- No exceptions.
- No loops. List and map comprehensions.
- No general recusion. Only tractable transitive closures (ala Datalog).
- No higher-order functions.
- Terminating. All programs terminate. Turing completeness is not desirable for most domains, but predictable semantics is.
- Safe. No undefined behavior. No crashes.
- Persistent, the runtime is also the database. The language is the database.
I'm working on a language with exactly this set of features. Email me if you're interested.
kubanczyk|3 years ago
Naming: linters deal with much more than formatting, and users tend to create linters even for languages which enforce canonical formatting.
Linters check for the patterns which are allowed by the compiler, but disallowed by a particular project/team/org. Example: disallow functions longer than four statements, disallow repeated strings that could be replaced by a constant, etc.
almostarockstar|3 years ago
How are you side stepping an NP-hard issue like the halting problem?
alxmng|3 years ago
Datalog is terminating. Programming languages don't have to allow infinite loops and recursion. There are plenty of ways to ensure recursion is terminating, like structural recursion or only allowing recursing finite data structures.
AnimalMuppet|3 years ago
kubanczyk|3 years ago
Go does exactly this (`go.mod`), and it turns out it still needs a package manager, just simpler. One of the reasons: diamond dependency problem.
alexmingoia|3 years ago
This can be completely transparent to the user. There's no need to have a separate program do dependency resolution when dependencies are referenced in source code. Instead we have the complete waste of life that is package manifests and shared libraries.
tashmahalic|3 years ago
hyperswine|3 years ago
thiht|3 years ago
> - No higher-order functions.
I'm not creative enough to understand how you can do anything useful without these 2. Can you clarify?
alexmingoia|3 years ago
kaz-inc|3 years ago
hyperswine|3 years ago
alexmingoia|3 years ago
No modules / namespaced includes means that to include other code, you would write something like `include as Foo './other-source-code.file'` or `include as Bar 'github.com/foo/bar/some/source.file@commit`. All the names in the included file (functions, names of data, etc.) would be referenced by prefixing the namespace, like `Foo.baz` or `Bar.baz`. Combine that with the ability to include code via URL, and there would be need for a package manager or separate package manifest. Wherever you want to use the new version/code you simply update the include statement at the top of the file.