Language Design: Naming Conventions

Part 3: Lookup

Published on 2022-06-07. Last updated on 2022-07-26
Name Example Explanation

Array(12.3, 45.6)(0)

someList(1)

someMap("key")

  • retrieves the value at the given index/key
at Array(12.3, 45.6).at(1)
  • returns a reference to the given position in the array
contains

someList.contains(1)

someMap.contains("key")

  • checks whether container includes a value, as determined by an equality check (==)
includes

someList.includes(1)

someMap.includes("key")

  • checks whether container includes a value, as determined by an identity check (===)