[ https://issues.apache.org/jira/browse/GROOVY-9296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Sun updated GROOVY-9296: ------------------------------- Description: (http://groovy.329449.n5.nabble.com/GEP-Import-TypeChecked-CompileStatic-and-CompileDynamic-by-default-tt5761771.html) As static groovy is widely used, importing {{groovy.transform.TypeChecked}}, {{groovy.transform.CompileStatic}} and {{groovy.transform.CompileDynamic}} again and again makes user experience not very good. So I propose to import the classes by default. For example, After GEP accepted: {code:java} @CompileStatic def hello { println 'hello' } {code} Before GEP accepted: {code:java} import groovy.transform.CompileStatic @CompileStatic def hello { println 'hello' } {code} was: As static groovy is widely used, importing {{groovy.transform.TypeChecked}}, {{groovy.transform.CompileStatic}} and {{groovy.transform.CompileDynamic}} again and again makes user experience not very good. So I propose to import the classes by default. For example, After GEP accepted: {code:java} @CompileStatic def hello { println 'hello' } {code} Before GEP accepted: {code:java} import groovy.transform.CompileStatic @CompileStatic def hello { println 'hello' } {code} > [GEP] Import `TypeChecked`, `CompileStatic` and `CompileDynamic` by default > --------------------------------------------------------------------------- > > Key: GROOVY-9296 > URL: https://issues.apache.org/jira/browse/GROOVY-9296 > Project: Groovy > Issue Type: Improvement > Reporter: Daniel Sun > Assignee: Daniel Sun > Priority: Major > Fix For: 4.x > > > (http://groovy.329449.n5.nabble.com/GEP-Import-TypeChecked-CompileStatic-and-CompileDynamic-by-default-tt5761771.html) > As static groovy is widely used, importing > {{groovy.transform.TypeChecked}}, {{groovy.transform.CompileStatic}} and > {{groovy.transform.CompileDynamic}} again and again makes user experience not > very good. So I propose to import the classes by default. For example, > After GEP accepted: > {code:java} > @CompileStatic > def hello { > println 'hello' > } > {code} > Before GEP accepted: > {code:java} > import groovy.transform.CompileStatic > @CompileStatic > def hello { > println 'hello' > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)