[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-user
Subject:    Re: [groovy-user] @Mixin does not compile if code annotated with @TypeChecked or @CompileStatic
From:       Cédric Champeau <cedric.champeau () gmail ! com>
Date:       2012-10-24 13:42:51
Message-ID: 5087F05B.2060708 () gmail ! com
[Download RAW message or body]

Hi!

There is no plan to make @Mixin work with @TypeChecked or 
@CompileStatic, just because as you discovered, it is a runtime feature 
which heavily relies on runtime metaprogramming. I think what you're 
looking for is actually traits, maybe you can emulate that using a 
custom extension module ?

Le 24/10/2012 15:37, Michael Hartmann a écrit :
> I guess this is because the Mixin is mixed in at runtime. So the 
> compiler cannot know about it at compile time. Does anybody know 
> whether there any plans to have this work with @TypeChecked or 
> @CompileStatic? It's because pereformance with @TypeChecked or 
> @CompileStatic is much better ...
>
> Cheers, Oliver
> --------------------------------------------------------------------- 
> To unsubscribe from this list, please visit: 
> http://xircles.codehaus.org/manage_email 


-- 
Cédric Champeau
SpringSource - A Division Of VMware
http://www.springsource.com/
http://twitter.com/CedricChampeau


[Attachment #3 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi!<br>
      <br>
      There is no plan to make @Mixin work with @TypeChecked or
      @CompileStatic, just because as you discovered, it is a runtime
      feature which heavily relies on runtime metaprogramming. I think
      what you're looking for is actually traits, maybe you can emulate
      that using a custom extension module ?<br>
      <br>
      Le 24/10/2012 15:37, Michael Hartmann a écrit  :<br>
    </div>
    <blockquote
cite="mid:trinity-2387310d-7d07-448f-911a-bf44a578b7a5-1351085879397@3capp-webde-bs15"
  type="cite">
      <div style="font-family: Verdana;font-size: 12.0px;">
        <div>I guess this is because the Mixin is mixed in at runtime.
          So the compiler cannot know about it at compile time. Does
          anybody know whether there any plans to have this work with
          @TypeChecked or @CompileStatic? It's because pereformance with
          @TypeChecked or @CompileStatic is much better ...<br>
        </div>
        <div><br>
        </div>
        <div>Cheers, Oliver<br>
        </div>
      </div>
      ---------------------------------------------------------------------
To
      unsubscribe from this list, please visit:
      <a class="moz-txt-link-freetext" \
href="http://xircles.codehaus.org/manage_email">http://xircles.codehaus.org/manage_email</a>
  </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Cédric Champeau
SpringSource - A Division Of VMware
<a class="moz-txt-link-freetext" \
href="http://www.springsource.com/">http://www.springsource.com/</a> <a \
class="moz-txt-link-freetext" \
href="http://twitter.com/CedricChampeau">http://twitter.com/CedricChampeau</a></pre>  \
</body> </html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic