Re: Who uses clapack?

From: Jentje Goslinga (goslinga_at_telus.net)
Date: 12/11/04


Date: Sat, 11 Dec 2004 05:20:15 GMT


James Giles wrote:
> Jentje Goslinga wrote:
>
>>Rich Townsend wrote:
>>
>>>Jentje Goslinga wrote:
>>
> ...
>
>>>>The beauty of C++ is that the notion that the code will have
>>>>to connect to modules written in other languages has been an
>>>>intrinsic part of the design of the language from the beginning.
>>>
>>>
>>>I can't find the section in Bjarne Stroustrup's book where he discusses
>>>interoperability with other languages. Would you care to enlighten me?
>>
>>Yes, the "extern C" syntax is discused in Chapter 9
>>Section 9.2.4 Linkage to Non-C++ code,
>>The C++ programming Language, third edition page 205.
>
>
>
> That's interop with C (which is almost redundant, C++ originally
> being an extension of C, it's hardly impressive that it can interop
> with C).

It is not so trivial with overloading and name decoration.

> I still don't see the part where it's originally intended
> to interop with, say, Ada, Pascal, Lisp, Haskell, and yes: Fortran.

You are right, that part doesnt exist; I had forgotten that
but what's the difference, isn't C almost the same as Fortran?

Interoperability between languages is a gray area where one
needs to consider the following:
   1 Ability to suppress C++ name decoration, knowledge of other
     conventions such as underscores appended or prepended to name
   2 Knowledge of linker conventions such as upper case conversion
     and maximum name length
   3 Ability for the programmer to specify parameter passing by
     address and by value which C and C++ have
   4 Ability for the user to use parameter passing from left to
     right or vice versa
   5 Conventions on stack based parameter passing notably padding
     and stack alignment
   6 Decide on who resets the stack pointer, caller or callee.

I agree there may be differences between languages between
items 4-6 although they are usually not irreconcilable since
the operating systems supporting these languages must use
cross language linking too.
I believe none of these are even specified by the C or C++
standards either, although parameter passing from the right
to left is said to be necessary to accommodate variable
number of parameters.

But you are right.

Jentje



Relevant Pages

  • Re: Who uses clapack?
    ... > Jentje Goslinga wrote: ... > being an extension of C, it's hardly impressive that it can interop ... Interoperability between languages is a gray area where one ... Ability for the programmer to specify parameter passing by ...
    (sci.math.num-analysis)
  • Idea for a tiny little program...
    ... I am giving a seminar on C# interop and I would like to feature an original ... calls Babylon for translations in N languages and ... de Tisch, es mesa, pt mesa, it tavolo, ... ... to challenge each other or play in teams (20 seconds for every English word, ...
    (microsoft.public.dotnet.csharp.general)
  • Idea for a tiny little program...
    ... I am giving a seminar on C# interop and I would like to feature an original ... calls Babylon for translations in N languages and ... de Tisch, es mesa, pt mesa, it tavolo, ... ... to challenge each other or play in teams (20 seconds for every English word, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Programming Tools Dream
    ... I dream of having such a programming environment where in I can code in different languages like I can have one module created in Delphi-Pascal, one module in C++ yet another module in BASIC, etc. ... There should be same type of data types which should behave the same across languages meaning that integers, string, etc. should be same across Languages. ... One of the only reasons C and Pascal are compatible is because of the whole STRUCT/RECORD and the type system.. ... I am saying that a language should be as it is just the data types and parameter passing should be standardized so that it becomes easy to share data across languages.... ...
    (borland.public.delphi.non-technical)
  • Re: IsString
    ... variable is a character or a number". ... Python's parameter passing is NO DIFFERENT to that in those languages, and those languages are ALL described as call-by-value, so to claim that python does not use call-by-reference but some random new 'call-by-object' convention is incorrect, unneccessary, confusing and silly. ...
    (comp.lang.python)