From: Jim Xia on
On Apr 20, 4:47 pm, Craig Powers <craig.pow...(a)invalid.invalid> wrote:
> > PDTs are unlikely to be interoperable with any other languages.  No
> > other known languages seem to support similar language feature.
> > Unless you're solely developing libraries for Fortran users, you
> > wouldn't think of PDTs as a viable choice.  I've seen proposals to
> > support vector data-type declarations using PDTs and interoperable
> > with C.  Once you give it a hard look, you realize it is a hopeless
> > approach.
>
> In the abstract (based purely on a rough understanding of the feature
> and no knowledge of its details), I suspect it might be feasible to hook
> into C++ templates in some way or another.  Any generic programming
> feature will have issues with interop, as there are relatively few other
> languages that support that.  C++ is the only one that I know of offhand.


No, PDT is quite different from C++ templates. The missing key in
PDTs are the language capabilities to generate different routines for
the same type but with different kind type parameters. It's like you
have to rewrite the same algrithms repeatedly for single precision,
double precision and quad precisions. A template function is what
Fortran is missing -- a facility that asks compiler to generate the
different code for different precisions based on the same algorithm.
PDTs don't address this issue and use of PDTs will actually add burden
to the developers to manually resolve this issue.


Jim
First  |  Prev  | 
Pages: 1 2 3 4
Prev: the meaning
Next: do loop error in compiling?