On Thu, Sep 18, 2008 at 11:34 AM, Florian Klaempfl <[EMAIL PROTECTED]> wrote: >> >> That's the whole point - it shouldn't be assignment compatible. You >> are creating a new MyString type, irrespective of what base-type it >> was based on. Only MyString types should be assigned to MyString >> types, otherwise you could simply have used String type. >> >> I thought the example given in the delphi.non-technical discussion was >> quite a good. > > It's as useless as any talk in this newsgroup. If you don't like two types > being assignment compatible, use classes, records whatever.
If the developer wants assignment compatibility surely he could then use the alias types?? eg: #1 type MyType = Double; MyOtherType = Double; With the above types you should have assignment compatibility between MyType, MyOtherType and Double. When creating distinct types as show below, type safety should come into play and assignment compatibility should be broken. eg: #2 type MyType = type Double; MyOtherType = type Double; Otherwise, what's the different between a "alias" type (eg #1) and a "distinct" type (eg #2)?? Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel