True, but it allows for an immutable pattern in an designed ...

npub1qdjn8j4gwgmkj3k5un775nq6q3q7mguv5tvajstmkdsqdja2havq03fqm7
hex
8402d404405a3603dbbe2ecbc3255e1cece23fc405c246251b4899c0cf94b6dcnevent
nevent1qqsggqk5q3q95dsrmwlzaj7ry40pem8z8lzqtsjxy5d53xwqe72tdhqprpmhxue69uhhyetvv9ujuem4d36kwatvw5hx6mm9qgsqxefne258ydmfgm2wfl02fsdqgs0d5wx29kweg9amxcqxew4t7kqqkgl9jKind-1 (TextNote)
↳ 回复 事件不存在
00000f1fc4efd9e4e802a8b8173155f8bb9d153fbc9d1dd9bb0ec1a2d238ddbf...
True, but it allows for an immutable pattern in an designed mutable language (which is an argument against const existing at all). const does prevent assignment, just not mutation of the object. Same could be said for C (also my favorite language). Const just changes the compiler enforced memory location protection.
I'm trying to make sense of this argument though. I suppose, coming from strongly typed/functional languages into JS, I developed my own idiomatic patterns to sidestep the designed mutability of the language.
I would also agree in theory that const as a concept in JS shouldn't exist if it was true to the way it's taught.
原始 JSON
{
"kind": 1,
"id": "8402d404405a3603dbbe2ecbc3255e1cece23fc405c246251b4899c0cf94b6dc",
"pubkey": "036533caa872376946d4e4fdea4c1a0441eda38ca2d9d9417bb36006cbaabf58",
"created_at": 1773337267,
"tags": [
[
"e",
"870a287751bc568df91f30ddac1c5eed9c823cf88434a724d763f2f50dd898d0",
"",
"root"
],
[
"e",
"00000f1fc4efd9e4e802a8b8173155f8bb9d153fbc9d1dd9bb0ec1a2d238ddbf",
"wss://nos.lol/",
"reply",
"97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322"
],
[
"p",
"036533caa872376946d4e4fdea4c1a0441eda38ca2d9d9417bb36006cbaabf58"
],
[
"p",
"97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322"
]
],
"content": "True, but it allows for an immutable pattern in an designed mutable language (which is an argument against const existing at all). const does prevent assignment, just not mutation of the object. Same could be said for C (also my favorite language). Const just changes the compiler enforced memory location protection. \n\nI'm trying to make sense of this argument though. I suppose, coming from strongly typed/functional languages into JS, I developed my own idiomatic patterns to sidestep the designed mutability of the language. \n\nI would also agree in theory that const as a concept in JS shouldn't exist if it was true to the way it's taught. ",
"sig": "8f10a6187db6ed108f698a3935bde49efd2f4a020fda9b03239941fa37afc0ff8210f5f4ce77c399ee756095064776f1f7892f97575ef9aaccd7b0cc25eb50fc"
}