user-pic

Yuki Kimoto

Subscribe to feed Recent Actions from Yuki Kimoto

  • Slobo commented on Current subroutine signatures implementation contains two features which purposes are different

    I understand the need for speed, but as benchmark above shows, you are only losing a second for every 10M calls - if you are doing anything remotely noon trivial in those subs you will not notice the time paid for correctness.

    Besides, it seems that as per benchmark #5, if you needed to hyper optimize code you would need to avoid destructuring anyways, regardless of argument checking.

    Lastly, can you point to any consensus that correctness should take back seat to performance in perl?

    Thanks

  • Slobo commented on Current subroutine signatures implementation contains two features which purposes are different

    I'm also genuinely interested in your argument that dynamic language implies no argument checking, do you mind elaborating a bit more on it?

  • Damian Conway commented on How about separating dynamic world and static world?
    First is normal subroutine. This is dynamic language feature.

    Function overloading is indeed a static language feature.

    But the multi keyword doesn't provide static function overloading.
    The multi keyword provides dynamic multiple dispatch.

    Function overloading occurs at compile-time, when the compiler looks at the static types of the declared arguments to an overloaded subroutine or method and selects which overloading to call on the…

  • Slobo commented on Current subroutine signatures implementation contains two features which purposes are different

    Hi Yuki, thanks for your response.

    I am always looking to learn better software engineering techniques. I hope you don't mind me pressing for more details from you. Is it only the performance impact of arg count check that bothers you? Or do you find yourself often wanting to define

    sub foo($bar) { ... }

    and then use it as

    foo( $bar, $baz );
    # or maybe
    foo( @only_first_matters )

    I am curious to discover any techniques that revolve around these patterns?


    Re: correctness, I can only offer my own experience with a legacy code …

  • Sawyer X commented on Perl 5 Porters Mailing List Summary: May 19th-24th

    That's what Dave is trying to accomplish. :)

Subscribe to feed Responses to Comments from Yuki Kimoto

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.