Yuri :godot: on Nostr: For the life of me I cannot understand why this way of initializing class members is ...
For the life of me I cannot understand why this way of initializing class members is so beloved, instead of doing it in the body of the constructor. It looks so messy.
Does it have advantages behind the scenes?
Published at
2024-12-12 15:30:39Event JSON
{
"id": "f5e107bbfc12cd5b2d8e6a9bdbaf7523d834e538f163d1244f45bda1f554280c",
"pubkey": "6a06c9ff8bf4021a207b4f57196bf459d6952cbc5ee8b5096fdf7a48749cb36b",
"created_at": 1734017439,
"kind": 1,
"tags": [
[
"imeta",
"url https://cdn.masto.host/mastodongamedevplace/media_attachments/files/113/640/554/742/579/809/original/1d922d340a7cc536.png",
"m image/png",
"dim 955x380",
"blurhash UCR:KPE3R:%M_4M~IVRkt7oga#WC-:oet7of"
],
[
"proxy",
"https://mastodon.gamedev.place/users/yurisizov/statuses/113640566939401977",
"activitypub"
]
],
"content": "For the life of me I cannot understand why this way of initializing class members is so beloved, instead of doing it in the body of the constructor. It looks so messy.\n\nDoes it have advantages behind the scenes?\n\nhttps://cdn.masto.host/mastodongamedevplace/media_attachments/files/113/640/554/742/579/809/original/1d922d340a7cc536.png",
"sig": "756f573373075403c73732cf48648367d6909b29008f63f1b9f90a90853d5bd56ba25ce321040da2b1d63aa1620e83b72f7ba7f2c49682146fb7dae4912ee692"
}