Given that in .NET it is easy to write your own language these could be used to plug obvious holes in the mainstream languages. For example C# makes a pigs ear of it’s constructors.
The minimal syntax is
The minimal syntax is
C () : base () { }
It is possible to have more code in the base () parameters than in the implementation itself.
You need to redefine any constructors that are required in a descendant class.
This makes the definition of mostly empty classes such as exception hireachies far more work than is actually needed.
Delphi has trivial to implement Exceptions :
type
EBaseException = class(Exception);
EMyException = class(EBaseException);
This makes their definition and use so useful.
I am wondering if it is possible to create an Exception Definition Language to ease this issue?
I will Blog about this experiment later.