Skip to content

Some comments on the Array module #51

Description

@glennsl
  • from is unsafe (not soundly typed), but not marked as such
  • So is fromWithMap. It's also misleadingly named, suggesting it takes a Map data structure as an additional argument, when in fact it wants a map function. The latter goes for all *WithMap functions, but I won't repeat myself for every one of them. A better naming scheme for these might be mapFrom*?
  • *WithIndex is a really common and quite verbose pattern. I would suggest special casing this and use just an i suffix for this, e.g. mapi instead of mapWithIndex. I think it's common enough that this makes sense.
  • indexOfFrom and lastIndexOfFrom are not very intuitively named. Perhaps indexOfStartingFrom would be better?
  • getSymbol seems like it would return a symbol, rather than what is pointed to by a symbol. getBySymbol and setBySymbol might be better names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions