Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.erje.net!newsfeed.utanet.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Newsgroups: comp.lang.java.programmer From: Andreas Leitgeb Subject: Re: Call by Result References: <4DF2289B.5030909@NnOwSlPiAnMk.com> Reply-To: avl@logic.at User-Agent: slrn/pre0.9.9-111 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: Date: 11 Jun 2011 21:18:30 GMT Lines: 15 NNTP-Posting-Host: gamma.logic.tuwien.ac.at X-Trace: 1307827110 tunews.univie.ac.at 5640 128.130.175.3 X-Complaints-To: abuse@tuwien.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5224 Stefan Ram wrote: > This is just the realization of »Tell, Don't Ask«. > Here, one asks the object: > if( getter.isValid() )... > Here, one tells the object what to do: > new StringGetter().get( [string|...], [report|...] ); If you'd like coding like that, you *might* like Tcl. Passing scriptlets to commands to have them executed (conditionally, repeatedly, deferredly, just later, within a different context, ...) is just simply normal in Tcl. Even the "if" statement itself is merely a command that gets passed scriptlets and executes one (or maybe even none - if no condition is true and no "else"-scriptlet given) ...