On Sun, Jul 14, 2013 at 5:06 PM, Steven Ashley <ste...@ashley.net.nz> wrote:
> On Sunday, July 14, 2013, Benjamin Striegel wrote:
>>
>> I think Jack's proposal is fine, but as Bennie notes I think it's still
>> worth discussing whether C#-style formatting would be a better fit for us
>> than C-style formatting.
>
>
> C# style formatting has the (dis?)advantage that it is possible to duplicate
> and reorder values by only changing the format string. This is sometimes
> useful for crude internationalization and localization.
>
> Are these sorts of use cases within the scope of this discussion?
>
> Will dynamic format strings even be possible?
>
> I imagine developers needing this sort of functionality may be better off
> using a dedicated i18n library.
>
> Steven

Compile-time checked format strings for i18n are feasible and would be
pretty awesome. The syntax extension could load the format strings
from an external file and validate that the formatters line up with
the same parameters expected by the one in the source.

Dispatching based on the current locale needs to be dynamic, but an
i18n format syntax extension could just set up the code to do that
itself.
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to