From: Josef 'Jupp' Schugt Date: 2003-07-01T05:40:02+09:00 Subject: Re: Message catalogs (I18N) overnight hack... Saluton! > > Technical side: According to me redefining 'print' is an unacceptable > > violation of the principle of least surprise. The command reads > > 'print' as in 'print that book' not as in 'publish a translation of > > that book'. > > I see what you mean. But if one can turn this on/off dynamically, > it may not be so bad. Suggestion: Do not have the require statement redefine 'puts' but use a 'locale' statement that has this calling convention: locale('de_AT', 'fr_FR') locale('pt_BR') locale Version 1: Source is German as used in Austria (Austrians do not use the same vocabulary as Germans), target is French as used in France (differs from French as used in Canada) Version 2: Source is Portugese as used in Brazil and so is target. This is to deal with l10n issues like numbers and the like. Version 3: Source is in 'C' locale and so is target. > And another is to preserve readability and simplicity -- I dislike > having to call a method every time I use a string. IMHO redefining a built-in command's effect on a built-in data type makes code unreadable. Once a linear algebra teacher did proof that humans have severe problems if their expectations are not met. Usually problems did read 'Sei K ein Koerper, sei V ein Vektorraum...' which means 'K be a commutative field, V be a vector space'.The mathematical details only play a role as far as a field and a vector space are *completely* different objects and the use of the letters was mnemonic. One day he did write 'Sei K ein Vektorraum, sei V ein Koerper'. You thing only a handful of guys did mange to solve the problems? You are right. Gis, Josef 'Jupp' Schugt -- Someone even submitted a fingerprint for Debian Linux running on the Microsoft Xbox. You have to love that irony :). -- Fyodor on nmap-hackers@insecure.org