hello
can somebody help with reviewing technical aspects of a cyrillic <->
latin converter ?
it has been said that the file is too big and the commit is too big.
the code is nearly 3500 lines. i think it is not worth to divide it
into separate library or files. as library it would be very fit for
this conversion, not usable for other things. i feel making library as
"premature optimisation". and laziness, feeling as useless work. also
just dividing into files, into classes. 3500 lines is not very hard
for me to browse.
if anybody wants to separate it into classes and files, feel free to
edit, if you think it is good for mediawiki. i do not want to make
such change by myself. i can help with proper names (for classes,
variables).
i said variables because it is possible to convert some lists of php
commands into for cycles with arrays, just to make it look shorter. i
think it is also like premature optimisation, i have more freedom when
they are as they are, in further editing. i do not want to make such
change by myself. feel free to edit.
quick link to the newest version of the code:
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/164049/219/includes/langu…
.
also it was suggested to get rid of regex lookahead and lookbehind.
and strtr was like suggested. i think i probably cannot easily make
those changes. and i think, is strtr really faster than preg_replace?
i googled for benchmark results and i do not see, in the first page,
like 10 results.
the code is big, but it just modifies a string.
tatar wikipedians have asked me about this code, yesterday, and now i
try this approach, to write to this mailing list, before other ways to
go. maybe there is just a lack of some people who can review this code
and approve it, and maybe this mailing list can help.
other ways to go to the problem's pages:
https://phabricator.wikimedia.org/T27537 ,
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/164049 .