Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

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

Perl6 like Perl5 is a high-level language that is able to reach down to low-level things like bit strings and fine-grained control over system calls. With XS and the the FFI C is part of the Perl5 language. Perl6 has a much improved FFI. One of the goals of Perl6 is to have compilation and as far as I remember that includes JIT, precompilation, partial precompilation, separate compilation, and optimizations. Perl6 supports optional static typing for faster and safer programs.

Go, Rust, and D on the other hand are systems languages but are not so low-level as C. They are all growing toward higher-level concepts but retaining as much compilation speed and runtime speed as they can.

Go for example has goroutines, maps, slices, a continue for loops, support for imaginary and complex numbers, labelled goto, methods, a return of possibly multiple values, panics, channels, and more. It compiles quickly for fast development iterations. It has regular expressions in its standard library (although they aren't as integrated into the language as in Perl). Strings, although immutable, are a separate type from characters and aren't just bare character arrays.

Rust has vectors that support push and pop. It has variable interpolation. It has traits and dynamic dispatch. You can pass closures. Its match is closer to Perl's smartmatch than to a C switch. The 'if' block is an expression rather than a statement, so it can return a value to a 'let'. This is a great generalization of something like the ternary operator or Puppet's setcode() or Puppet's case statement. It supports channels for communication. There are both references and pointers. Rust's regex library supports iterating over capture groups, supports named and numbered captures, supports character classes, and more.

D's regex library is part of the standard library. It supports matches, splits, replaces, etc. D has associative arrays built into the language. It has mixins, operator overloading, contracts, attributes, traits, exceptions, and try/catch/finally/throw.

Go and D are garbage collected. What I've mentioned just scratches the surface. That I've mentioned a feature for one of the three doesn't mean it doesn't exist in the other two. Some of the features in these languages actually borrow from Perl, Python, and Ruby in syntax or inspiration.

There's a lot of growing downward from higher-level languages these days. Perl has always been at the forefront of allowing one to reach down into the system a bit. There's a lot of growing upward from some of these newer low-level languages, too. As people look at object-oriented, perhaps compiled or JIT compiled, modular languages with strong standard libraries and the ability to prototype and iterate quickly I see Rust, D, and Go as a niche just adjacent to Perl6, Clojure, and perhaps Lua.


In reply to Re^3: The future of Perl? by mr_mischief
in thread The future of Perl? by BrowserUk

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 drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-28 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found