Skip to content

Better naming? #3

@dimsuz

Description

@dimsuz

I would be interested in using this lib, thought about writing something alike after reading this article (which is very nice!).

But your naming puts me off a bit. All these cryptic "nel"s :)

Wouldn't it by nicer to have something like:

  • nonEmptyListOf()
  • toNonEmptyList()
  • etc

It's not much longer than what we already have in stdlib, like linkedMapOf, mutableSetOf which are of similar length.

Or even like in Haskell/PureScript: drop List from the end: nonEmptyOf(), etc. Though this would require having NonEmpty<T> instead of NonEmptyList<T> for symmetry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions