12 ms·
Reading this book brought me a better understanding of "the expression problem" and the use of the visitor pattern as its solution. This led me to (finally) gro
by goodthink 8mo ago
Reading this book brought me a better understanding of "the expression problem" and the use of the visitor pattern as its solution. This led me to (finally) grok the use of Class _Heirarchy_ Inheritance[0] as a solution not requiring visitors. In Newspeak[1], classes can contain nested classes, so when you subclass a class, you inherit the nested classes as well. This blog post discusses the same feature affording Free Object Algebras [2].
[0] https://blog.bracha.org/primordialsoup.html?snapshot=AmpleforthViewer.vfuel&docName=ExpressionProblem https://blog.bracha.org/primordialsoup.html?snapshot=Amplefo...
[1]https://newspeaklanguage.org https://newspeaklanguage.org
[2]https://blog.bracha.org/primordialsoup.html?snapshot=AmpleforthViewer.vfuel&docName=FreeObjectAlgebras https://blog.bracha.org/primordialsoup.html?snapshot=Amplefo...