Closed Aadamandersson closed 1 year ago
Name | Link |
---|---|
Latest commit | 0e9f559992a7e158e8894f45ecc19a6b95636659 |
Latest deploy log | https://app.netlify.com/sites/dada-lang/deploys/645d0823f59451000767b089 |
Deploy Preview | https://deploy-preview-227--dada-lang.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Nice! I had thought about having the syntax fn foo[type T]
, the intention being that every declaration of a generic parameter is preceded by its kind -- but I hadn't made up my mind yet.
One of the advantages would be that you can do interesting things with impl
blocks:
class Foo[type T]() {
}
impl Foo[type T] {
fn bar() { ... }
}
impl Foo[String] {
...
}
I'm not sure if this is the direction Dada should go -- both in terms of the type
keyword but also having impl
blocks to begin with! -- but I'd say it's worth giving it a try.
This implements parsing of generic parameters for types
fn foo[T]
and permissionsfn foo[perm P]
.