Giter Club home page Giter Club logo

Comments (4)

aklomp avatar aklomp commented on June 24, 2024

Hi, thanks for the suggestion. Currently, this library claims the base64 namespace for all global functions, macros, structures and other objects exposed in the public headers. I guess this can cause conflicts with other software that also claim that prefix, but in my opinion, base64 is a reasonable prefix for a base64 library to claim.

Changing the prefix would break API compatibility, and while I am not opposed to that as long as it's accompanied by a major version change, I'm hesitant to do it unless necessary. As a thought exercise, I tried to come up with a few alternative prefixes, but they all seem poor. libbase64 is overlong, b64 is probably too generic, and using a made-up name would be confusing. Is there a prefix you had in mind?

Possibly this can be solved/fixed in the future when the library switches to building with Cmake, it might make it easier to configure a custom namespace.

from base64.

jbaldwin avatar jbaldwin commented on June 24, 2024

Yeah, I was unable to think of a good suggestion for a generic prefix as base64_ logically makes sense for this library.

How about an optional configuration define or macro which would prefix the functions accordingly if it is set by the user? Then you don't have to change the default API and users of the library can then pick any prefix they want. I know rapidjson uses this method to allow its users to namespace the entire codebase (its C++ but same concept I think).

from base64.

aklomp avatar aklomp commented on June 24, 2024

That sounds like a reasonable solution. However at this point it's hard to implement, because of the archaic way that the build system handles symbol visibility. All visible symbols are currently enumerated in exports.txt, which is a static textfile.

So the plan is to move the library to a Cmake-based build system. That would remove a lot of the build cruft and replace it with new cruft, and would presumably make it easier to add this sort of customization.

Would you be OK if I leave this issue open, but not resolve it for the time being?

from base64.

jbaldwin avatar jbaldwin commented on June 24, 2024

Yes, that sounds good to me. Thanks.

from base64.

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.