hylo-lang / hylo

The Hylo programming language

Home Page:https://www.hylo-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disambiguate the syntax of remote types/values

kyouko-taiga opened this issue · comments

The following expression is currently ambiguous: remote let Int

We don't know whether Int should be read as a value, in which case we'd get a remote value, or as a reference to a type declaration, in which case we'd get a remote type expression. This situation is analogous to the ambiguity of (Int, Int) should we have only one syntax for both tuple values and tuple types.

We need to disambiguate the situation by picking a different syntax for either remote values or remote type expressions. I propose to keep the syntax of type expressions unchanged and use [let]n for a remote value. Here's how that would look in code:

let x = 42
let y: remote let Int = [let]x

Alternative considered so far:

  • @let x
  • &let x
  • *let x
  • %let x