Comments (2)
I'm not totally familiar with Agda, so perhaps I am missing something...but I believe the features described in the linked post are already mostly achievable (pending a stable Basil implementation
Modules are already first-class, but only at compile-time - modules in Basil represent specifically namespaces or compilation units, and aren't repurposed as objects as they are in some other languages. Since they're a compile-time only construct, they can take advantage of the dynamic typing permitted in compile-time Basil, and store values of whatever type they want - effectively, modules are like a dictionary mapping from Symbol
to Any
. Like everything in compile-time Basil, we either resolve it correctly ahead of time, or we have to statically typecheck it before compiling it, so incorrect usage should be caught at the usage site of any module member during compilation.
The rest of their syntax looks quite nice! Unfortunately I'm not usually at liberty to adopt other languages' syntax into Basil's - generally we strive to have as little parsed syntax as possible, so most of these constructs would ideally be expressed as built-in functions. I'm still bookmarking that syntax listing for inspiration though - there's a few things I'm pretty uncertain about (self-referential types, for one) syntax-wise that Kind seems to have decent solutions for.
from basil.
There is cool trick how to "overcome" the static typing discipline incoherency when bundling e.g. a module with different functions having different return types:
https://github.com/uwu-tech/Kind/blob/master/blog/2-first-class-modules-with-self-types.md
It's probably that Basil will face similar typing issues, so this might come handy as an inspiration for a clean solution
from basil.
Related Issues (20)
- Attributes/annotations HOT 1
- Escaped double quote lexes twice when next to start/end of string HOT 1
- Unable to lex escaped backslash in string literal HOT 1
- String formatting HOT 1
- Thoughts about a flexible yet compile-time turing complete language HOT 2
- Better pretty printing
- Continuation Passing Style (CPS) and compile-time evaluation (and parallelism/concurrency) HOT 4
- Control flow abstraction to avoid built-in exceptions, defer, multi-return, error handling, nil, etc. HOT 3
- XL lang with some similarities to Basil HOT 1
- Vaporization instead of reference counting to jump to the close-to-metal language battleground HOT 3
- Interpreted concatenative language ;) HOT 1
- Dreaming about end-user/programmer use-cases HOT 2
- Add floating-point primitives. HOT 4
- Add sub-64-bit integer types as primitives. HOT 1
- Add raw pointers and pointer types. HOT 3
- Tracing garbage collection. HOT 6
- Add garbage-collected references and reference types. HOT 7
- Forms versus macros HOT 1
- Killer app/lib/built-in-feature to make Basil stand out
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basil.