Wilfred Hughes on Nostr: I still find it weird that constructors aren't first class functions in OCaml. `id ...
I still find it weird that constructors aren't first class functions in OCaml.
`id Just` is legal in Haskell, but `id Some` is an error in OCaml.
Are there any advantages of the OCaml approach?
Published at
2024-05-02 04:24:42Event JSON
{
"id": "422976310204ea2b91d848c5489d8d3028cd0811448f57278b0c5292d8cae507",
"pubkey": "27c7ddcdba1d8cc847191c23aa2bf54f085cdedb6a6d7e5e460e6c8b59798786",
"created_at": 1714623882,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/wilfredh/statuses/112369590763664418",
"activitypub"
]
],
"content": "I still find it weird that constructors aren't first class functions in OCaml.\n\n`id Just` is legal in Haskell, but `id Some` is an error in OCaml.\n\nAre there any advantages of the OCaml approach?",
"sig": "2ff4428a3640cba74b22531d41174595e196a749c0e08f46f7a6a06d32157e15b483874e6c1678c570aae4b8f066fbe1f31d10ebc0a048268c250d86e969385a"
}