I would be very interested in this.  Have a look at our  
implementation (not called sprintf, but has similar goals).  Our  
implementation has an additional goal of keeping an association  
between the result string and the objects it represents.  Being a  
dynamic language, I think es4 should aspire to more than just C sprintf.

http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc/compiler/ 
LzFormatter.lzs

Our source is licensed under CPL.

http://svn.openlaszlo.org/openlaszlo/trunk/LICENSE.txt

On 2007-10-15, at 08:27 EDT, Dan Scott wrote:

> Hello:
>
> I've been working on a project requiring i18n support in ES
> (http://open-ils.org), and it's become clear that a standard sprintf()
> implementation in ES would have been very useful. There are currently
> some open-source sprintf() implementations written in ES, but all of
> the ones I've looked at so far seem to either have unusual licenses or
> incomplete implementations (positional specifier support is absolutely
> necessary for i18n, for example.)
> http://hexmen.com/blog/2007/03/printf-sprintf/ is probably the closest
> thing I've found to a solution yet.
>
> For something as basic as string formatting, it would be great to be
> able to count on a core implementation of sprintf() (or something
> equivalent) in a future version of ES. Jon Udell made a comment to the
> effect that string formatting was a part of the TG1 wiki at
> http://weblogs.mozillazine.org/roadmap/archives/2006/02/ 
> js_and_python_news.html,
> but I've been unable to find that section in the wiki (unless that is
> limited strictly to String.replace()).
>
> Is there any other interest in adding a native sprintf() (probably as
> String.sprintf()) to the ES4 specs?
>
> -- 
> Dan Scott
> Laurentian University
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss

_______________________________________________
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to