[perl #45697] [PROPOSAL][IMCC] Remove optional comma for sub flags

2007-09-24 Thread via RT
# New Ticket Created by  Klaas-Jan Stol 
# Please include the string:  [perl #45697]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=45697 


Hi,

.sub-routines have flags, such as :load, :main, etc.

These flags can currently be separated with a comma... or not. The comma is
optional.

For .params this is not true. .params can also take flags, such as
:optional, :named, etc, but they have no optional comma.

I do admit this is a minor issue, but nevertheless, I'm trying to remove as
much cruft from imcc.y as possible. Having optional syntax elements makes
the language unnecessarily complex and less readable, IMHO. More
importantly, some users will adopt the comma while others don't, resulting
in non-uniform looking code. Furthermore, ti would be more consistent with
.param flags syntax.

As the .param flags don't allow for commas to separate them I propose the
following.

I propose to remove the optional comma for .sub flags. By doing so, the
following is NO LONGER allowed:

.sub :load, :init :main ## newbies may wonder why there's a comma sometimes
#...
.end

Instead, it should look like this:

.sub :load :init :main
# ...
.end


regards,
kjs


Re: [perl #45697] [PROPOSAL][IMCC] Remove optional comma for sub flags

2007-09-24 Thread Bernhard Schmalhofer

Klaas-Jan Stol (via RT) schrieb:

.sub :load, :init :main ## newbies may wonder why there's a comma sometimes
#...
.end

Instead, it should look like this:

.sub :load :init :main
# ...
.end
  

The version without the ',' looks saner and consistency is a good thing.
So I second this proposal.

Regards,
 Bernhard



Re: [perl #45697] [PROPOSAL][IMCC] Remove optional comma for sub flags

2007-09-24 Thread Allison Randal

Klaas-Jan Stol (via RT) wrote:


I propose to remove the optional comma for .sub flags. [...]

sub :load :init :main
# ...
end


Agreed and approved. Please take the usual deprecation steps, and make a 
quick note of the syntax change in the draft PIR PDD 
(docs/pdds/draft/pdd19_pir.pod).


Thanks,
Allison