Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I agree. And it's probably not going to be a hard patch. But there will be the backwards compatability police - as adding 'say' as a keyword might possibly break existing code.

* grepping old sources *

Funny. Seems it might "break" one module I made a long, long time ago:

sub say { print(STDOUT @_); if ($_[$#_] !~ /\n$/) { print(STDOUT "\n"); } }
As far as I can tell, it was written in 1997 or 1998. I can live with that breaking (it seems to be doing something similar to Perl6::Say anyway - although I can't tell anymore whether adding the newline, or the printing to STDOUT was the main feature for it). But, if proposed, someone is bound to make the unsupported claim that "thousands and thousands of programs will be broken".

Hmmm, looking at the code I digged up I can see the charm of a print function that adds a newline only if the string to print doesn't end with a newline. Kind of like chomp only chopping of newlines.


In reply to Re^5: (Sort of) poll: what Perl6 features do you consider {likely,desirable} to leak into P5? by Anonymous Monk
in thread (Sort of) poll: what Perl6 features do you consider {likely,desirable} to leak into P5? by blazar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found