[Lazarus] Nested Classes used as Namespace Issue

Razvan Adrian Bogdan lightningflash at gmail.com
Mon Jan 10 17:50:43 CET 2011


On Mon, Jan 10, 2011 at 6:43 AM, Andrew Brunner
<andrew.t.brunner at gmail.com>wrote:

> type
>  ns=class
>  Type
>     Vendor=class
>     Const
>       id    = "ITMID';
>       Size = 'ITMSIZE';
>     Type
>        PVendor=^TVendor;
>        TVendor=record
>          ID : Int64;
>          Size : Integer;
>        end;
>        class procedure Foo();
>     end;
>     Supplier=class
>         // example
>        class procedure Foo();
>     end;
>  end;
> end;
>
> Neither ns.Supplier.Foo() nor ns.Vendor.Foo() will not jump to the
> actual code in Lazarus IDE.  It kind of muddles nested classes (as
> namespaces) that FPC supports.  Is this on someones list of todos?
>
> Interesting stuff, it's like nested records, but wouldn't this look nicer
if the "type" keyword was optional, maybe only required where there is not
keyword like class or record ? This looks like a nice feature but it
shouldn't make code less readable by requiring keywords that only make the
source more ugly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110110/0ba4e99e/attachment-0003.html>


More information about the Lazarus mailing list