Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

If that is the case, then how can bareword filehandles be removed? Or are bareword filehandles supported in Perl7 but omitted from "Standard Perl" and our fellow monk WaywardCode was confused?

Backwards compatibility is my largest concern. The idea that even modern Perl can still run the Perl1 testsuite is impressive, far better than most languages have done, and probably a big part of the cause for the failure of Perl6 as Perl. (How it will fare as Raku is yet to be seen.)

Now that I think about it, "promoting" bareword filehandles to packages would solve the ambiguity in the IO syntax, at the price of requiring a full STASH for each global filehandle and some other internal changes, since *foo{IO} would refer to the nameless I/O slot in package foo instead of an I/O slot on a named GLOB foo. This is not so bad, since global filehandles should be rare and typically limited to main scripts, with =IO references being more common in modules and subroutines, although Symbol's geniosym probably would need to become a builtin XSUB. The idea is that a GV would no longer contain an I/O slot, instead associating an I/O slot to each stash.

The package/filehandle conflict is one of the few actual problems with bareword filehandles in Perl, and I believe this change would solve that problem with minimal impact on backwards compatibility. I believe this could also allow barewords to always parse as package names, another ambiguity resolved if package names evaluate to themselves as strings.


In reply to Re^5: Modernizing the Postmodern Language? by jcb
in thread Modernizing the Postmodern Language? by WaywardCode

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 wandering the Monastery: (6)
As of 2024-04-24 09:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found