comp.lang.ada
 help / color / mirror / Atom feed
* Subtype or derived type?
@ 2017-10-07 16:19 Victor Porton
  2017-10-07 16:23 ` Victor Porton
  2017-10-09 21:50 ` Randy Brukardt
  0 siblings, 2 replies; 4+ messages in thread
From: Victor Porton @ 2017-10-07 16:19 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-09 21:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-07 16:19 Subtype or derived type? Victor Porton
2017-10-07 16:23 ` Victor Porton
2017-10-07 16:24   ` Victor Porton
2017-10-09 21:50 ` Randy Brukardt

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