ponyc icon indicating copy to clipboard operation
ponyc copied to clipboard

Naming conventions of the runtime functions for the standard library

Open Praetonus opened this issue 7 years ago • 1 comments

In #554, the decision was made to add prefixes to exposed runtime functions, with pony_ for public ones, and ponyint_ for private ones. Functions used in the standard library (for example for networking, files, etc.) were put in the public bucket, and prefixed with pony_. I'd like to propose that we revisit this decision, for two reasons.

  • After 1.0, we'll have to guarantee retrocompatibility on public runtime functions. The standard library uses a lot of helper functions in the runtime and this seems like a very large maintenance burden.
  • Any future alternative runtime implementation would have to provide these functions, even if they have no need for some of them in their implementation of the standard library.

The new rules I'm proposing are:

  • Functions available in pony.h should be marked pony_.
  • Every other publicly linked function should be marked ponyint_.
  • RFCs can be proposed to add a public API to an internal section of the runtime if the need arises.

Praetonus avatar Apr 13 '18 15:04 Praetonus

I think we need to have some form of public ASIO API. It is needed for anyone that wants to have custom logic for dealing with I/O. I think Wallaroo is an example of this, and there may be others.

So maybe the Pony ASIO API RFC is a prerequisite for this.

jemc avatar Apr 16 '18 15:04 jemc