Skip to content

$() and $( ) should be the same thing #98

@zhuomingliang

Description

@zhuomingliang

06:11 ShimmerFairy ( and for the record, I only learned about $() a couple days ago, and I personally wouldn't mind if it went away. I don't see where it's useful enough to have a short form of {$/.ast // ~$/} )
06:12 * JimmyZ wish $() and $( ) is the same thing
06:12 *are
06:13 ShimmerFairy JimmyZ: I've never seen it used, except for a few spots in nqp and/or rakudo, and it doesn't seem like it has anything to do with regexes. I'm inclined to agree :)
06:15 JimmyZ: and on top of it, $() feels to me like a case of creeping "punctuation scalars" that I know existed in Perl 5, and we worked to get rid of :) (that is, Perl 5's $=, $', and probably everything else that could match /'$' <:Punct>/ :P)
06:16 JimmyZ well, at least, for consistency, they should be same thing
06:16 * TimToady agrees that $() can go
06:16 JimmyZ $[] vs $[ ] vs $() vs $( )
06:16 colomon_ joined #perl6
06:18 ShimmerFairy TimToady: for what it's worth, I kinda like the idea of something that automatically picks the right thing like that, but I think in most cases you're not working off $/ in the first place, and it's not worth a magical-variable-looking thing.
06:18 in most cases where you're interested in C<.ast>s, is what I meant.
06:19 TimToady it would make more sense to use $<> for that anyway

see http://irclog.perlgeek.de/perl6/2015-08-28#i_11129898 for more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions