News for hackers. Stuff that matters.
Re:Object-oriented design patterns in C and kernel development by kerblang on Wednesday August 27, 2025 @02:26PM (#45043183)
You can do exactly what was done in C with most OOP languages like Java & C# because you have lambdas now, and lambdas are just function pointers. You can literally assign them to instance variables (or static variables).

(sorry it took more than a decade for Java to catch up and Sun Microsystems originally sued Microsoft for trying to add lambdas to java way back when, and even wrote a white paper insisting that anonymous inner classes are a perfectly good substitute - stop laughing)

There are no comments on this comment yet.