component-model icon indicating copy to clipboard operation
component-model copied to clipboard

`overload` convention

Open oovm opened this issue 1 year ago • 1 comments

Currently, each function has a different name.

Can we add #overload(target_name) to require languages that support overloading to generate an overloaded version of the function?

Different languages have different overload resolutions, so the selected function instances will be different.

This is an unsafe ffi operation, so it is just a overload suggestion.

The overload version is generated based on the original version.

In case of error resolution, the user can manually call the function of the original version.

oovm avatar May 12 '24 03:05 oovm

That's a good question, and it's something we're also discussing in #331, based on a slightly different use case. My current best working theory is in this comment.

lukewagner avatar May 13 '24 23:05 lukewagner