this post was submitted on 29 Aug 2023
53 points (94.9% liked)

Programming Horror

1838 readers
1 users here now

Welcome to Programming Horror!

This is a place to share strange or terrible code you come across.

For more general memes about programming there's also Programmer Humor.

Looking for mods. If youre interested in moderating the community feel free to dm @[email protected]

Rules

Credits

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] Macil 2 points 1 year ago* (last edited 1 year ago) (1 children)

This looks like how React components are written if you make the weird choice of not using the JSX syntax extension for React elements. I wonder if you could make a JSX-like DSL with Rust macros. JSX really helps for making this kind of stuff bearable.

[โ€“] autokludge 2 points 1 year ago* (last edited 1 year ago)

after a quick search ... https://github.com/bodil/typed-html also leptos uses something similar