DreamBerd
DreamBerd copied to clipboard
`create` keyword
Please add the create keyword, which is the opposite of the delete keyword, that let's you create new syntax on the spot:
create imaginary
imaginary const const const number = 2i
If the keyword is undesired, you can always delete it, meeting everyones need:
delete create
We have something like that already: #133
Fair point, but this is not just operators but keywords as well. For instance, the language currently has read-only variables (const) and read-write (var), but not write-only and no-read-write. Instead of overcomplicating the language with additional builtin keywords, one could achieve the same effect with create:
create sink // write-only
sink secret = 123
print(secret) // not allowed
create blackhole // no read or write
blackhole what
what = 1 // not allowed
print(what) // not allowed
(using AEMI for brevity here)
this is a nice idea
I agree @TodePond !
I am actually working on a language called DreamLang like this. I will add that feature to the language.