<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
    主站蜘蛛池模板: 亚洲Av永久无码精品三区在线 | 亚洲人成影院午夜网站| 久久久久久久久免费看无码| 粉色视频免费入口| 亚洲线精品一区二区三区| 最近中文字幕电影大全免费版 | 亚洲精品午夜国产VA久久成人| 无码精品国产一区二区三区免费| 日本亚洲免费无线码| 久久久亚洲精品蜜桃臀| 100000免费啪啪18免进| 在线播放国产不卡免费视频| 亚洲国产日韩在线人成下载| 亚洲国产精品专区在线观看| 日韩欧毛片免费视频| a级毛片100部免费观看| 亚洲美国产亚洲AV| 亚洲成在人天堂在线| 一区二区三区亚洲视频| 19禁啪啪无遮挡免费网站| 国产精品免费一区二区三区| 日韩亚洲不卡在线视频中文字幕在线观看| 国产亚洲日韩一区二区三区| 成人免费毛片视频| 午夜视频免费在线观看| 美女黄频a美女大全免费皮| 亚洲免费福利视频| 亚洲av永久无码精品表情包| 亚洲?V无码成人精品区日韩| 日韩吃奶摸下AA片免费观看| 久久福利青草精品资源站免费| 黄色免费在线观看网址| 学生妹亚洲一区二区| 亚洲视频一区网站| 久久被窝电影亚洲爽爽爽| 亚洲国产av一区二区三区| 午夜色a大片在线观看免费| 97性无码区免费| 亚洲黄色免费网址| 久久99精品免费视频| 你好老叔电影观看免费|