Better HN
topnewbestaskshowjobs
Log inSign up

b2d

3 karma · joined Mar 5, 2012 (14y ago) · 4 submissions

Submissions

comment 7y ago · link · parent

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);
    }
  }

comment 14y ago · link · parent

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.