Sorry to drag out an old conversation, but I was indisposed at the
time, and only just got back to it.
On Mon, Jun 16, 2003 at 01:07:21PM +0200, Edwin Steiner wrote:
: Edwin Steiner [EMAIL PROTECTED] writes:
:
: Disallowing interpolated formats on \F has the additional advantage of
: making
This was a few days ago, but I just noticed Tim Bunce's comment about
the way other languages do it and thought of the way it is in another
language I know (one that a lot of people don't know), so I'm chiming
in briefly...
Austin Hastings [EMAIL PROTECTED] writes:
How about a pre- or user-
Luke Palmer [EMAIL PROTECTED] 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
Edwin Steiner [EMAIL PROTECTED] writes:
Disallowing interpolated formats on \F has the additional advantage of
making the {} unnecessary in the most common cases (also removing the
'force to string').
As an afterthought: This suggests getting rid of the {} entirely.
The rule could be like:
Edwin Steiner [EMAIL PROTECTED] writes:
The rule could be like:
\\F printf_format_without_percent funny_character_expression
After-afterthought:
We know: Everything between the \F and the next funny character is the
format specifier. This allows extensions to the printf-specifiers:
On Mon, Jun 16, 2003 at 02:09:43PM +0200, Edwin Steiner wrote:
Edwin Steiner [EMAIL PROTECTED] writes:
We know: Everything between the \F and the next funny character is the
format specifier. This allows extensions to the printf-specifiers:
Cool, Perlish, scary.
Examples:
[snip]
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 $().
--- arcadi shehter [EMAIL PROTECTED] wrote:
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
Austin Hastings [EMAIL PROTECTED] writes:
Now, if you want to talk about the cool amazing formatting syntax
you've conceived for sprintf replacement, that's fine. But I'm getting
that warm cozeny feeling that this is burning unnecessary listmips.
Well, it's a bike shed. But it is a bike shed
[EMAIL PROTECTED] (Edwin Steiner) writes:
Well, it's a bike shed.
Perhaps best not to have people expend lots of energy painting bike sheds
until the nuclear reactor's anywhere near functional, though.
I think the whole thing can be done, in whatever style people would like,
using whatever
On 2003-06-16 at 17:48:58, Simon Cozens wrote:
% grep printf cvs/modules/**/*pm | wc -l
15
% grep -v printf cvs/modules/**/*pm | wc -l
15360
Well, 0.1% agreed, anyway.
Now, now, that's hardly a fair comparison. Maybe if you grepped for lines
that contain print but not printf, or
Simon Cozens [EMAIL PROTECTED] writes:
% grep printf cvs/modules/**/*pm | wc -l
15
% grep -v printf cvs/modules/**/*pm | wc -l
15360
Well, 0.1% agreed, anyway.
Could also mean the current printf syntax is not too popular.
Reusable code is also less likely to use it than the
[EMAIL PROTECTED] (Edwin Steiner) writes:
Description: This list is for discussing user-visible changes to
the language.
It's somewhat unnerving to post on topic and (hopefully) politely and
I think your post was spot on; the only problem I had with it is that I felt
it was addressing a
Simon Cozens [EMAIL PROTECTED] writes:
it was addressing a problem at too low a level. This could be because I'm a
grouchy old-timer, and I carry over a Perl 5 design principle that says that
changes should be made in as general a way as possible.
It's a very good principle, I think.
One
On Monday, June 16, 2003, at 10:39 AM, Edwin Steiner wrote:
I'm content if this will be revisited (hopefully by someone with
better overview than mine). It just should not be ignored.
Oh, it definitely won't be ignored. :-) It's come up several times
before -- try searching for stringification,
--- Michael Lazzaro [EMAIL PROTECTED] wrote:
Or, if we have output rules just like we have input rules, could
something quite complex be expressed simply as:
You have $x as MoneyFormat
having previously defined your MoneyFormat formatting rule in some
other location?
You have
On Monday, June 16, 2003, at 11:49 AM, Austin Hastings wrote:
--- Michael Lazzaro [EMAIL PROTECTED] wrote:
Or, if we have output rules just like we have input rules, could
something quite complex be expressed simply as:
You have $x as MoneyFormat
having previously defined your MoneyFormat
--- Michael Lazzaro [EMAIL PROTECTED] wrote:
On Monday, June 16, 2003, at 11:49 AM, Austin Hastings wrote:
--- Michael Lazzaro [EMAIL PROTECTED] wrote:
Or, if we have output rules just like we have input rules,
could
something quite complex be expressed simply as:
You have $x
On Mon, Jun 16, 2003 at 11:37:06AM -0700, Michael Lazzaro wrote:
[...]
But there is broad support for the idea that the somewhat elderly
printf syntax is a PITA, and that printf, in general, should be
completely unnecessary since we already *have* interpolated strings,
fer pete's sake.
A
[EMAIL PROTECTED] (Austin Hastings) writes:
replacing, or merging, formats with emit-rules
seems like an interesting project.
I dunno, I think it fires my change for the sake of change alarm bells. So
far we're already throwing away thirty years of^W^W^W^W^W^Wrationalising one
Unix little
On Mon, Jun 16, 2003 at 05:48:58PM +0100, Simon Cozens wrote:
But then I'm one of those freaks who likes the idea of keeping core Perl 6
generic, extensible, clean and small, and letting all the clever stuff go
into extensions, a heretical position which is way out of favour with the
more
Perhaps someone could post a summary of how the issue has been
tackled in other languages that support a similar concept.
I've not seen one (but then I've not been paying attention, so
forgive me if it's need done already, and perhaps point me to a url).
Tim.
Hello!
Recently I was coding Perl 5 and quite often I had to change
interpolated strings or Cprint to Csprintf or printf.
I began to wonder, if qq strings couldn't allow sprintf-like
formatting directly.
I could imagine an \F escape sequence with the following syntax:
:'\F'
Edwin Steiner [EMAIL PROTECTED] writes:
Leave some --\Fs60{space for this $interpolates string}--.
I'm sorry, this should be:
Leave some --\F60s{space for this $interpolates string}--.
Hello!
Recently I was coding Perl 5 and quite often I had to change
interpolated strings or Cprint to Csprintf or printf.
I began to wonder, if qq strings couldn't allow sprintf-like
formatting directly.
I could imagine an \F escape sequence with the following syntax:
:'\F'
25 matches
Mail list logo