stephann on Nostr: Just wrote a HTML builder with GDScript. Why? Why not? Some insights: - it would be ...
Just wrote a HTML builder with GDScript. Why? Why not?
Some insights:
- it would be nice to have a syntax sugar for lambdas/callables
- To avoid `body({}, func():`, I have to make the first parameter to be `attributes_or_callable`, then check if it is a Dictionary or a Callable, and I shouldn't allow passing two Callables.
- I could not use {class="xyz"} because GDScript assume `class` as keyword, I think it should be handled as a String literal/StringName.
#ScreenshotSaturday #MadeWithGodot
Published at
2024-11-15 14:19:13Event JSON
{
"id": "c616d991c0146db4e02c55452bfbecbd4cfe689c72150f5cf477e44d8b10e792",
"pubkey": "ecf079adb538563a6aa4996c22def355965cb1aeea244422d82ab5a7d058796f",
"created_at": 1731680353,
"kind": 1,
"tags": [
[
"t",
"screenshotsaturday"
],
[
"t",
"madewithgodot"
],
[
"imeta",
"url https://cdn.masto.host/mastodongamedevplace/media_attachments/files/113/487/355/865/920/871/original/2132a38b28e4546b.png",
"m image/png",
"dim 1064x1516",
"blurhash UE8#7_of_Njtxuj[ayay?cj[axj[tRj[j[j["
],
[
"proxy",
"https://mastodon.gamedev.place/users/stephann/statuses/113487403647203682",
"activitypub"
]
],
"content": "Just wrote a HTML builder with GDScript. Why? Why not?\n\nSome insights:\n- it would be nice to have a syntax sugar for lambdas/callables\n\n- To avoid `body({}, func():`, I have to make the first parameter to be `attributes_or_callable`, then check if it is a Dictionary or a Callable, and I shouldn't allow passing two Callables.\n\n- I could not use {class=\"xyz\"} because GDScript assume `class` as keyword, I think it should be handled as a String literal/StringName.\n\n#ScreenshotSaturday #MadeWithGodot\n\nhttps://cdn.masto.host/mastodongamedevplace/media_attachments/files/113/487/355/865/920/871/original/2132a38b28e4546b.png",
"sig": "dedbf6ff54df6539fa34b162a71914a30d659c9d983a2957dbf254fbf61f154bd3ba036ee0755173c8e024c27aa70b0a3cd0a8a20fa1baa1e1770847473f2c29"
}