You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2008/11/11 19:27:44 UTC
[jira] Commented: (PIG-519) allow for '#' to signify a comment in a
PIG script
[ https://issues.apache.org/jira/browse/PIG-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646617#action_12646617 ]
Alan Gates commented on PIG-519:
--------------------------------
'#' already has a meaning in pig as the dereference operator for maps. The current parser does successfully distinguish between a # comment and map#key, but this is do to the particular parser used and the rather strange division of parsing between grunt and pig. I don't want to tie ourselves to either of these artifacts of the current implementation. Also, I think it is somewhat confusing to users (e.g., I've never liked the way ':' has at least 5 different meanings in C++). Plus, do we need two different comment operators (-- and #)?
Is your only goal to allow #! at the head of a script to work? If so, I think explicitly allowing #! at the head of a line would be a fine addition to the language, and not suffer from the issues I point out above.
> allow for '#' to signify a comment in a PIG script
> --------------------------------------------------
>
> Key: PIG-519
> URL: https://issues.apache.org/jira/browse/PIG-519
> Project: Pig
> Issue Type: Wish
> Components: grunt
> Environment: linux/unix
> Reporter: Ian Holsman
> Priority: Trivial
> Attachments: comment.patch, pig.pig
>
>
> in unix type operating systems, it is common to just run scripts directly from the shell.
> In order to do this scripts need to have the command to run them on the first line similar to
> #!/usr/bin/env pig -
> this patch allows you to just run scripts without specifying pig -f XXX
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.