IMO Raku has three standout features:
1. Grammars in the stdlib [1]
2. The absolute most flexible multi-dispatch system of any programming language [2]
3. The best regex syntax of any programming language [3]
In 2015, I had to write a DSL for a double-entry accounting system. That's when I discovered @jnthn's Perl 6 grammar debugger [4], which allowed stepping through a Perl 6 grammar line by line and visually seeing how the grammar was consuming a string. At that time I had very little programming experience, which made Perl 6 far and away the easiest way to write a custom DSL parser.
If you enjoy Erlang/Elixir multi dispatch, e.g.
def format({:ok, %HTTPoison.Response{body: body, status_code: 200}}) do
body
|> Meeseeks.parse(:xml)
|> Meeseeks.all(xpath("/*"))
|> Enum.map(&Meeseeks.tree/1)
|> _format
end
defp _format([{"current_observation", _version, current_observation}]) do
current_observation
|> Enum.map(&_format/1)
|> Enum.filter(& &1)
|> Enum.into(Map.new())
|> Poison.encode!()
end
defp _format({"credit", _, [credit]}) do
{:credit, credit}
end
defp _format({"credit_URL", _, [credit_url]}) do
{:credit_url, credit_url}
end
Raku does that in an even more flexible manner, destructuring included. I love how declarative it makes the code read.However, I must say I've left the honeymoon phase of Raku far behind me now. In my experience, Raku grammars are insanely slow: at least as of many years ago, it was taking ~40 minutes to parse a ledger-style accounting format log file that wasn't even very big. When jnthn's grammar debugger got really buggy and less actively maintained, that defeated one of the biggest reasons I had to use the language. I've also experienced numerous bugs with Raku's type system, and just in general wouldn't write many things in Raku.
But to your question — I would write even less things in Perl 5. I have no use for Perl 5 now that Raku exists, and don't know why anyone would write Perl 5 in the modern day given how many other compelling options exist in its niche. Raku is different, and it deserves to see top caliber core development. It doesn't have that yet, and that's sad.
Frankly Raku isn't capable of replacing really any mature programming language for anything but informal scripting tasks where you don't care about speed, and where you don't need an “academic” tier type system. For those tasks, it is quite a fun language. I remain optimistic about Raku's future, and would seriously question the conventional wisdom of using Python or JS in its place for many, many things.
[1]: https://github.com/atweiden/config-toml/blob/master/lib/Conf...
[2]: https://github.com/atweiden/txn-remarshal/blob/master/lib/TX...
[3]: https://docs.raku.org/language/regexes