You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "David Reiss (JIRA)" <ji...@apache.org> on 2010/03/11 19:24:27 UTC

[jira] Commented: (THRIFT-434) ruby compiler should warn when a reserved word is used

    [ https://issues.apache.org/jira/browse/THRIFT-434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844157#action_12844157 ] 

David Reiss commented on THRIFT-434:
------------------------------------

What do other committers think about this?  I know we have at least one .thrift file at Facebook that uses "end" as an identifier (we're not really a Ruby shop), so I think we would have to patch this internally to take that out of the list.  Should we make exceptions for rare reserved words?  I know "from" is a keyword in Python.  Should we add that to the list?

> ruby compiler should warn when a reserved word is used
> ------------------------------------------------------
>
>                 Key: THRIFT-434
>                 URL: https://issues.apache.org/jira/browse/THRIFT-434
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General), Compiler (Ruby)
>            Reporter: Michael Stockton
>            Assignee: Michael Stockton
>            Priority: Minor
>             Fix For: 0.3
>
>         Attachments: thrift-434-v2.patch, thrift-434-v3.patch, thrift-434.patch
>
>
> It would be nice if the compiler would warn or fail when a reserved word is used as a struct name, service name or field name. The following names should be avoided:
> __FILE__ 
> and
> def
> end
> in
> or
> self
> unless 
> __LINE__
> begin
> defined?
> ensure
> module
> redo
> super
> until 
> BEGIN
> break
> do
> false
> next
> rescue
> then
> when 
> END
> case
> else
> for
> nil
> retry
> true
> while 
> alias
> class
> elsif
> if
> not
> return
> undef
> yield 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.