[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: String interpolation
From: |
Lars Ingebrigtsen |
Subject: |
Re: RFC: String interpolation |
Date: |
Mon, 12 Dec 2016 22:11:23 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> > (fmt "This is %{:thing}.2f"
> > :thing (replace-regexp-in-string " +" " " thing))
>
> Another syntactical issue is that '%{thing}.2f' has a problem:
> Does it mean %{thing} formatted according to '.2f', or
> %{thing} followed by the text '.2f'?
>
> Using the syntax '%[.2f]{thing}' is superior because it avoids
> any syntactic ambiguity.
Hm... I don't think there's any ambiguity, really. The syntax for
format specs is still %<stuff><letter>. So %{thing}.2f is unambiguously
the value of `thing' formatted as a floating point with two decimal
places.
I mean, %{thing}.2f isn't a valid formatting directive today, so I'm
afraid I don't quite see the ambiguity. Unless I'm missing something
here...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Re: RFC: String interpolation, (continued)
- Re: RFC: String interpolation, Lars Brinkhoff, 2016/12/14
- Re: RFC: String interpolation, Lars Brinkhoff, 2016/12/14
- RE: RFC: String interpolation, Drew Adams, 2016/12/13
- Re: RFC: String interpolation, Clément Pit--Claudel, 2016/12/13
- Re: RFC: String interpolation, Lars Ingebrigtsen, 2016/12/14
- Re: RFC: String interpolation, Richard Stallman, 2016/12/14
- Re: RFC: String interpolation, Richard Stallman, 2016/12/12
- Re: RFC: String interpolation,
Lars Ingebrigtsen <=
- Re: RFC: String interpolation, Richard Stallman, 2016/12/13
- Re: RFC: String interpolation, Lars Ingebrigtsen, 2016/12/13
- Re: RFC: String interpolation, Richard Stallman, 2016/12/14
- Re: RFC: String interpolation, Ted Zlatanov, 2016/12/12
- Re: RFC: String interpolation, Helmut Eller, 2016/12/12