刚刚开始学习perl6,大家觉得perl6前途如何? - 知乎
在国内,小众。你要是问它的“钱途”,目前来看,远不如类似的其他主流语言,例如,Python。 你要是用它来学习程序设计,或者想开拓眼界,多学一门酷酷的程序设计语言,Perl6不会令你失望或者后悔, 给你展示三个小例子。注: Perl6在2019年已经更名为Raku。
Searching…
在国内,小众。你要是问它的“钱途”,目前来看,远不如类似的其他主流语言,例如,Python。 你要是用它来学习程序设计,或者想开拓眼界,多学一门酷酷的程序设计语言,Perl6不会令你失望或者后悔, 给你展示三个小例子。注: Perl6在2019年已经更名为Raku。
I'm not familiar with regular expressions in Raku, but the best regex trick is explicitly about discarding the straight matches, only looking at the first group match. So, you should do that. I'd be very surprised if ...
When .@zentrunix wrote their comment they had not realized this answer in fact was what they were hoping for, because it not only shows how to call C code from Raku code, but also how to call Raku code from C code.
I wanted to do some comparison between Python and Raku while also learning Raku. Originally I wanted a much bigger script, but since the difference is already huge, I'll ask for guidance now. I tri...
Some follow on questions naturally arise. Why not make it tighter? Because the Str variant would match instead of the Int one, even though there's no second argument. That would be more bizarre. Why isn't it still amb...
Raku regexes can contain quoted string literals: say "food" ~~ /. "oo" /; # 「foo」 One can take a Str and turn it into a Raku source representation by calling .raku: say "oh\n\"".raku; # "oh\n\"" This handles escaping ...
Edit: @ikegami was the first person to respond and pointed out my typo. The raku Regex docs say: To match any word boundary, use <|w> or <?wb>. This is similar to \\b in other languages.
Feature comparison of Perl 6 compilers 这些是 Perl 6的特性。John已经在着手进行性能提升了。 有兴趣的话就学习。使用 Perl 6 就是能愉快地写代码, Just for Fun! 官方网站: perl6.org Perl 6 Documentation Perl 6 Design Documents modules.perl6.org pl6anet examples.perl6....
If at the Linux/Unix shell command line, you type raku followed by your script name my_raku_script.p6, the rakudo compiler/interpreter executes the my_raku_script.p6 for you.
Could you explain your regex adverbs on the right side of the ~~ smartmatch operator? I see :r might stand for ratcheting, but I don't think Raku has a :x equivalent of Perl5's /x, since the 'disregard whitespace' swi...