lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Klaus Ripke wrote:
No doubt stock Lua is not going to trade gsub for snGlobalSubstitute,

Too bad :-) Every time I see gsub, I mentally pronounce it "gosub", thanks to years spent in programming 8-bit computers in Basic... I can't help it.
Actually, I wondered what gsub meant, thanks. ;-)

but since it is good practice to localize (sic) imports, you may

Is that so?

	require "hungarian" -- adds long names to all available libs
or introduce german notation using
	local snGlobaleErsetzung = string.gsub -- jawoll ;P

Argh, maybe that can make more readable listings (arguably), but it feels much like using C pre-processor to rename standard function names... Or, for some Pascal nostalgics, replace { by begin and } by end. I saw that in actual code... Or one putting a long network code in a unique file, starting by redefining printf to pf, while by w or similar stuff. Sure it was open source, but author was also sure to be the only one to touch this code...

Philippe Lhoste
--  (near) Paris -- France
--  --  --  --  --  --  --  --  --  --  --  --  --  --