4 ms·
My sense is that the simple building blocks are more trouble than they’re worth. The main example I look at is call/cc in Scheme. It’s simple, it’s elegant, an
by dietrichepp 4y ago
My sense is that the simple building blocks are more trouble than they’re worth.
The main example I look at is call/cc in Scheme. It’s simple, it’s elegant, and it can be used to build all sorts of things like exceptions, coroutines, and backtracking. However, if you build all sorts of abstractions with it, the abstractions will interact with each other in unexpected ways. It also “contaminates” your library code and makes it hard to write certain higher-order functions—if your library function is not a leaf function, it might call call/cc, and call/cc might return multiple times.
I’d say call/cc is powerful like dynamite is powerful. I don’t want it in my toolbox.