On Fri, 20 Jul 2001, Carlos Myers wrote: >From: "George Greer" <greerga@circlemud.org> >> On Fri, 20 Jul 2001, Thomas Jones wrote: >> >> >I'm not very experienced at Circle coding yet, but as I rule I HATE >> >global anything. I do use them sometimes but I hate them none the less. >> >> Oh, why? What's wrong with global variables in your opinion? >> >> Not that I'm encouraging anything, but I'm interested in knowing why. > >Globals are often taught as poor programming technique. The philosophy is >that all the data a function needs will either be passed to it or is self >generated. But in the case of a few globles in CircleMUD, there are few >good ways to pass around some data around, such as the indexes and >constants, without resorting to globles. An important point for people to remember is that I'm playing Devil's Advocate. So don't start thinking I'm particularly on one side or the other. In fact, some arguments may sound quite absurd. :) So to you the convenience of the buffers always being available and not being recreated on the stack constantly is outweighed by the possibility of stomping on some other functions temporary buffer? You'd rather declare every variable locally by hand whenever you need one? -- George Greer greerga@circlemud.org -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/06/01 PST