Hi Raj,
What Saifi said is correct. Any form of state modification can be considered as a side effect. Simply put, if any statement has a dependency on "outside world" like reading or modifying variables, any form of I/O which others( process, code.. etc ) can "see" then its said to have a side effect. Side effect is mostly used in Imperative langauges( C,C++,Java..). But its discouraged in Functional Programming. The rationale seems to be that any instruction o/p should not be dependent on past code history. i.e the result of the execution should not change no matter what order its executed in. [ still new to Scala, so the explanation maybe little rusty :) ] Regards, Nikhil ________________________________ From: Saifi Khan <[email protected]> To: [email protected] Sent: Thursday, 11 June, 2009 2:25:13 AM Subject: Re: [twincling] [side-effect-scala] On Wed, 10 Jun 2009, Rajkumar Goel wrote: > Hi all, > Can someone elobrate on the term side-effect. > Thanks in Advance. > Regards, > Rajkumar Goel > Think "state modification" eg. I/O causes state modification and hence it is a "side effect" Most of the programming we do is basically 'side effect' programming ! thanks Saifi. Own a website.Get an unlimited package.Pay next to nothing.*Go to http://in.business.yahoo.com/ [Non-text portions of this message have been removed]

