matejcerny on Nostr: F# 9 introduces auto-generated "is" properties for "enums", enabling checks like ...
F# 9 introduces auto-generated "is" properties for "enums", enabling checks like .isPhone or .isEmail. While convenient, consider minimizing boolean usage in your code. Boolean logic is error-prone and difficult to read and maintain. Always use proper domain types (On/Off, Valid/Invalid, ...) together with pattern matching for improved readability and type safety. #fsharp #boolean #cleancode
https://youtu.be/2Q9GRPxqCAkPublished at
2024-11-17 14:55:34Event JSON
{
"id": "cf313c11144f1983801fd62118b9d9a76e7f94b4f94c56d65b84b01ae7cf3924",
"pubkey": "f5c3f597f754f534d47b0be2b9afe263894ecdad3d639453c4abc31f40db2c23",
"created_at": 1731855334,
"kind": 1,
"tags": [
[
"t",
"fsharp"
],
[
"t",
"boolean"
],
[
"t",
"cleancode"
]
],
"content": "F# 9 introduces auto-generated \"is\" properties for \"enums\", enabling checks like .isPhone or .isEmail. While convenient, consider minimizing boolean usage in your code. Boolean logic is error-prone and difficult to read and maintain. Always use proper domain types (On/Off, Valid/Invalid, ...) together with pattern matching for improved readability and type safety. #fsharp #boolean #cleancode\nhttps://youtu.be/2Q9GRPxqCAk",
"sig": "2c22573fe9e7add627d094ff30d3467869224a23ec2c867cc1c9df5671541fbf78d5655cfbed9f02cbaa8a16f90a60413ef4b8d5be48007a55a52d4f12a2234e"
}