Comment

Comment by kvemkon

> Before P2996, generating Python bindings required either:

I'm missing nanobind here.

> Method lookup. Python sees a.dot and searches for the dot attribute. It checks a.__dict__,

> Each attribute access (self.x) involves:

    Dictionary lookup in self.__dict__
Since C++ classes are fixed, I'd expect attributes to be declared once in python (slots).

One thing yet important for cross-language projects: callbacks (events). Would be nice if the sample could be extended.

parent kvemkon 11 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton