docs
docs copied to clipboard
Closes #147: provide reason why string templates shouldn’t be used
Specifically, because they cannot be localised.
Is there a more specific subsection that could be linked to here? It's not immediately obvious that this page contains information to back this up
@danrabbit Shall I remove the link? I’ve first-hand confirmed that template strings are not localisable (unless there is some configuration setting that’s not included in the developer guide for making them so) so the link is not necessary (I thought it would provide some interesting/related background).
For non-localised strings, I don’t know of any reason why template strings should not be used. Perhaps we should mention that also.
I'm not doubting you, I'm just wondering if there's a more specific section of this guide that mentions this. Otherwise yeah, it might not be worth linking here. It might be worth opening another branch with a little hint pullout in the localization section for this guide though
I don't think we really necessarily need a reason other than this is the code style we use. A lot of things here—like cuddled else—are just convention
Haha, didn’t think you were doubting me :) (Although, please do, I’m very new to these platforms.)
Regarding stating the reason: I feel it’s important as you don’t want these things to become religious in nature (ditto for design decisions). Some conventions, of course, are just that. But, in this case, template strings provide a major usability advantage to format strings in that you don’t have to remember a bunch of type placeholders and there is a compelling reason why they can’t be used so I feel it would be useful.
I’m happy if we do so without the link if you feel the link would add more confusion than clarity :)
@aral yeah if you don't have a more specific link handy, I would just omit the link
@aral Are you in a position to progress this?
@aral Are you in a position to progress this?
Will do.
Thanks - don't forget to resolve the conflicts with master.