Cédric Belin on Nostr: All programming languages should have these builtin types: - `Option<T>` : much ...
All programming languages should have these builtin types:
- `Option<T>` : much better than using a sentinel value to express an absence of result.
- `Outcome<T, Error>` : much better than throwing exceptions to express an error condition.
#Programming #WebDev #JavaScript #PHP
Published at
2024-10-19 17:44:27Event JSON
{
"id": "62c172b50a386da2c70ff63f7a46a9cc336b5e7cb447314a4e1ca481c416de07",
"pubkey": "b68c9aaff1f3f7bbb809cdaf4b8567efcde30e09b5ead7c0df416d94499dde13",
"created_at": 1729359867,
"kind": 1,
"tags": [
[
"t",
"programming"
],
[
"t",
"webdev"
],
[
"t",
"javascript"
],
[
"t",
"php"
],
[
"proxy",
"https://mastodon.social/users/cedx/statuses/113335328268737577",
"activitypub"
]
],
"content": "All programming languages should have these builtin types:\n\n- `Option\u003cT\u003e` : much better than using a sentinel value to express an absence of result.\n\n- `Outcome\u003cT, Error\u003e` : much better than throwing exceptions to express an error condition.\n\n#Programming #WebDev #JavaScript #PHP",
"sig": "6a07dd99ffa2eced0a17f82570a4697f266494fbc866d0aea60a1b131b48702b53f2b54604aee8e660932a4fc2836a256c93a84e596dc818c90dfc2634349982"
}