Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 07 Apr 2013 13:53:05 -0500 Date: Sun, 07 Apr 2013 19:53:03 +0100 From: lipska the kat <"nospam at neversurrender dot co dot uk"> Organization: Trollbusters 3 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Inserting In a List References: <19un43xj77bua.vw45l4e2wshi.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <8MWdnbEIVKIMXfzMnZ2dnUVZ8tednZ2d@bt.com> Lines: 53 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-vI79RzeRx56egAIIePIgEX9hzHs7SYAJUuLz8APtnLNY9e2SRTpL1UrlutEw1IYBzNrv0xhDTwfrKyw!4lGQKpfD9ECgsrBEuLZUQ8sRaY9LXWjxCoF/HWOHGBV1dl8L6wpurLLlqOp8DR42qHfkjMbWbRs= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3689 Xref: csiph.com comp.lang.java.programmer:23369 On 07/04/13 16:54, Wanja Gayk wrote: > In article , lipska the kat > (lipska the kat) says... > >>>> In fact what does peppering the code with finals do to make it > easily >>>> understandable to an inexperienced developer ? >>> >>> In my opinion it's been an unfortunate decision to have a "final" >>> keyword instead of a "var" keyword with a "final" default. >>> >>> Now, I'm a fan of using the "final" keyword everywhere possible apart >>> from method and class declarations and I'll give you my reasons behind >>> it. >> >> Your arguments are fair and represent your view of things. >> This is fine, however I have a question for you. >> >> Without getting all *philosophical* about it, >> what do you think the point of a variable is? > > Depends if you're looking at it from a functional point of view or an > imperative point of view. Well Java is an imperative language so let's go with that. > From an imperative point of view I'd describe it as a named bin that can > be refilled with a value. This is what I don't get, if it's a named bin that can be refilled why do you _decorate_ it with final. I'm probably not the most experienced developer here, 15 years and counting with Java but I've done everything from Swing based desktop stuff (yuk) to back end business applications that are presentation layer agnostic, to state machines that communicate with hardware devices and apart from one particular instance I can't think of a single time that I have ever had to use final more than once or twice in a component. Most components don't use it at all. What are you guys *doing* that you feel the need to modify all your variables with final everywhere. The whole point of a computer is to transform it's input to some useful output, you store your input, transform it (by updating variables usually) and emit it in a way that makes sense at that time. If you want a functional language use Haskell (or whatever). I may be missing something here but are you sure you are using the right language? :-) lipska -- Lipska the KatŠ: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun