From: "Alex Mentis" <foo@invalid.invalid>
Subject: Re: Pop function
Date: Thu, 15 Dec 2011 03:00:10 +0000 (UTC)
Date: 2011-12-15T03:00:10+00:00 [thread overview]
Message-ID: <jcbnrp$l0t$1@dont-email.me> (raw)
In-Reply-To: jcbni6$jip$1@dont-email.me
Alex Mentis wrote:
> Rego, P. wrote:
>
> > > Your public interface should never use access types.
> > > Anonymous types are a bad idea.
> > Why so does the language allow it? Currently I could not think a
> > better way of running over a pointer list:
>
> Instead of
>
> type T_List is
> record
> Next : access T_List;
> Item : Integer;
> end record;
> T_List_Ptr is access T_List;
>
> you should use an incomplete declaration (ARM 3.10.1):
>
> type T_List; -- incomplete declaration
>
> type T_List_Ptr is access T_List;
>
> type T_List is
> record
> Next : T_List_Ptr;
> Item : Integer;
> end record;
>
>
> -Alex
I meant to add, that would alleviate a lot of the type conversion
you're doing.
next prev parent reply other threads:[~2011-12-15 3:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 0:06 Pop function Rego, P.
2011-12-15 0:29 ` Martin Dowie
2011-12-15 1:23 ` Rego, P.
2011-12-15 2:08 ` Adam Beneschan
2011-12-15 22:59 ` Martin Dowie
2011-12-16 10:27 ` georg bauhaus
2011-12-15 0:34 ` Jeffrey Carter
2011-12-15 1:35 ` Rego, P.
2011-12-15 2:55 ` Alex Mentis
2011-12-15 3:00 ` Alex Mentis [this message]
2011-12-15 3:00 ` Jeffrey Carter
2011-12-15 3:41 ` Rego, P.
2011-12-15 8:38 ` Dmitry A. Kazakov
2011-12-15 19:57 ` Jeffrey Carter
2011-12-15 20:15 ` Dmitry A. Kazakov
2011-12-15 21:02 ` Simon Wright
2011-12-15 21:25 ` Jeffrey Carter
2011-12-16 8:23 ` Dmitry A. Kazakov
2011-12-16 0:31 ` Randy Brukardt
2011-12-15 2:06 ` Adam Beneschan
2011-12-15 3:27 ` Rego, P.
2011-12-15 12:43 ` Simon Wright
2011-12-15 15:54 ` Adam Beneschan
2011-12-15 18:34 ` Simon Wright
2011-12-15 19:14 ` Dmitry A. Kazakov
2011-12-15 16:14 ` Adam Beneschan
2011-12-28 13:04 ` Rego, P.
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox