Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 1.23 KB

quirks.md

File metadata and controls

39 lines (33 loc) · 1.23 KB

Since we have released N 1, we must maintain backwards compatibility in minor releases. This has resulted in poor decisions that must be kept in the language until the next major release of N. The following list documents these quirks that will likely be removed.

  • imp filename has been changed to imp "filename.n" to allow for import paths to other folders.

  • The for i 10 syntax has been deprecated in favour of the for (i in range(0, 10, 1)) syntax. The old syntax only allowed an integer literal.

  • Integer exponentiation returns a float because negative powers could result in a non-integer (this is a bug in Elm), but this is inconsistent with integer division, which truncates towards zero. This will likely be changed in the future to an int.

  • Record aliases now declare a constructor function, which was not the case, so the type checker won't stop you from having a function with the same name already defined.

    • BUG: Declaring a variable with the same name as an alias after the alias definition will now result in an error when it didn't before.
  • Enum variant declarations and patterns still use the old <...> function calling syntax despite them being constructed with the new syntax variant(field1, field2).