在这里,Hello $world
每个引用符号的解释我的意思是语言。
$world = "WΩrlδ"
"(Hell)*o $world\n" # <--- plain (Hell)*o, resolve $world, escape \n
'(Hell)*o $world\n' # <--- plain (Hell)*o, plain $world, escape \n
/(Hell)*o $world\n/ # <--- regexp (Hell)*, resolve $world, interpret \n
<(Hell)*o $world\n> # <--- make list ["(Hello*o", "$world\n"]
{(Hell)*o $world\n} # <--- syntax error, this language cant' parse it
Perl 6 是否足够强大,能够在未来的语言中存在,例如
my $emacs_func = (defun perl-backward-to-start-of-continued-exp (lim)
(if (= (preceding-char) ?\))
(forward-sexp -1))
(beginning-of-line)
(if (<= (point) lim)
(goto-char (1+ lim)))
(skip-chars-forward " \t\f"))
$ typeof($emacs_func)
> Emacs Lisp list
所以,问题显然是:can it be done in present specification (or even implementation) of Perl 6
?