

0·
1 month agoThis is, nonobviously, the definition of the cutting stock problem. The cutting stock is your tables, from which you want to cut item-sized chunks. A table that can hold two items is just two tables that can only hold one. Mathematically, you can’t do it faster than enumerating all the possibilities and checking them. But that doesn’t help you much.
There are plentiful ready-made solutions online, or you can do it with an SMT solver if you prefer.
The only things on the bad list that I agree with are top-level type inference and small communities. And ocamls windows support is terrible. Haskell’s is more than ok now.
In Haskell, any style guide worth its salt requires annotations on top level functions, and many of them also require annotations on local bindings. This pretty effectively works around the problem.
Bad code will be unreadable in any language of course. But the other things don’t themselves make code unreadable once you’re actually familiar with the language and its ecosystem.