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 is 7 characters long. A typo detected too late?
Could be because of a (bad) parser issue, thinking that it if it was TypeInfo, that the parser would pick up 'Type' as a keyword, and not the unit name...?
I really don't know the story behind this. My take has been that given TypeInfo is a global functions (and possibly a special one) you don't want to have a conflict with that name, even if the parser would be fully capable of handling it...
Could be because of a (bad) parser issue, thinking that it if it was TypeInfo, that the parser would pick up 'Type' as a keyword, and not the unit name...?
ReplyDeletemay be the original authors were not native English speakers. :)
ReplyDeleteNicholas Ring That would hold if the unit was called Type.pas.
ReplyDeleteTypeInfo is used as a parameter name quite often in procedures inside the unit, but I doubt that that would cause a parser issue.
Ugochukwu Mmaduekwe LOL, could be! But I would have expected QA/Other devs to pick up on that.
ReplyDeleteWillo van der Merwe I would guess that unit has been around since Turbo Pascal days, so the parser may not be as good as it is now...
ReplyDeleteTo save the name for the corresponding structure?
ReplyDeletedict.cc - dict.cc | typ | Wörterbuch Englisch-Deutsch
ReplyDeleteOndrej Kelle Typ = Joker? :p
ReplyDeleteWillo van der Merwe Yes, I think I've read it somewhere that the original Delphi devs liked to say "TypInfo" with German pronunciation.
ReplyDeleteOndrej Kelle That is very interesting.
ReplyDeleteI really don't know the story behind this. My take has been that given TypeInfo is a global functions (and possibly a special one) you don't want to have a conflict with that name, even if the parser would be fully capable of handling it...
ReplyDeletebooks.google.ch - Kylix Developer's Guide
ReplyDeleteBecause of collision: though hardly documented in the early Delphi days the standard function TypeInfo has been there forever so http://docwiki.embarcadero.com/Libraries/en/System.TypeInfo already takes TypeInfo in the global namespace as the System unit is used by default and doesn't have a namespace prefix (see http://docwiki.embarcadero.com/VCL/XE/en/System.TypeInfo and http://docs.embarcadero.com/products/rad_studio/radstudio2007/RS2007_helpupdates/HUpdate4/EN/html/devwin32/cwgregisteringthepropertyeditor_xml.html)
ReplyDeleteOne more reason to suffix unit names with a word like Unit.
docwiki.embarcadero.com - System.TypeInfo - RAD Studio API Documentation
nowadays, saving chars is a sin : unix.stackexchange.com - What did Ken Thompson mean when he said, "I'd spell creat with an 'e'."
ReplyDelete