Content deleted Content added
Line 118:
:::: All that does is mapping each digit to its superscript unicode character. If we wanted to do the same using {{ml|string|replace}} we would need ten module invocations. --[[User:Grufo|Grufo]] ([[User talk:Grufo|talk]]) 01:55, 22 September 2023 (UTC)
::::: We already have [[Module:MultiReplace]] for that. Yes, the syntax you used is slightly terser than that module's syntax, but there's no need to shake up the world. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 02:09, 22 September 2023 (UTC)
:::::: I have not done a speed test, but I suspect that syntax will not be the only thing where this function will greatly beat [[Module:MultiReplace]]. In fact, I suspect that performance will be tremendously less expensive here. This function is less powerful (the mapping happens verbatim character by character), hence, exactly for this reason, it is possible to map without problems strings that are page-long – while I suspect that [[Module:MultiReplace]] will break the servers in that case. If all this seems unrealistic, think about the amount of Unicode characters: just to map four types of accents in {{[[:la:Formula:Sine notis diacriticis|la:Sine notis diacriticis]]}} I had to write the following string:
:::::: <syntaxhighlight lang="wikitext">ĀĒĪŌŪȲĂĔĬŎŬÀÈÌÒÙỲÁÉÍÓÚÝÂÊÎÔÛŶāēīōūȳăĕĭŏŭàèìòùỳáéíóúýâêîôûŷ̄̆</syntaxhighlight>
:::::: I assure you, there can be way more complex transliterations than this. And last but not least: in terms of both computational complexity and ease of use, what you call “shaking up the world” is rather a going back to the old days. --[[User:Grufo|Grufo]] ([[User talk:Grufo|talk]]) 02:26, 22 September 2023 (UTC)
|