You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than a Union of languages, AjScript is meant to be an Intersection of languages.
What's the smallest, least featureful language that we can produce given only the best parts of Go, Rust and Zig, which can be run unambiguously by a JavaScript / ES20xx interpreter - such as Bun and Browsers?
Goals
Number 1: Advanced static analysis.
It should (probably) never be necessary to define a return type.
// static-dynamic "comptime" typingarr.map(function(x){// it should be known by virtue of the type of `arr` what `id` is and that the type of `id` is the return typereturnx.id;})
Rather than a Union of languages, AjScript is meant to be an Intersection of languages.
What's the smallest, least featureful language that we can produce given only the best parts of Go, Rust and Zig, which can be run unambiguously by a JavaScript / ES20xx interpreter - such as Bun and Browsers?
Goals
Number 1: Advanced static analysis.
It should (probably) never be necessary to define a return type.
Number 2: Advanced write-time tooling.
It should (probably) never be necessary to define an input type. Writing the code should be sufficient to generate the types.
prettier
-like code modification on saveNumber 3: Real-time tooling.
The tooling should be so fast that I could use auto-complete while typing in real-time.
Number 4: End-to-end Typing
It sucks to have to write types in 2+ different places. Especially when it comes to migrating databases or otherwise refactoring the data structure.
Could code realistically be automatically updated to reflect data updates?
Perhaps
sqlc
could help: https://docs.sqlc.dev/en/latest/reference/config.html?highlight=json#jsonNumber XX: Strict subset of JavaScript
It must be a strict subset of JavaScript that does not require any tooling to run in a browser.
Also, it must work with the grain of JavaScript, not against it.
Alternate Name Ideas
See also: #42
Tricky Bits
Generic Modification w/o Downcast
It should be possible to require any
Partial<T>
type, but return the originalT
variant.FooNew
s and allFooUpdate
s)Foo
)FooNew
)There's an argument to be made that these are confusing semantics:
Going "with the grain" of the dynamic nature of AjScript and the ValueObject-oriented design, it seems that it requiring a full copy is not necessary.
Maybe a naming scheme for functions that modify is in order?
The text was updated successfully, but these errors were encountered: