Y
Hacker News
new
|
ask
|
show
|
jobs
by
geon
4806 days ago
I suppose you could write a sort of safe Maybe template class in c++. You could pass in two callbacks to handle Just and Nothing respectively. It would be really ugly, but should work, right?
1 comments
pubby
4806 days ago
Yeah, a function taking two callbacks is what I had in mind. This works in dynamic typed languages too, although obviously not as well.
link