News for hackers. Stuff that matters.
Re:Ask HN: What metaprogrammable language do you/would like ... by b2d on Tuesday April 23, 2019 @06:18AM (#19727116)
Incorrect. To quote the page you've linked: "For the most part, this type is identical to Expr, but it allows constraining the type of accepted expressions." or otherwise put: ExprOf only affects macro arguments, not return value. What you want is this:

  class StringGetter {
    public static macro function getString() {
      var s:String = "";
      return macro ($v{s} : Int);
    }
  }

There are no comments on this comment yet.