comp.lang.ada
 help / color / mirror / Atom feed
From: Victor Porton <porton@narod.ru>
Subject: Subtype or derived type?
Date: Sat, 07 Oct 2017 19:19:18 +0300
Date: 2017-10-07T19:19:18+03:00	[thread overview]
Message-ID: <orauq5$9tv$1@gioia.aioe.org> (raw)

While developing (thick object oriented) bindings for a C library:

I have developed a package containing Term_Type type with bindings
for raptor_term type:
https://github.com/vporton/redland-bindings/blob/ada2012/ada/src/rdf-raptor-term.ads

Term_Type represents pointer C type raptor_term* (where raptor_term
is a struct).

Now I am developed bindings for librdf_node which is defined as:

typedef raptor_term librdf_node;

Now I ask advice how to define the type representing librdf_node*
pointer type.

I have two variants in mind:

1.

subtype Node_Type is Term_Type;

2.

type Node_Type is new Term_Type;

Please advise which of the two is better.

-- 
Victor Porton - http://portonvictor.org

             reply	other threads:[~2017-10-07 16:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-07 16:19 Victor Porton [this message]
2017-10-07 16:23 ` Subtype or derived type? Victor Porton
2017-10-07 16:24   ` Victor Porton
2017-10-09 21:50 ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox