[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: performance and style advice requested

Austin Ziegler

9/15/2003 8:57:00 PM

On Tue, 16 Sep 2003 04:47:27 +0900, Nikolai Weibull wrote:
> * Austin Ziegler <austin@halostatue.ca> [Sep, 15 2003 21:40]:
>> Why not use a constant?
> why use a constant?

Because it looks better than a global, and exhibits what I consider to be
better behaviour overall.

-austin
--
austin ziegler * austin@halostatue.ca * Toronto, ON, Canada
software designer * pragmatic programmer * 2003.09.15
* 16.55.48



1 Answer

Nikolai Weibull

9/15/2003 9:05:00 PM

0

* Austin Ziegler <austin@halostatue.ca> [Sep, 15 2003 23:00]:
> > why use a constant?
>
> Because it looks better than a global, and exhibits what I consider to be
> better behaviour overall.
but a constant is a constant. constants should be used for constant
values, not things that change. i don''t see how a constant behaves any
better than a global in this case. it''s a, what, 100 line script,
globals may pass. to be good style, the whole thing should be kept in
some class somewhere,
nikolai

--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,php,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}