<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 山風小子 閱讀(431) 評論(0)  編輯  收藏 所屬分類: Groovy & Grails
    主站蜘蛛池模板: 亚洲免费观看网站| caoporn成人免费公开| 四虎影视精品永久免费| 一区二区视频免费观看| 亚洲人成影院在线| 午夜毛片不卡免费观看视频| 香蕉免费看一区二区三区| 亚洲欧洲国产视频| 免费一级毛片在线播放不收费| 久久国产免费一区| 亚洲av无码专区在线观看下载| 日本红怡院亚洲红怡院最新| 九九九精品成人免费视频| 国产免费久久精品丫丫| 最新亚洲卡一卡二卡三新区| 亚洲人成色7777在线观看| 免费可以在线看A∨网站| 中文字幕在线视频免费| 亚洲日韩国产一区二区三区在线 | 日韩在线视频免费| 亚洲导航深夜福利| 久久精品国产精品亚洲人人| 国产大片免费网站不卡美女| 一二三区免费视频| 亚洲色偷精品一区二区三区| 久久久久亚洲av无码专区蜜芽| 免费在线精品视频| 最新69国产成人精品免费视频动漫| 国产免费拔擦拔擦8X高清在线人| 亚洲AV无码AV吞精久久| 亚洲激情黄色小说| 亚洲码国产精品高潮在线| 日本最新免费不卡二区在线| 99久久99久久免费精品小说| xxxxx做受大片在线观看免费| 亚洲中文字幕无码久久2020 | 久久乐国产精品亚洲综合| 女人张开腿给人桶免费视频| 十八禁无码免费网站| a毛片全部免费播放| 四虎永久在线精品免费一区二区|