api-guidelines icon indicating copy to clipboard operation
api-guidelines copied to clipboard

Best practices to consider when writing an API for your library

Results 12 api-guidelines issues
Sort by recently updated
recently updated
newest added

It would be nice to explain and provide recommendations regarding usages of various types in public API. The overall recommendations should make a clear distinction between _arithmetic_ types (e.g. `Int`,...

While reading through I found these inconsistencies.

Accordingly to the section [Use member and extension functions appropriately](https://kotlinlang.org/docs/jvm-api-guidelines-readability.html#use-member-and-extension-functions-appropriately), _only properties, overrides and accessors should be members_. But what about operator overloads? For example, considering the following `NotEmptyString` class,...

This recommendation is a natural extension over "avoid varargs". There are enough arguments for that (mutability, covariance, no compile-time safety). The question is whether it is applicable enough to be...