From: Talha Oktay Date: 2006-05-07T08:00:16+09:00 Subject: A major ruby annoyance! ------=_Part_18144_2959695.1146956413669 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I am a newbie in Ruby. I have read several books including pickaxe and wrot= e several thousands lines of code. So far, as an ex perl user, I have found the major annoyance with ruby is the lack of declaration of variables. Automatic creation, in perl jargon autovification is the common feature of many high level languages such as perl, paython, visual basic etc. but most of the these languages have seen that this not necessarily a good thing and created flags, commands to prohibit it if the developer wants to. I really wish ruby had one. Last several hours I spent debugging a malfunctioning code just to see mistyped variable name was causing all the problem. I had to put many log statements which polluted to the code. I guess in Pickaxe book, unit testing is presented as the cure for this problem which I do not agree. I can not write a test code for every peace o= f little functionality, besides I am eager to make the compiler or interprete= r to work for me. Why not tell the interpreter to check the code, instead of writing very detailed test programs. I am not a very good typist and I ofte= n mistype variable names, often I had to depend on vim's auto completion feature. But I do not want to depend to an editor or an IDE for this. I have also found the ruby's -w flag does not work as I perl -w flag does. In perl warnings are really descriptive. You can even use a module called diagnostics which almost teaches to fix the problem that crashes program or generates warning etc. I often do not use -w as because I receive warnings from libraries that my code includes or warnings I do not understand at all= . May be I am the only one who is bothered with these. I do not know. ------=_Part_18144_2959695.1146956413669--