Day 24 – In Search of the Essence of Raku

Amongst all of its features, what do we consider to be the essence of Raku? In this advent post we will explore what makes Raku an exciting programming language and see if we can describe its essence.

Paul Graham wrote an essay about the 100 year language, back in 2003. In it he had this to say:

Who will design the languages of the future? One of the most exciting trends in the last ten years has been the rise of open-source languages like Perl, Python, and Ruby. Language design is being taken over by hackers. The results so far are messy, but encouraging. There are some stunningly novel ideas in Perl, for example. Many are stunningly bad, but that’s always true of ambitious efforts. At its current rate of mutation, God knows what Perl might evolve into in a hundred years.

Larry Wall took Paul Graham’s essay and ran with it:

“It has to do with whether it can be extensible, whether it can evolve over time gracefully.”

Larry referred to the expressiveness of human languages as his inspiration for Raku:

  • Languages evolve over time. (“It’s okay to have dialects…”)
  • No arbitrary limits. (“And they naturally cover multiple paradigms”)
  • External influences on style.
  • Fractal dimensionality.
  • Easy things should be easy, hard things should be possible.
  • “And, you know, if you get really good at it, you can even speak CompSci.”

Naoum Hankache’s Raku Guide introduces Raku:

Raku is a high-level, general-purpose, gradually typed language. Raku is multi-paradigmatic. It supports Procedural, Object Oriented, and Functional programming.

The feature list on Raku.org goes further:

  • Object-oriented programming including generics, roles and multiple dispatch
  • Functional programming primitives, lazy and eager list evaluation, junctions, autothreading and hyperoperators (vector operators)
  • Parallelism, concurrency, and asynchrony including multi-core support
  • Definable grammars for pattern matching and generalized string processing
  • Optional and gradual typing

In Search of the Essence

As we can see, Raku has many rich features. Maybe the essence of Raku lies somewhere among them.

Deep Unicode

It’s the 21st Century and programming languages are finally waking up to the fact that we live in a multi-lingual world. Raku is a Unicode centric language in a way that no other language manages.

Rich Concurrency

Again programming languages are only beginning to catch up with the reality that every computer has multiple cores. Sometimes very many cores. Raku excels, alongside other modern languages, at delivering the tools required for effective concurrent and asynchronous programs.

Multi Paradigm

Raku is a richly functional language that combines the procedural and object oriented encapsulation constructs to span paradigms.

A Cornucopia of Language Features

Multi Language with Slangs and Inlines

  • Many languages in the same execution unit. No need to be an async/ IPC boundary away.
  • Representational polymorphism

The breadth of the Raku language is indeed impressive. But I don’t think it’s instructive, or even possible to try and distill an essence from such a diverse list of capabilities.

What then, is the Essence of Raku?

Perl and Raku both adhere to the famous motto:

TMTOWTDI (Pronounced Tim Toady): There is more than one way to do it.

This is indeed demonstrably true as shown by Damian Conway whenever he blogs about or talks about Raku. Indeed in Why I love Raku he sums up with this endorsement:

More than any other language I know, Raku lets you write code in precisely the way that suits you best, at whatever happens to be your (team’s) current level of coding sophistication, and in whichever style you will later find most readable …and therefore easiest to maintain.

How do you identify the essence of a deliberately broad multi-paradigm language? Perhaps the essence is not so much about some aspect of the core language. Perhaps it is much more about the freedom it gives you to choose, instead of the language choosing for you.

Like Raku, the community is not opinionated. If you choose a particular approach, the community is there to help you. If you want to learn what’s possible, the community will offer up multiple approaches, as shown by many Stack Overflow answers.

Which leaves me with this thought:

The essence of Raku is the freedom to choose for yourself. And the freedom to choose differently tomorrow.

2 thoughts on “Day 24 – In Search of the Essence of Raku

Leave a reply to Anonymous Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.