I have seen that other AOSA’s have been posted, I contemplated posting the link to all of them but I thought it might be nice to post them as I/other people read them and there can be a discussion per article.
This one I found interesting because it aligns very well with roughly how I like to develop software: lots of callbacks. I like to separate out the policy a piece of code has from how it enacts that policy. It is a few big benefits, IMO, and one big drawback. One is that it’s really easy to flip out different implementations of things, just change the callbacks. Another is that it makes the code much “flatter”. Instead of having lots of deep calls, your code is very shallow because your code becomes the flow of the program and the intersting work, that would normally be the deep calls, is a callback now. The downside is, in most languages it becomes difficult to determine what is being called in the callbacks. Ocaml and SML are the best languages I’m aware of when it comes to this. Functors in ML allows you to statically do this if you can, otherwise you can fallback to runtime subtyping if you need it. The upside to doing it statically is that you can read the code and know what is being called. The downside is that it makes your running application much more…static.
I have seen that other AOSA’s have been posted, I contemplated posting the link to all of them but I thought it might be nice to post them as I/other people read them and there can be a discussion per article.
This one I found interesting because it aligns very well with roughly how I like to develop software: lots of callbacks. I like to separate out the policy a piece of code has from how it enacts that policy. It is a few big benefits, IMO, and one big drawback. One is that it’s really easy to flip out different implementations of things, just change the callbacks. Another is that it makes the code much “flatter”. Instead of having lots of deep calls, your code is very shallow because your code becomes the flow of the program and the intersting work, that would normally be the deep calls, is a callback now. The downside is, in most languages it becomes difficult to determine what is being called in the callbacks. Ocaml and SML are the best languages I’m aware of when it comes to this. Functors in ML allows you to statically do this if you can, otherwise you can fallback to runtime subtyping if you need it. The upside to doing it statically is that you can read the code and know what is being called. The downside is that it makes your running application much more…static.