Skip to content

luabind policies opinions #20

Description

@decimad

This is a message I would have liked to post on the luabind message list, but it doesn't seem to be maintained anymore so I can't get moderator approval.

Hello,

I'm currently working on a fork of luabind that gets rid of all boost
dependencies and makes use of c++11 unconditionally, so there are no
header-variadic-simulations left, which (aside from the enormous
boost/mpl includes) basically brought my visual studio to crawl and made
intellisense in any code using luabind pretty much unusable.
To put this into a context: I want to be able to add stuff like custom
indexer operators etc. and found that I just could not understand
luabind. It's utterly complex and its internals are pretty much
undocumented. So I'm basically applying transforms to a beast that I
don't yet understand completely while trying to maintain existing test
compatibility.

Currently I'm reworking the policy system. I found that luabind uses
policies for argument conversion (obviously necessary) and "call-static"
policies. It puts them together in one big list and when specific
policies are necessary, it searches in the policy list for policies.
This causes that converter policies are specialized for the occurance
index in call signatures, slow searches everywhere etc. That's why my
current attempt is having a converter-policy list that matches the
signature type list and a "call static" policy list. So my questions to
the ones that grasp current luabind's policy system: Do you see an
obvious problem in the long run with this pattern? Has any converter
policy ever been dependant on the argument index it was specialized for?
I could not find any occurance of this dependency but maybe I'm breaking
everything here.

With Kind Regards
Michael

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions