What’s the difference between public and published class members in Delphi?

The compiler generates RTTI (Run-Time Type Information) metadata for published members, but not for public members (by default). The main effect of this is that the published properties of an object will appear in the Object Inspector at design time. I do not know if you are writing components, but if you do, you probably … Read more

Is Erlang Object-Oriented?

Joe Armstrong has gone on record saying that he thinks that Erlang is “possibly the only object-oriented language” (the context adds “OO in the Alan Kay meaning of the word”). Johnson, in the same interview, points out the same things that Sean Copenhaver says in his answer: in the small, Erlang’s a purely functional language; … Read more

Dependency Inversion in Python

The principle Robert C. Martin’s definition of the Dependency Inversion Principle consists of two parts: High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstractions. Just to clarify… a module could be a function, a class, a file… a piece of … Read more

Fluent Interfaces – Method Chaining

The core idea behind building a fluent interface is one of readability – someone reading the code should be able to understand what is being achieved without having to dig into the implementation to clarify details. In modern OO languages such as C#, VB.NET and Java, method chaining is one way that this is achieved, … Read more

How can I serialize internal classes using XmlSerializer?

From Sowmy Srinivasan’s Blog – Serializing internal types using XmlSerializer: Being able to serialize internal types is one of the common requests seen by the XmlSerializer team. It is a reasonable request from people shipping libraries. They do not want to make the XmlSerializer types public just for the sake of the serializer. I recently … Read more

Diamond Problem

Its not the same problem. In the original problem, the overriden method can be called from A. In your problem this can’t be the case because it does not exist. In the diamond problem, the clash happens if class A calls the method Foo. Normally this is no problem. But in class D you can … Read more