Skip to content

Convenience types and methods #58

Description

@IngwiePhoenix

Hey.

When working with objects in a C++ function, it turns out that its quite hard to avoid boilerplate code.

I would like to make a few suggestions:

  • Offer wrapper types to access values in objects/arrays. Example: OS::Object obj = os->toObj(...); std::string str = obj["foo"];
  • Offer convenience methods to convert arrays into lists: OS::List ls = os->toList(...); std::string str = ls[0];

I am mainly asking, since I am trying to write a converter between (VarObject)[https://github.com/eJimLee/VarObject] and an OS Object.

I just can't seem to find a "good" way of doing it. So having a method provided by the internals would be very nice. Do you think this could be implemented?

Kind regards, Ingwie.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions