Possibility of standardized sprintf() in ES4?

Alex Russell alex at dojotoolkit.org
Tue Oct 16 09:08:31 PDT 2007

[ snip ]

> Sure. From what I can see of the Microsoft documentation a
> standardized String.format() function would meet the need for a
> standardized way of formatting a string just as well as a method
> based on C/Perl/PHP/Ruby sprintf() and Python's native string
> formatting, where named parameters are used instead of positional
> parameters.

Python allows both, and I prefer that style.

> Assuming there are no intellectual property concerns with adopting
> Microsoft's specification for this method, it would satisfy my use
> case for a string formatting method that accepts explicit positional
> or named parameters in support of internationalized text. I would
> simply be delighted if ES4 saved me and others from having to roll
> our own string formatter classes!

Eh, just go w/ Python's. It's more flexible, "feels" more like printf 
if/when you need it to, and can be used in the .NET-ish way.


Alex Russell
alex at sitepen.com     A99F 8785 F491 D5FD 04D7 ACD9 4158 FFDF 2894 6876
alex at dojotoolkit.org BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.mozilla.org/pipermail/es-discuss/attachments/20071016/c0a06829/attachment-0002.bin 

More information about the Es4-discuss mailing list