Luke Palmer writes:
>
> As far as the syntax, the () and {} don't make a lot of sense with
> regard to the rest of the language. We could either utilize the
> string/numeric context distinction that already exists in {} and []
> for subscripting, or we could always use () in analog to $().
>
> I'd like to have that dollar in there somewhere, actually.
>
> "The value in hex is \Fx$( expression )."
>
> Or something. That is kinda clunky, though. Maybe just a
> stringification adverb, albeit verbose (but more versatile):
>
> "The value in hex is $( expression where format('x') )"
>
> No, I actually think that should be a property. In fact, one that has
> been discussed before:
>
> "The value in hex is $( expression but formatted('x') )"
>
> That's actually my favorite so far.
>
> > -Edwin
> Luke
maybe the analogy with quotelike expressions in p6 could be usefull
so that "$" inside string are (sort of ) quotelike operators.
this is unambiguos if single ":" cannot be a beginning of variable
name.
"value is $:3int( $value ) or $:5.3float( $value )"
but maybe cleaner way is to have a predefined function which can be
passed modifyers
"value is \F:3int[ $value ] or \F:5.3float[ $value ]"
or just
"value is \F[as=>'3int', $value ] or \F[as=>'5.3float', $value ]"
arcadi