Hacker News new | ask | show | jobs
by throwanem 1046 days ago
> They are different types...

Okay, we have arrays and tuples in square brackets and parens respectively. Where do the angle brackets come in?

> when a routine accepts a lambda as a parameter, and [via runtime introspection] adapts its function depending on the number of arguments the lambda expects

I note from the article that Raku has explicit multiple dispatch. This appears to be the same thing by other means, but probably much harder to optimize.

If so, this would be an application of the same "TIMTOWTDI" principle that governed much of Perl 5's design. But that takes us back to the encouragement of idiolect and the fanaticism for idiosyncrasy, on which I have said a fair bit already. Beyond impugning "ease of writing poetry in it" as an absurd, counterproductive, and frankly twee desideratum in programming language design, I can find nothing more to add.

1 comments

> Where do the angle brackets come in?

The angle brackets are syntactic sugar for word quoting.

    <a b c>
is syntactic sugar for:

    ("a", "b", "c")
They can be used standalone. Or as postcircumfix on hashes:

    %foo<a>      # the value of key "a" in hash %foo
    %foo<a b c>  # the values of keys "a", "b", "c" in hash %foo
There's a lot more to it than that, but that's the gist of it.

https://docs.raku.org/language/quoting#Word_quoting:_%3C_%3E

Oh, okay, so it's just more sugar over Perl 5-style qw(), which is itself sugar over split().

I heard something once about "cancer of the semicolon"...