This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
Zig comptime style macros would enable a huge number of features that are impossible in typescript #369
factoidforrest
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Allowing the developer to tag
comptime
code that runs during compilation would open up a huge host of features not possible in typescript, particularly runtime type reflection. Zig has a particularly nice implementation of this which allows the developer to treat types as values at compile time.It could totally eliminate the massive assortment of clunky code generators that have sprung up around typescript to provide type information and typed automatic functions from things like graphql files.
Give me a function that can output javascript at run time and that would be an absolutely killer feature that will win hearts and minds.
bun
is working on something similar at the moment, and usingjsx
tags to do it. Interesting stuff.Beta Was this translation helpful? Give feedback.
All reactions