Skip to content

design discussion #1

@timotheecour

Description

@timotheecour

(migrated from FedeOmoto#4)

  • reference type inputs shouldn't be returned
    eg: in
proc set*(z, x: Int): Int =
  ## Sets `z` to `x` and returns `z`.
  result = z
  mpz_set(result[], x[])

it's misleading and un-necessary to return z given that z gets modified; nim code doesn't usually do that, and for good reasons.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions