<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    First they ignore you
    then they ridicule you
    then they fight you
    then you win
        -- Mahatma Gandhi
    Chinese => English     英文 => 中文             
    隨筆-221  評論-1047  文章-0  trackbacks-0

    The JSR Venture


    Stelligent: Ok good, I feel better now. Back to Groovy-as anyone who's kept an eye on Groovy over the last year or so would know, the syntax changed with the new JSR parsers. Why was that done? Can you elaborate on the decisions that were made?

    Guillaume: It's hard to summarize all the decisions and motivations that lead us to introduce syntax changes. But the general idea and main goal was to bring more predictability and readability to your Groovy programs. And let me say that in fact, the changes aren't very big usually, and are easy to fix, thanks to the documentation we've set up on the website to ease the transition.

    Let's take an example: requiring def when defining variables or methods when no type is specified. In certain cases, it was difficult to know whether we were defining a new variable shadowing an existing one, or reusing the existing one. It was hard to know by looking at the source code what the user intended: Groovy could misunderstand the original intent and create a local variable instead of reusing a variable already present in an outer scope. Using def makes the intent clearer: we're defining a new variable, and we can't mistake it as an assignment.

    Another example: using @Property to create class properties with automatically generated getters and setters. Before this annotation, getters and setters were generated if no particular visibility was set. But it wasn't that clear whether your fields would or wouldn't have getters/setters generated. Now, with a particular annotation, we know the intent of the developer, and it is much clearer when reading others' code. The source code must be easily parsable both by the developer and by the parser. But we often preferred making the developer's task easier, rather than amplifying our work on the parser front. I think we're on the right track to make Groovy code crystal clear.

    Stelligent: I didn't find the migration process all that difficult, myself. There weren't any big surprises either. What's left to do before Groovy is considered 1.0?

    Guillaume: There are two things to consider: on one hand, we have the Groovy binary release that will be the Reference Implementation (RI) of JSR-241, and on the other hand, we have the Test Compatibility Kit (TCK) and the Groovy Language Specifications (GLS). Those are three artifacts that must be produced by the JSR process and the Groovy development team. I think it is going to take more time to have the TCK and GLS than to have a final release for the RI.

    For me, the 1.0 release of Groovy will be the RI release, so I'll concentrate on explaining what's left to do for that deliverable, letting aside the GLS and TCK. It may also happen that while finalizing the GLS and TCK, the Groovy version matching the spec will be 1.1. Time will tell.

    So back to the items on our to-do list towards the final release...

    We need to properly implement the return/break/continue semantics in closures. The current behavior is a bit inconsistent, and is closer to the standard method semantics. But closures are specific beasts that need particular handling (should return return from the closure like a mere Java method, or should it return from the method calling the closure? etc.)

    Some changes are in order for the builders, perhaps with a particular with Builder notation, which will allow us to distinguish standard code to builder code. It's needed because we've hit limitations in the builders, especially the markup builder which cannot properly create namespace-aware XML, or with tags containing hyphens, because the colon and the hyphen characters aren't valid Java identifier characters. And also because we can't always discern what is a real method call from a markup method call that creates new nodes.

    We will also make some changes in the operator overloading area (particularly how the methods are named corresponding to the operator), and we may also provide a specific syntax for Groovy to support operator overloading, like operator +(a, b) {...}. The rest is more of implementation details than real changes, and there are some key language features which don't work yet perfectly -- for instance, the synchronized keyword is not supported yet.

    We maintain an almost up-to-date To-do page on Confluence regarding the things we need to do before the final release: http://docs.codehaus.org/display/GroovyJSR/To+Do+1.0

    As you can see, there's still a fair amount of work to do, the devil is in the details, but we're not that far from a final release.

    Stelligent: When someone says "merci" how should one properly respond in true French?

    Guillaume: Usually, we answer "de rien" (meaning "no need to thank me for that"). But it depends on the context. If you thank me for the interview or something like that, I'd tend to answer "C'était un plaisir" (it's been a pleasure) :-) Or even "De rien, c'était un plaisir".

    原文地址:http://www.stelligent.com/content/articles/article.php?topicId=81&pageName=The+JSR+Venture
    附:Groovy輕松入門——Grails實戰之GORM篇
    posted on 2007-04-16 20:19 山風小子 閱讀(428) 評論(0)  編輯  收藏 所屬分類: Groovy & Grails
    主站蜘蛛池模板: 一级毛片免费全部播放| 亚洲国产精品久久久久秋霞小| 黄视频在线观看免费| 免费一级毛片正在播放| 国产成人亚洲精品播放器下载| 又爽又高潮的BB视频免费看| 美女无遮挡免费视频网站| 亚洲男人的天堂一区二区| 中文字幕在线视频免费观看| 亚洲熟妇无码乱子AV电影| 两个人的视频www免费| 久久久亚洲精品国产| 国产2021精品视频免费播放| 亚洲 日韩经典 中文字幕| 国产伦精品一区二区三区免费迷| 老司机午夜在线视频免费| 国产成人综合亚洲AV第一页| 日本免费高清视频| 亚洲偷自精品三十六区| 又爽又黄无遮挡高清免费视频| 国产免费高清69式视频在线观看| 亚洲av色福利天堂| 成人免费无码大片a毛片软件 | 亚洲黄色网站视频| 成年性生交大片免费看| 国产成人久久精品亚洲小说| 亚洲色欲久久久综合网| 亚洲免费二区三区| 日日狠狠久久偷偷色综合免费| 亚洲国产精品成人久久| 岛国大片免费在线观看| 中国国产高清免费av片| 亚洲另类精品xxxx人妖| 四虎永久免费观看| 24小时在线免费视频| 美国毛片亚洲社区在线观看| 亚洲尤码不卡AV麻豆| 妞干网在线免费视频| 成人爽a毛片免费| 亚洲欧美国产国产综合一区| 亚洲女同成av人片在线观看|