chungf on Nostr: A considerate constructor: 1. is protected; 2. only asks for arguments that are ...
A considerate constructor:
1. is protected;
2. only asks for arguments that are absolutely required to instantiate the object;
3. only runs code that must absolutely run to instantiate the object;
4. delegates the rest to setter and init methods.
Published at
2024-03-25 16:14:53Event JSON
{
"id": "a57199a317605dc326e5832d7e14acda5222a85267e08e34e8f4f48d3f97352b",
"pubkey": "3b8e09e13da00e0b51dec3fbbf09bdbfb24573d73b1b3728a31973520602b562",
"created_at": 1711379693,
"kind": 1,
"tags": [
[
"r",
"https://image.nostr.build/1f596df60d503aa2de6beb33f9f5eb3bb5432fe4a9a80bbec0a73230b7070278.jpg"
],
[
"imeta",
"url https://image.nostr.build/1f596df60d503aa2de6beb33f9f5eb3bb5432fe4a9a80bbec0a73230b7070278.jpg",
"m image/jpeg",
"alt Verifiable file url",
"x 115af5d60e4c29a939bea6ee390c1c2cf0fe35cc356251b38fbe69b9c7e1349a",
"size 333671",
"dim 1535x1536",
"blurhash |GJkceWVIVozaeayn%WCoLpJkBWBkDWBf6aej[az00WBoca~ayoLR*t7WC?waKjsozj?j[kCj[fk.9n%WXozo0WVt7WBof~WofWVayaeayj]azjt~pW=f8Riazj[WBoLWBR5kWkCV?ozj[WBaefPITkWoMaKofazofWBj@",
"ox 1f596df60d503aa2de6beb33f9f5eb3bb5432fe4a9a80bbec0a73230b7070278"
]
],
"content": "A considerate constructor:\n1. is protected;\n2. only asks for arguments that are absolutely required to instantiate the object;\n3. only runs code that must absolutely run to instantiate the object;\n4. delegates the rest to setter and init methods. https://image.nostr.build/1f596df60d503aa2de6beb33f9f5eb3bb5432fe4a9a80bbec0a73230b7070278.jpg",
"sig": "1d30bf24463511e9f658f7ec037123c31554531b14c0b9b4db3f11e3946bce2230d4aa4a941d2e015bfe5f27676b592f6ed3953093644c841d21c9c70f8072ff"
}