Gleam: Escape function names if they collide with Erlang keywords

Created on 6 Feb 2019  路  2Comments  路  Source: gleam-lang/gleam

Keywords

  • if
  • case
  • !
  • receive
  • bnot
  • div
  • rem
  • band
  • bor
  • bxor
  • bsl
  • bsr
  • not
  • and
  • or
  • xor
  • orelse
  • andalso
  • when
  • end
  • fun
  • try
  • catch
  • after
help wanted

Most helpful comment

I don't want to tie the language to the the syntax of the compile target too much, at least not yet. I could imagine a future were we compile to Javascript, WASM, Go, etc- would we also add the keywords of those languages to Gleam's reserved words?

All 2 comments

Or maybe instead of escaping the function names, do not allow these names at all?

I don't want to tie the language to the the syntax of the compile target too much, at least not yet. I could imagine a future were we compile to Javascript, WASM, Go, etc- would we also add the keywords of those languages to Gleam's reserved words?

Was this page helpful?
0 / 5 - 0 ratings