Giter Club home page Giter Club logo

Comments (5)

eriksvedang avatar eriksvedang commented on May 9, 2024 2

Agreed. My idea with the current naming scheme is that it's fairly close to how people name their C libraries. In theory that means better usage of Carp libraries from C code and nicer wrapping of existing C libraries. For instance, the SDL library could be wrapped in a SDL module with shorter function names since all its functions begin with SDL_. I'll read through the C++ mangling doc for ideas, but won't change any of this for now.

from carp.

hellerve avatar hellerve commented on May 9, 2024 1

The C++ standard does not specify a mangling scheme, and we will have to implement it in a few different ways to be able to be compatible with different compilers. This is neither an argument for nor against it—I have no opinion on this—, just a remark.

from carp.

hellerve avatar hellerve commented on May 9, 2024 1

Another thing to consider: when we write C code that interfaces with Carp, we mangle by hand. This would mean we would have to provide different versions for the core functions (because of the names) or autogenerate core.h, as well as doing that for any C code that interfaces with Carp. This sounds tedious to me, and I’m not sure what we gain from it.

Still I have no informed opinion about this, but I’d like to say that right now it is fairly comfortable to write C that interfaces with Carp. It would be prudent to keep it that way, so to whatever system we change, this should be our primary concern.

from carp.

eriksvedang avatar eriksvedang commented on May 9, 2024

That seems like a pretty good idea. Do you have a link to some kind of understandable spec for it?

from carp.

bagucode avatar bagucode commented on May 9, 2024

Hello Carp people!
This is the de-facto standard documentation for calling conventions and name mangling.
http://www.agner.org/optimize/calling_conventions.pdf

from carp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.