我正在尝试为Scala编写一个性能测量库。我的想法是透明地“标记”部分,以便可以收集执行时间。不幸的是,我无法按照自己的意愿弯曲编译器。 的什么,我心目中无可否认人为的例子: // generate a timing function
val myTimer = mkTimer('myTimer)
// see how the timing function returns the righ
在下面的匿名子程序声明,Perl中似乎解析它作为一个间接的方法调用,而不是作为一个子程序比: use 5.010;
use strict;
use warnings;
sub proxy {
my $new = shift;
say "creating proxy: $new";
sub :lvalue {
say "running proxy: