SystemT 1.0

By Mauro Venturini

Freeware 09 Feb 2005

In category

.NET > Miscellaneous > Other

Description

.NET framework is nice indeed. I like it, and I am a Delphi "integralist".

Unfortunately, someone in MS decided that interface name prefix ’I’ is good but class name prefix (’T’ or ’C’) it is not. This has unpleasant consequences.

  • It decreases code clarity, e.g. is that a class or an instance reference?
  • It makes often necessary to use the full type name because of clashing with some property, e.g. every form has a DialogResult property so if you want to test for a DialogResult type value you end up writing "if AForm.DialogResult = System.Windows.Form.DialogResult.OK then"
  • It makes instance naming a pain, e.g. as I can not call it Graphics should I call it AGraphics, MyGraphics, _Graphics, argh! C# chaps have a case-sensitive solution: they uncapitalize the instance names, e.g. Graphics graphics = new Graphics; Very readable indeed! Not to mention the problem if the instance is visible outside the assembly (.NET in general is NOT case-sensitive).
Delphi has the solution: type equivalence, e.g.
type
TGraphics = System.Drawing.Graphics;

var
Graphics: TGraphics;

The type equivalence definitions for the .NET framework can be generated automatically using a tool as PrefixIt! and a package built from them: SystemT.dll.

Now to use inside your application or package these new names for the .NET framework types you have to:

  • Add a reference to SystemT.dll package removing both the "Copy Local" and the "Link in Delphi Units" options;
  • For every namespace "N" that you want to use inside a unit add "N" AND "N".T to the uses clause.
That’s all.

Informations

  • Status: Fully functional
  • Source: FW
  • Size: 767 611kB

Platforms:

  • Delphi 2005

Downloads