-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
I started looking at Core__Array.resi and found inconsistencies regarding the usage of labeled arguments. Afaik, this is also true in other modules.
When should labeled arguments be used?
A convention should be found to provide a consistent api surface.
Examples from Core__Array.resi
copyWithin
all labeled arguments but the one being operared on:
external copyWithin: (array<'a>, ~target: int, ~start: int, ~end: int) => array<'a> = "copyWithin"fillInPlace
usage of labeled and non-labeled arguments within a single function:
@send external fillInPlace: (array<'a>, 'a, ~start: int, ~end: int) => unit = "fill"pushMany
no usage of any labeled arguments:
@variadic @send external pushMany: (array<'a>, array<'a>) => unit = "push"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels