TransWikia.com

Object algebras without anonymous inner classes

Computer Science Asked by ByteEater on December 10, 2021

In de Oliveira and Cook’s Extensibility for the Masses uses Java for its code (it’s not about stuff specific to that language though) and the ability to create anonymous inner classes is used extensively, starting from the code in Figure 4. Yet the authors claim that they rely only on a modest set of features and the same could be done e.g. in C# (as of 2012). Would the equivalents in C#, C++, Visual Basic and other languages without anonymous inner classes involve creating ordinary classes implementing the right interface, taking the arguments and storing them in the constructor and using in a single method, and those classes would be instantiated with new instead of the interfaces?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP