Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!postnews.google.com!h12g2000pro.googlegroups.com!not-for-mail From: lewbloch Newsgroups: comp.lang.java.programmer Subject: Re: Call by Result Date: Wed, 15 Jun 2011 07:06:47 -0700 (PDT) Organization: http://groups.google.com Lines: 27 Message-ID: References: <95e4uuF3cvU1@mid.individual.net> <8CtIp.4644$PA5.4578@newsfe01.iad> <4df5290c$0$49183$e4fe514c@news.xs4all.nl> <4df77a95$0$49041$e4fe514c@news.xs4all.nl> <_XPJp.2060$g12.487@newsfe20.iad> NNTP-Posting-Host: 108.89.33.208 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1308146882 8936 127.0.0.1 (15 Jun 2011 14:08:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 15 Jun 2011 14:08:02 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h12g2000pro.googlegroups.com; posting-host=108.89.33.208; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ASELCHRU X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.91 Safari/534.30,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5325 On Jun 14, 2:18=A0pm, Andreas Leitgeb wrote: > Arved Sandstrom wrote: > > It's way more concise than Java, and another advantage still remains > > that we're not looking for a special value (null). > > I'm not yet sure, whether null in Java counts as a "String value", or not= . > > I think it is not (whereas the empty string of course is). As such, a > variable (or field) "s" (or even an expression) of type String really > happens to be implicitly the pendant of Haskell's "Option"al String: > > Either it is "Null"... (ahem, "null"), or it holds an actual String value= . > > Ditto for all the non-primitive types. 'null' is an out-of-band 'String' value (or any other reference type). I use the "is-a {type}" to indicate if assignment (or casting) is permissible. 'String x =3D null;' is valid, so 'null' is a 'String' (or any other reference type) value. It is "out of band", which expresses the "not-a" concept well enough to write good software. -- Lew