npub1yr…tqath on Nostr: And am extremely confused with some of new syntax. So if I have a enum with a case X ...
And am extremely confused with some of new syntax. So if I have a enum with a case X I can't simply add a method for a specific case by just doing
enum AST
case Str(v : String) {
def newMethodIWantHere...
}
Seems very weird. Probably doing something wrong again 🤔😮💨
#scala
Published at
2024-06-03 00:26:12Event JSON
{
"id": "e07746fcf48e546ac006f2838a177258f248cdf4d6b57e92577c0d68e78c2791",
"pubkey": "20cffc39c60e9c1893b9977cf228d3271258bfedd43114da8e137ad747163ad4",
"created_at": 1717374372,
"kind": 1,
"tags": [
[
"t",
"scala"
],
[
"proxy",
"https://mastodon.social/users/vascorsd/statuses/112549846850312691",
"activitypub"
]
],
"content": "And am extremely confused with some of new syntax. So if I have a enum with a case X I can't simply add a method for a specific case by just doing\n\nenum AST\n case Str(v : String) {\n def newMethodIWantHere...\n }\n\nSeems very weird. Probably doing something wrong again 🤔😮💨\n\n#scala",
"sig": "8beb0cbf68f64fe2d5662203c9ab16b91920a02e7eb88f71318b657685a5165c5d0e20e11e1b1967befb363719a9ec9183b5b2e8713218dde615bf5253237cd7"
}