Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

comment on

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

For me, personally, the "Low-Magic Perl Commandements" do not really read like a technical list of things that are supported or unsupported. I think it would fare better with a preamble of "These are the features that you will need to write your code to such that RPerl can support it". But reinterpreting them as a technical list of things that are supported or unsupported, there are some commandements that will hinder RPerl to become ever usable for me:

17. THOU SHALT NOT:Use Dynamic-Type Data, Auto-Vivification, Or Tied Variables

This means that DBI and DBD::* are right out of the window without major retooling of DBI and all related code not to rely on tie'd hashes.

19. THOU SHALT NOT: Use Private Dynamic-Scope (“local”), Private Persistent Lexical-Scope (“state”), Global, Or Package Variables (“our”)

Of course, global variables have their place and are highly useful, for example as global defaults. Whenever there is a lexical variable in global scope, that lexical variable should be a global variable in case somebody really wants to override it. Maybe some arguments as to why avoiding local and global variables would be good. For example, such variables make reasoning about value escape much, much harder and preclude some optimizations. But taken as an absolute, they are not good recommendations.

21. THOU SHALT NOT: Use Typeglobs, Code References, Weak References, Or Magic Lvalues (Builtins, Non-Variables, Non-Slices, etc)

I'm not sure what the technical gain here is. But without code references every dispatch table flies out of the window. Without weak references you can't really implement trees or doubly-linked lists or other data structures in a way that enables the reference-counted memory management to clean up such structures automatically.

23. THOU SHALT NOT: Use Aliased, Non-Descriptive, Special ($1, $a, %ENV, %SIG, etc), Or Punctuation Variables ($_, @_, %!, $@, $$, etc)

What is the technical reason for RPerl to not allow access to those variables?

35. THOU SHALT NOT: Use Taint Mode

This is a WTF as written. Taint mode relies heavily on magic, so I understand the technical reason for this but it needs some more elaboration. The corresponding "THOU SHALT" of "34. Use Secure Platforms & Trusted Data" moves this recommendation into rainbow unicorn country. If we're able to make wishes come true, why doesn't rule 34 say "THOU SHALT WRITE FAST,SHORT,CORRECT AND EASILY UNDERSTOOD PROGRAMS" and replace all preceding and following rules instead?

I find the reliance on PBP and Perl::Critic makes it an instant turn-off because much of PBP isn't that great a practice without further review and adaption to the situation at hand. This is recommended on the first pages of PBP, but I found people referring to PBP always took PBP as literal gospel instead of reviewing the recommendations before applying them.

In reply to Re^3: Perl 5 Optimizing Compiler, Part 15: RPerl v1.2 Kickstarter Now Live by Corion
in thread Perl 5 Optimizing Compiler, Part 15: RPerl v1.2 Kickstarter Now Live by Will_the_Chill

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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-06-22 09:10 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.