Delphi history: on why was TypInfo.pas is not named TypeInfo…
Posted by jpluimers on 2017/11/02
[WayBack] A colleague and I was just wondering, why was TypInfo.pas not named TypeInfo.pas? The original theory of 8.3 naming convention doesn’t hold as TypInfo i… – Willo “qbitza” van der Merwe – Google+
Because of collision: though hardly documented in the early Delphi days the standard function TypeInfo has been there forever so System.TypeInfo already takes TypeInfo in the global namespace as the System unit is used by default and doesn’t have a namespace prefix.
One more reason to suffix unit names with a word like Unit.
And one more reason to always get a Delphi version with source code for RTL/VCL/…: it’s an invaluable source for not so well documented things.
The TypInfo name was also from an era when some people hadn’t learned yet dat using abbrvtns is a sin. Ken Thompson has learned [WayBack] spell it with an “e” · golang/go@c90d392 but we’re suck with StrPas, StrUtils, IntToStr and others forever like Unix is stuck with creat(2): [WayBack] creat(2): open/possibly create file/device – Linux man page and [WayBack] history – What did Ken Thompson mean when he said, “I’d spell creat with an ‘e’.” – Unix & Linux Stack Exchange.
–jeroen
References:






KMorwath said
When editors were limited to 64K or less, floppies were 360K, RAM 640K for the lucky ones, abbreviations didn’t look so silly (and you had no code completion…). C and Unix are far worse, anyway. The first time I worked with a Unix group at first I had troubles to understand their language made of three letters only words…
:-)
thaddy said
Not quite stuck:
program xx;
{$ifdef fpc} {$mode delphi}{$H+}{$endif}
uses sysutils;
const
IntegerToString:function(value:integer):string = sysutils.inttostr(); //! one of several ways to alias. In FPC it can also be a macro
begin
end.
jpluimers said
Thanks for the tips!
I wish the Delphi language could extend aliases for methods, now they are just for types.