remcoros on Nostr: const clearly states intent, it's good for longevity of the code especially with ...
const clearly states intent, it's good for longevity of the code especially with multiple maintainers. Not sure about performance, I can imagine a runtime can make some assumptions for performance if it knows it's a const.
Published at
2024-07-17 16:43:39Event JSON
{
"id": "c5848a9cc6508d4a66b3ba6019e13161a0d44abf4cbf763a3c7c6496892fde77",
"pubkey": "aed0088b68f3b1545326768825fd3d207a1c33397e81cc5370683920f759a36b",
"created_at": 1721234619,
"kind": 1,
"tags": [
[
"e",
"8ac2074a9c23e92598a1307e4d4a1c9e29e5c10fd139043682cab5b6a6183cdf",
"",
"root"
],
[
"p",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
]
],
"content": "const clearly states intent, it's good for longevity of the code especially with multiple maintainers. Not sure about performance, I can imagine a runtime can make some assumptions for performance if it knows it's a const. ",
"sig": "ddd49031e2185cd1c77fe6e3c367a4168037d71ec43c4f4af53c144bd0ce969d78db75dacb5b5151778eff35cadcefb1816a8ed3a515d960438600ba92f7b291"
}