Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

comment on

( #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

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (7)
    As of 2021-04-19 08:39 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found