It's an intersection type
@pasqui023 It's not just an intersection type, but for reasons that didn't make it into the screenshot. For example, the "inheritance" of two functions will try them sequentially to enable dynamic definition-by-cases, which is different than just dynamic intersection types.
and what is the difference from function overloading?
@keweddji so it's a form of exception catch?
@pasqui023 That's a good way of thinking about it. The weirdness to me comes from exposing a specific exception-catching mechanism using the same mechanism that creates dynamic intersection types as well as hashmap unions.
It seems more that when used on non function objects it does the dual of that operation
So in a sense it is quite elegant
@keweddji Reminds me of the Perl module that lets you make a variable that is totally different depending on string context vs numeric.
Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!