mleku on Nostr: my limit is around 600, due to cases where the code is very repetitive but creates an ...
my limit is around 600, due to cases where the code is very repetitive but creates an API that compile-time type checks for you. often these can be generated as well, using templates, but if the file doesn't pass my limit it's not worth the extra time.
one nice thing is now that go has generics, quite a few of the cases that required code generators are now handled automagically with generic type parameters. unfortunately they can't be used on methods, only functions, which breaks up the elegance of a nice type implementation. but ya gotta do what ya gotta do. i'm betting that eventually they will figure out a way to allow type parameters on methods. i think the thing is that they haven't incorporated generic parameters as a part of the interface function signature processing yet.
Published at
2025-06-15 07:25:27Event JSON
{
"id": "e12e388161b855c9e19c7ae0461dfe4bef3f23d09d75539fb35f71878b450a54",
"pubkey": "4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f",
"created_at": 1749972327,
"kind": 1,
"tags": [
[
"e",
"eeeb953e702fcbbd71d70c9949fe5200374d91a18284bee49d6a55a07897b6ba",
"wss://theforest.nostr1.com/",
"root",
"fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1"
],
[
"e",
"53f8321e3d687714729ce614124d246179c8418e937e0c37257549b927607727",
"wss://nostr.wine/",
"reply",
"fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1"
],
[
"p",
"fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1"
]
],
"content": "my limit is around 600, due to cases where the code is very repetitive but creates an API that compile-time type checks for you. often these can be generated as well, using templates, but if the file doesn't pass my limit it's not worth the extra time.\n\none nice thing is now that go has generics, quite a few of the cases that required code generators are now handled automagically with generic type parameters. unfortunately they can't be used on methods, only functions, which breaks up the elegance of a nice type implementation. but ya gotta do what ya gotta do. i'm betting that eventually they will figure out a way to allow type parameters on methods. i think the thing is that they haven't incorporated generic parameters as a part of the interface function signature processing yet.",
"sig": "c99cd6b33275da000bd54398e3bca1f0fab488730f24ea0b06f954962895ce7012e971a078e648d413cdd295b16c787a596ceede8436eb43729f0b4fc6b63ca9"
}