News for hackers. Stuff that matters.
Re:Why Checked Exceptions Failed by bsder on Saturday July 15, 2023 @06:33PM (#36741545)
> The map function can throw a superset of the exceptions that its argument can throw.

Wait. Why should a map care about what exceptions it's arguments can throw?

A map is storing a thingit. A thingit should exist independently before it gets placed into a map. Placing a thingit into a map should not invoke anything on the thingit. The only exceptions coming back from attempting to place a thingit into a map should be exceptions caused by the map.

What am I missing?

Obviously, there are maps that conflate themselves and do things like take ownership when an object is placed into the map. But that's not the general case and presumably you wrote the map specifically with that in mind.

Re:Why Checked Exceptions Failed by hollerith on Saturday July 15, 2023 @06:40PM (#36741581)
You're thinking of a finite map, also called a hash table or a dictionary.

The map function takes a function and a list and applies the function to every element of the list:

  map double [1,2,3] = [2,4,6]
Re:Why Checked Exceptions Failed by bsder on Saturday July 15, 2023 @11:38PM (#36743342)
Whoops. Yeah, I wasn't thinking about map, fold, accumulate, etc. Thanks for the correction.