HN user

b2d

3 karma
Posts0
Comments2
View on HN
No posts found.

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);
    }
  }
Try Haxe 14 years ago

This is just a bunch of unverified blanket statements and what-ifs. From my own experience, I can tell they don't apply to Haxe. Also, Haxe is revolutionary, but to understand that, you'd have to actually use it in production.