3 ms·
is it mind boggling? depends on what you mean Every time I look at an example I am turned off and my mind is in a way "boggled" ... I just opened the tutorial
by glofish 5y ago
is it mind boggling? depends on what you mean
Every time I look at an example I am turned off and my mind is in a way "boggled" ...
I just opened the tutorial on the Raku site I see this
say looks_like_number "foo";
I find this awful,
right from the beginning, the say turns me off, computers do not speak, at least I really hope the computer is not actually speaking when I type that. Then there are the weird rules of quoting to not quoting ... I can't quite tell the rules are
the example is unpalatable, why does the looks_like_number word have underscores? is that a odd variable name that needs underscores? but it looks like a message to the user, what a terrible choice either way!
what does this print? I can't tell ...
- elcaro 5y ago> right from the beginning, the say turns me off, computers do not speak This seems a bit of an odd argument. You've never heard the phrase "The sign says ...", or asked someone "What does the error message say?" That said, `say` is just a normal function, and you could always bind a new function and use that instead.
- unixhero 5y agoI mean that for instance you can define what the language should look like. It has meta programming and dialect functionality. I mean things like https://youtu.be/7Ivoh-fzDw8 https://youtu.be/7Ivoh-fzDw8 , https://stackoverflow.com/questions/60510667/how-can-i-define-a-raku-grammar-to-parse-tsv-text https://stackoverflow.com/questions/60510667/how-can-i-defin... and https://en.m.wikibooks.org/wiki/Raku_Programming/Grammars https://en.m.wikibooks.org/wiki/Raku_Programming/Grammars
- lizmat 5y agoWell, in a way this is funny. As far as I can see, that example is taken from the page describing the differences between Perl and Raku (https://docs.raku.org/language/5to6-nutshell#CPAN https://docs.raku.org/language/5to6-nutshell#CPAN), and how you can use Perl inside Raku using the Inline::Perl5 module, and how you can load a Perl module that exports a "looks_like_number" subroutine, and use it from Raku. The example for "looks_like_number" has probably be chosen, because many experienced Perl programmers are familiar with that. In Raku, you can use kebab-case, and if there would be such a routine in Raku, it would probably be called "looks-like-number", and return a Bool, as in either True or False. "say" is also builtin in Perl, at least for the past 12 years or so. And if you are on a Mac, running "say this is your computer talking to you', it will talk to you. In any case, the thing you appear to refer to, is in no way a tutorial, but rather documentation intended for a specific group of people: Perl programmers.