# C interoperability with assumed-shape arrays

**URL:** <https://fortran-lang.discourse.group/t/c-interoperability-with-assumed-shape-arrays/6266>\
**Category:** Uncategorized\
**Created:** [August 3, 2023, 1:55pm UTC](https://fortran-lang.discourse.group/t/c-interoperability-with-assumed-shape-arrays/6266 "2023-08-03T13:55:41Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![FortranFan](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@FortranFan](https://fortran-lang.discourse.group/u/FortranFan)\
**Post date:** [August 3, 2023, 9:27pm UTC](https://fortran-lang.discourse.group/t/c-interoperability-with-assumed-shape-arrays/6266/10 "2023-08-03T21:27:11Z")

</div>

> [@rwmsu](#):
>
> … Conversely, on the C side all you have to do is write a conforming function prototype for the Fortran routine and call it without resorting to convoluted name mangling. …

@rwmsu, what do you mean by “name mangling”? See the example I provide in the thread I linked above. Where is the name mangling?

Re: “To me that defeats the purpose of the original idea behind the Fortran C-Interop facility” - no, it does not. Take a look at the example I provide. The code in Fortran is compact and highly functional and thus at a **higher** level of abstraction. Whereas it is at a **low** level in C. This is exactly as one would want. Subliminally, it should inform and influence scientists and technologists and engineers to move more of their coding to a higher level language of Fortran offering efficient computation with functional offering of containers of their data rather than raw pointers and user-defined structs to work with them, like in C.

I agree it cuts both ways, but overall my vision will be to take Fortran higher with about 6 to 10 more facilities and abstractions toward them, as I have listed [**here**](https://fortran-lang.discourse.group/t/tsoding-on-fortran/6102/26). Then if other languages want to interoperate with the abstractions in Fortran, a few more coding instructions in a companion processor (such as C) is what shall be on the anvil.

---

_[View the full topic](https://fortran-lang.discourse.group/t/c-interoperability-with-assumed-shape-arrays/6266)._
