<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-30218</id>
	<title>Nabble - Scala - Debate</title>
	<updated>2009-11-24T06:11:11Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Scala---Debate-f30218.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Scala---Debate-f30218.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26496573</id>
	<title>Re: inline classes</title>
	<published>2009-11-24T06:11:11Z</published>
	<updated>2009-11-24T06:11:11Z</updated>
	<author>
		<name>Ricky Clarkson</name>
	</author>
	<content type="html">You could just blow up a caravan.
&lt;br&gt;&lt;br&gt;2009/11/24 Razvan Cojocaru &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26496573&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;razie@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Got it... don't pump the brakes any more - the ABS supposedly does it better
&lt;br&gt;&amp;gt; than me. Tx.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm a control freak then ... or just want to have some fun, a la &amp;quot;Top
&lt;br&gt;&amp;gt; Gear&amp;quot;... :)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ricky Clarkson wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I would suggest leaving performance hints out of a language that you
&lt;br&gt;&amp;gt;&amp;gt; would like to be readable.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Investigate the state of the art in the VM instead.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -----
&lt;br&gt;&amp;gt; Razvan Cojocaru,
&lt;br&gt;&amp;gt; Work: &lt;a href=&quot;http://www.sigma-systems.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sigma-systems.com&lt;/a&gt;&lt;br&gt;&amp;gt; Me: &lt;a href=&quot;http://feeds.razie.com/RazvanTech&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://feeds.razie.com/RazvanTech&lt;/a&gt;&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/inline-classes-tp26488946p26496426.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/inline-classes-tp26488946p26496426.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Scala - Debate mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ricky Clarkson
&lt;br&gt;Java and Scala Programmer, AD Holdings
&lt;br&gt;+44 1565 770804
&lt;br&gt;Skype: ricky_clarkson
&lt;br&gt;Google Talk: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26496573&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ricky.clarkson@...&lt;/a&gt;
&lt;br&gt;Google Wave: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26496573&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ricky.clarkson@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inline-classes-tp26488946p26496573.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26496426</id>
	<title>Re: inline classes</title>
	<published>2009-11-24T06:03:12Z</published>
	<updated>2009-11-24T06:03:12Z</updated>
	<author>
		<name>Razvan Cojocaru</name>
	</author>
	<content type="html">Got it... don't pump the brakes any more - the ABS supposedly does it better than me. Tx.
&lt;br&gt;&lt;br&gt;I'm a control freak then ... or just want to have some fun, a la &amp;quot;Top Gear&amp;quot;... :)
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Ricky Clarkson wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;I would suggest leaving performance hints out of a language that you
&lt;br&gt;would like to be readable.
&lt;br&gt;&lt;br&gt;Investigate the state of the art in the VM instead.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;div class=&quot;signature&quot;&gt;Razvan Cojocaru,
&lt;br&gt;Work: &lt;a href=&quot;http://www.sigma-systems.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sigma-systems.com&lt;/a&gt;&lt;br&gt;Me: &lt;a href=&quot;http://feeds.razie.com/RazvanTech&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://feeds.razie.com/RazvanTech&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inline-classes-tp26488946p26496426.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26491126</id>
	<title>Re: inline classes</title>
	<published>2009-11-23T22:39:16Z</published>
	<updated>2009-11-23T22:39:16Z</updated>
	<author>
		<name>Ricky Clarkson</name>
	</author>
	<content type="html">I would suggest leaving performance hints out of a language that you
&lt;br&gt;would like to be readable.
&lt;br&gt;&lt;br&gt;Investigate the state of the art in the VM instead.
&lt;br&gt;&lt;br&gt;2009/11/24 Randall R Schulz &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26491126&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rschulz@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Monday November 23 2009, Razvan Cojocaru wrote:
&lt;br&gt;&amp;gt;&amp;gt; do you mean &amp;quot;is&amp;quot; or &amp;quot;should be&amp;quot; ? Indeed, it could at least make sure
&lt;br&gt;&amp;gt;&amp;gt; the classes are allocated on the stack not heap or something...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is. Would be. Whatever.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In my opinion, it's entirely inappropriate to bake hints of this sort
&lt;br&gt;&amp;gt; into the language.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Randall Schulz wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; This is really just a hint to the copmiler and / or the runtime
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; about use patterns for the class(es) in question. It's better to
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; let the compiler and / or the runtime decide when such
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; optimizations are applicable.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -----
&lt;br&gt;&amp;gt;&amp;gt; Razvan Cojocaru
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Randall Schulz
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ricky Clarkson
&lt;br&gt;Java and Scala Programmer, AD Holdings
&lt;br&gt;+44 1565 770804
&lt;br&gt;Skype: ricky_clarkson
&lt;br&gt;Google Talk: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26491126&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ricky.clarkson@...&lt;/a&gt;
&lt;br&gt;Google Wave: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26491126&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ricky.clarkson@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inline-classes-tp26488946p26491126.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26490702</id>
	<title>Re: inline classes</title>
	<published>2009-11-23T21:34:40Z</published>
	<updated>2009-11-23T21:34:40Z</updated>
	<author>
		<name>Randall Schulz</name>
	</author>
	<content type="html">On Monday November 23 2009, Razvan Cojocaru wrote:
&lt;br&gt;&amp;gt; do you mean &amp;quot;is&amp;quot; or &amp;quot;should be&amp;quot; ? Indeed, it could at least make sure
&lt;br&gt;&amp;gt; the classes are allocated on the stack not heap or something...
&lt;br&gt;&lt;br&gt;Is. Would be. Whatever.
&lt;br&gt;&lt;br&gt;In my opinion, it's entirely inappropriate to bake hints of this sort 
&lt;br&gt;into the language.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Randall Schulz wrote:
&lt;br&gt;&amp;gt; &amp;gt; This is really just a hint to the copmiler and / or the runtime
&lt;br&gt;&amp;gt; &amp;gt; about use patterns for the class(es) in question. It's better to
&lt;br&gt;&amp;gt; &amp;gt; let the compiler and / or the runtime decide when such
&lt;br&gt;&amp;gt; &amp;gt; optimizations are applicable.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -----
&lt;br&gt;&amp;gt; Razvan Cojocaru
&lt;br&gt;&lt;br&gt;&lt;br&gt;Randall Schulz
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inline-classes-tp26488946p26490702.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26490557</id>
	<title>Re: inline classes</title>
	<published>2009-11-23T21:07:52Z</published>
	<updated>2009-11-23T21:07:52Z</updated>
	<author>
		<name>Razvan Cojocaru</name>
	</author>
	<content type="html">do you mean &amp;quot;is&amp;quot; or &amp;quot;should be&amp;quot; ? Indeed, it could at least make sure the classes are allocated on the stack not heap or something...
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Randall Schulz wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;This is really just a hint to the copmiler and / or the runtime about 
&lt;br&gt;use patterns for the class(es) in question. It's better to let the 
&lt;br&gt;compiler and / or the runtime decide when such optimizations are 
&lt;br&gt;applicable.
&lt;br&gt;&lt;br&gt;Randall Schulz
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;div class=&quot;signature&quot;&gt;Razvan Cojocaru,
&lt;br&gt;Work: &lt;a href=&quot;http://www.sigma-systems.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sigma-systems.com&lt;/a&gt;&lt;br&gt;Me: &lt;a href=&quot;http://feeds.razie.com/RazvanTech&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://feeds.razie.com/RazvanTech&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inline-classes-tp26488946p26490557.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26489104</id>
	<title>Re: inline classes</title>
	<published>2009-11-23T17:23:32Z</published>
	<updated>2009-11-23T17:23:32Z</updated>
	<author>
		<name>Randall Schulz</name>
	</author>
	<content type="html">On Monday November 23 2009, Razvan Cojocaru wrote:
&lt;br&gt;&amp;gt; There's been this debate about the cost of Some(x) vs null.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Can we have inline classes? Basically the inline keyword applied to a
&lt;br&gt;&amp;gt; class indicates that the compiler should avoid creating instances of
&lt;br&gt;&amp;gt; the class.
&lt;br&gt;&lt;br&gt;This is really just a hint to the copmiler and / or the runtime about 
&lt;br&gt;use patterns for the class(es) in question. It's better to let the 
&lt;br&gt;compiler and / or the runtime decide when such optimizations are 
&lt;br&gt;applicable.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; Razvan Cojocaru,
&lt;br&gt;&lt;br&gt;&lt;br&gt;Randall Schulz
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inline-classes-tp26488946p26489104.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26489009</id>
	<title>Re: inline classes</title>
	<published>2009-11-23T17:12:58Z</published>
	<updated>2009-11-23T17:12:58Z</updated>
	<author>
		<name>Razvan Cojocaru</name>
	</author>
	<content type="html">Didn't include a solution...
&lt;br&gt;&lt;br&gt;A possibility is to simply change the generated signature of the class's methods to prepend the primary constructor parameters (class parameters?):
&lt;br&gt;&lt;br&gt;inline class ServiceHandle (val loc:AgentHandle, val name:String) {
&lt;br&gt;&amp;nbsp; &amp;nbsp;def action (method:String, args:AttrAccess*) =
&lt;br&gt;&lt;br&gt;basically generates the &amp;quot;static&amp;quot; method
&lt;br&gt;&amp;nbsp; &amp;nbsp;def action (loc:AgentHandle, val name:String, method:String, args:AttrAccess*) =
&lt;br&gt;&lt;br&gt;and then streamlines the calling sequence
&lt;br&gt;&lt;br&gt;new ServiceHandle (l, n) action (m, a) into just action (l,n,m,a)
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;Razvan Cojocaru,
&lt;br&gt;Work: &lt;a href=&quot;http://www.sigma-systems.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sigma-systems.com&lt;/a&gt;&lt;br&gt;Me: &lt;a href=&quot;http://feeds.razie.com/RazvanTech&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://feeds.razie.com/RazvanTech&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inline-classes-tp26488946p26489009.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26488946</id>
	<title>inline classes</title>
	<published>2009-11-23T17:06:18Z</published>
	<updated>2009-11-23T17:06:18Z</updated>
	<author>
		<name>Razvan Cojocaru</name>
	</author>
	<content type="html">There's been this debate about the cost of Some(x) vs null.
&lt;br&gt;&lt;br&gt;Can we have inline classes? Basically the inline keyword applied to a class indicates that the compiler should avoid creating instances of the class.
&lt;br&gt;&lt;br&gt;I see myself using this pattern quite often to add functionality to existing code or to create nice DSL-like syntax - however, the extra classes are most often not neccessary:
&lt;br&gt;&lt;br&gt;object Service {
&lt;br&gt;&amp;nbsp; &amp;nbsp;def apply (location:AgentHandle, name:String) : ServiceHandle = 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; new ServiceHandle (location, name)
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;inline class ServiceHandle (val loc:AgentHandle, val name:String) {
&lt;br&gt;&amp;nbsp; &amp;nbsp;def action (method:String, args:AttrAccess*) = 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (loc == Agents.me)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new ServiceActionToInvoke(name, AI(method), args:_*)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new ServiceActionToInvoke(loc.url, name, AI(method), args:_*)
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;so that you can write Service(&amp;quot;console&amp;quot;) action (&amp;quot;writeln&amp;quot;, ...)
&lt;br&gt;&lt;br&gt;It would be great if i could mark the ServiceHandle class as inline...I don't actually need instances created.
&lt;br&gt;&lt;br&gt;Likewise about implicit and RichInt or RichString etc...it's basically.
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;It may apply to Some as well and end that debate :)
&lt;br&gt;&lt;br&gt;Sorry if this has been suggested before, search &amp;quot;inline class&amp;quot; didn't return anything.
&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;Razvan Cojocaru,
&lt;br&gt;Work: &lt;a href=&quot;http://www.sigma-systems.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sigma-systems.com&lt;/a&gt;&lt;br&gt;Me: &lt;a href=&quot;http://feeds.razie.com/RazvanTech&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://feeds.razie.com/RazvanTech&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/inline-classes-tp26488946p26488946.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480369</id>
	<title>Re: Only setting a field is forbidden</title>
	<published>2009-11-23T07:39:18Z</published>
	<updated>2009-11-23T07:39:18Z</updated>
	<author>
		<name>Ricky Clarkson</name>
	</author>
	<content type="html">It does. &amp;nbsp;Feel free to make the getter private.
&lt;br&gt;&lt;br&gt;2009/11/23 Elazar Leibovich &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480369&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;elazarl@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I believe the Esser knew that, but wondered why wouldn't the spec. allow
&lt;br&gt;&amp;gt; set-only field of an object (for internal use only).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Mon, Nov 23, 2009 at 3:02 PM, Daniel Sobral &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480369&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dcsobral@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Setter syntax only works if there's a getter of the same name. It's in the
&lt;br&gt;&amp;gt;&amp;gt; specification.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Mon, Nov 23, 2009 at 8:50 AM, f.esser &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480369&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;esser.friedrich@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Is there a reason, why the last line is an error (Scala 2.8), if
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  def foo= f
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; is not present.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; class Foo {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  private var f: String= _
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; //  def foo= f
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  def foo_= (s: String) = f= s
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; object SnippetTest {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  def main(args: Array[String]) = {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;    val f= new Foo
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;    f.foo_=(&amp;quot;oha&amp;quot;)  // ok!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;    f.foo= &amp;quot;oha&amp;quot;     // error without: def foo= f
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;  }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/Only-setting-a-field-is-forbidden-tp26475135p26475135.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Only-setting-a-field-is-forbidden-tp26475135p26475135.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Sent from the Scala - Debate mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Daniel C. Sobral
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Veni, vidi, veterni.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ricky Clarkson
&lt;br&gt;Java and Scala Programmer, AD Holdings
&lt;br&gt;+44 1565 770804
&lt;br&gt;Skype: ricky_clarkson
&lt;br&gt;Google Talk: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480369&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ricky.clarkson@...&lt;/a&gt;
&lt;br&gt;Google Wave: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480369&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ricky.clarkson@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Only-setting-a-field-is-forbidden-tp26475135p26480369.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26480261</id>
	<title>Re: Only setting a field is forbidden</title>
	<published>2009-11-23T07:34:27Z</published>
	<updated>2009-11-23T07:34:27Z</updated>
	<author>
		<name>Elazar Leibovich</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;I believe the Esser knew that, but wondered why wouldn&amp;#39;t the spec. allow set-only field of an object (for internal use only).&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Nov 23, 2009 at 3:02 PM, Daniel Sobral &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480261&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dcsobral@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;Setter syntax only works if there&amp;#39;s a getter of the same name. It&amp;#39;s in the specification.&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;
&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Nov 23, 2009 at 8:50 AM, f.esser &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26480261&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;esser.friedrich@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style=&quot;border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex&quot; class=&quot;gmail_quote&quot;&gt;&lt;br&gt;Is there a reason, why the last line is an error (Scala 2.8), if&lt;br&gt; def foo= f&lt;br&gt;is not present.&lt;br&gt;

&lt;br&gt;class Foo {&lt;br&gt; private var f: String= _&lt;br&gt;//  def foo= f&lt;br&gt; def foo_= (s: String) = f= s&lt;br&gt;}&lt;br&gt;&lt;br&gt;object SnippetTest {&lt;br&gt;&lt;br&gt; def main(args: Array[String]) = {&lt;br&gt;   val f= new Foo&lt;br&gt;   f.foo_=(&amp;quot;oha&amp;quot;)  // ok!&lt;br&gt;


   f.foo= &amp;quot;oha&amp;quot;     // error without: def foo= f&lt;br&gt; }&lt;br&gt;}&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;--&lt;br&gt;View this message in context: &lt;a href=&quot;http://old.nabble.com/Only-setting-a-field-is-forbidden-tp26475135p26475135.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Only-setting-a-field-is-forbidden-tp26475135p26475135.html&lt;/a&gt;&lt;br&gt;


Sent from the Scala - Debate mailing list archive at Nabble.com.&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;font color=&quot;#888888&quot;&gt;-- &lt;br&gt;Daniel C. Sobral&lt;br&gt;&lt;br&gt;Veni, vidi, veterni.&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Only-setting-a-field-is-forbidden-tp26475135p26480261.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26477673</id>
	<title>Re: Only setting a field is forbidden</title>
	<published>2009-11-23T05:02:46Z</published>
	<updated>2009-11-23T05:02:46Z</updated>
	<author>
		<name>Daniel Sobral</name>
	</author>
	<content type="html">Setter syntax only works if there&amp;#39;s a getter of the same name. It&amp;#39;s in the specification.&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Nov 23, 2009 at 8:50 AM, f.esser &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26477673&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;esser.friedrich@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style=&quot;BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex&quot; class=&quot;gmail_quote&quot;&gt;&lt;br&gt;Is there a reason, why the last line is an error (Scala 2.8), if&lt;br&gt; def foo= f&lt;br&gt;is not present.&lt;br&gt;

&lt;br&gt;class Foo {&lt;br&gt; private var f: String= _&lt;br&gt;//  def foo= f&lt;br&gt; def foo_= (s: String) = f= s&lt;br&gt;}&lt;br&gt;&lt;br&gt;object SnippetTest {&lt;br&gt;&lt;br&gt; def main(args: Array[String]) = {&lt;br&gt;   val f= new Foo&lt;br&gt;   f.foo_=(&amp;quot;oha&amp;quot;)  // ok!&lt;br&gt;

   f.foo= &amp;quot;oha&amp;quot;     // error without: def foo= f&lt;br&gt; }&lt;br&gt;}&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;--&lt;br&gt;View this message in context: &lt;a href=&quot;http://old.nabble.com/Only-setting-a-field-is-forbidden-tp26475135p26475135.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Only-setting-a-field-is-forbidden-tp26475135p26475135.html&lt;/a&gt;&lt;br&gt;

Sent from the Scala - Debate mailing list archive at Nabble.com.&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Daniel C. Sobral&lt;br&gt;&lt;br&gt;Veni, vidi, veterni.&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Only-setting-a-field-is-forbidden-tp26475135p26477673.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26475135</id>
	<title>Only setting a field is forbidden</title>
	<published>2009-11-23T02:50:44Z</published>
	<updated>2009-11-23T02:50:44Z</updated>
	<author>
		<name>f.esser</name>
	</author>
	<content type="html">Is there a reason, why the last line is an error (Scala 2.8), if 
&lt;br&gt;&amp;nbsp; def foo= f 
&lt;br&gt;is not present.
&lt;br&gt;&lt;br&gt;class Foo {
&lt;br&gt;&amp;nbsp; private var f: String= _
&lt;br&gt;// &amp;nbsp;def foo= f
&lt;br&gt;&amp;nbsp; def foo_= (s: String) = f= s
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;object SnippetTest {
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;nbsp; def main(args: Array[String]) = {
&lt;br&gt;&amp;nbsp; &amp;nbsp; val f= new Foo
&lt;br&gt;&amp;nbsp; &amp;nbsp; f.foo_=(&amp;quot;oha&amp;quot;) &amp;nbsp;// ok!
&lt;br&gt;&amp;nbsp; &amp;nbsp; f.foo= &amp;quot;oha&amp;quot; &amp;nbsp; &amp;nbsp; // error without: def foo= f 
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;}</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Only-setting-a-field-is-forbidden-tp26475135p26475135.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26468722</id>
	<title>Re: Binary Literals and underscore numbers in Scala?</title>
	<published>2009-11-22T11:42:52Z</published>
	<updated>2009-11-22T11:42:52Z</updated>
	<author>
		<name>Stepan Koltsov-2</name>
	</author>
	<content type="html">On Sat, Nov 21, 2009 at 13:38, Landei &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26468722&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Daniel.Gronau@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The binary literal and underscore number &amp;quot;coins&amp;quot; just hit the last Java7
&lt;br&gt;&amp;gt; milestone. Are there any plans to add these features in Scala? I guess it
&lt;br&gt;&amp;gt; wouldn't be too complicated to implement (but probably too complicated to
&lt;br&gt;&amp;gt; me).
&lt;br&gt;&lt;br&gt;Language complication from these features is more then utility (in
&lt;br&gt;Java 7 too). Moreover, it is time to remove features from Scala.
&lt;br&gt;&lt;br&gt;S.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; Daniel
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Binary-Literals-and-underscore-numbers-in-Scala--tp26454692p26454692.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Binary-Literals-and-underscore-numbers-in-Scala--tp26454692p26454692.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the Scala - Debate mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Binary-Literals-and-underscore-numbers-in-Scala--tp26454692p26468722.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26466780</id>
	<title>Re: Re: Option and NotNull</title>
	<published>2009-11-22T08:31:53Z</published>
	<updated>2009-11-22T08:31:53Z</updated>
	<author>
		<name>Stepan Koltsov-2</name>
	</author>
	<content type="html">On Sun, Nov 22, 2009 at 18:24, Daniel Sobral &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466780&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dcsobral@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; But it can appear on a 2.8.1, for instance, which might not be as far as all
&lt;br&gt;&amp;gt; that.
&lt;br&gt;&lt;br&gt;I hope, 2.8.x releases will contain bugfixes only.
&lt;br&gt;&lt;br&gt;S.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Sun, Nov 22, 2009 at 1:09 PM, David Flemström &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466780&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david.flemstrom@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I would have liked to see it in 2.8. Who knows when 2.9 or even 3.0 will
&lt;br&gt;&amp;gt;&amp;gt; come
&lt;br&gt;&amp;gt;&amp;gt; out? It will probably be a year or more until then.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Sunday 22 November 2009 15:24:33 Jesper Nordenberg wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Martin just wrote it will be worked on after the 2.8 release, which is
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; certainly more important than NotNull at this time. But I agree that it
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; should be fixed in a not too distant future.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; /Jesper Nordenberg
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; David Flemström wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; It's sad that this has such a low priority; about 50% of the bugs I
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; get
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; when doing Java inter-operation come from NPE's, or the lack thereof
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; as
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; the case may be.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; I would personally really have preferred if there wasn't a null in
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Scala
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; at all, and if Java methods would have thrown a NullException when
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; they
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; return null (The null check for the exception throw would be optimized
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; away for the case when a special method &amp;quot;toOption(javaMethod())&amp;quot; (or
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; similarly named) was used)
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; On Saturday 21 November 2009 17:55:51 martin odersky wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; NotNull is very much work in progress (or should I say: in
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; suspension?). We'll get back to it sometimes after 2.8 is released.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Cheers
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;  -- Martin
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 2:50 PM, Erik Engbrecht
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466780&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erik.engbrecht@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; That's different than what I'm suggesting.  That would be:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; trait Option[+T &amp;lt;: NotNull]
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; so that object contained by the Option can't be null.  What I'm
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; suggesting is:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; trait Option[+T] with NotNull
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; so that the compiler will enforce that a reference to an Option is
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; not
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; null. The option would still be allowed to contain null.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 8:42 AM, Kevin Wright
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466780&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kev.lee.wright@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; There's a lovely boundary condition when fetching i.e. the 5th item
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; from a list
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; None =&amp;gt; The list doesn't have a 5th item
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Some(xxx) =&amp;gt; The 5th item exists and contains the value xxx
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Some(null) =&amp;gt; The 5th item exists and was explicitly populated with
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; null
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 1:25 PM, Francois &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466780&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fanf42@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On 21/11/2009 13:53, Erik Engbrecht wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I haven't dug into this much, so I could be completely off base,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; but
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; why doesn't Option extend NotNull?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I believe that it was already discussed in (a, don't remember
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; which)
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; mailing list and that some corner cases make that modification
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; rather
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; disruptive for existing code. Or impossible.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; A mailing list archive digging may be helpful here.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Francois ARMAND
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://fanf42.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fanf42.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://erikengbrecht.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://erikengbrecht.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Daniel C. Sobral
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Veni, vidi, veterni.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Option-and-NotNull-tp26456316p26466780.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26466179</id>
	<title>Re: Re: Option and NotNull</title>
	<published>2009-11-22T07:24:54Z</published>
	<updated>2009-11-22T07:24:54Z</updated>
	<author>
		<name>Daniel Sobral</name>
	</author>
	<content type="html">But it can appear on a 2.8.1, for instance, which might not be as far as all that.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Sun, Nov 22, 2009 at 1:09 PM, David Flemström &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466179&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david.flemstrom@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;

&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;I would have liked to see it in 2.8. Who knows when 2.9 or even 3.0 will come&lt;br&gt;
out? It will probably be a year or more until then.&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
On Sunday 22 November 2009 15:24:33 Jesper Nordenberg wrote:&lt;br&gt;
&amp;gt; Martin just wrote it will be worked on after the 2.8 release, which is&lt;br&gt;
&amp;gt; certainly more important than NotNull at this time. But I agree that it&lt;br&gt;
&amp;gt; should be fixed in a not too distant future.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; /Jesper Nordenberg&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; David Flemström wrote:&lt;br&gt;
&amp;gt; &amp;gt; It&amp;#39;s sad that this has such a low priority; about 50% of the bugs I get&lt;br&gt;
&amp;gt; &amp;gt; when doing Java inter-operation come from NPE&amp;#39;s, or the lack thereof as&lt;br&gt;
&amp;gt; &amp;gt; the case may be.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I would personally really have preferred if there wasn&amp;#39;t a null in Scala&lt;br&gt;
&amp;gt; &amp;gt; at all, and if Java methods would have thrown a NullException when they&lt;br&gt;
&amp;gt; &amp;gt; return null (The null check for the exception throw would be optimized&lt;br&gt;
&amp;gt; &amp;gt; away for the case when a special method &amp;quot;toOption(javaMethod())&amp;quot; (or&lt;br&gt;
&amp;gt; &amp;gt; similarly named) was used)&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; On Saturday 21 November 2009 17:55:51 martin odersky wrote:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; NotNull is very much work in progress (or should I say: in&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; suspension?). We&amp;#39;ll get back to it sometimes after 2.8 is released.&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Cheers&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;  -- Martin&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 2:50 PM, Erik Engbrecht&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466179&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erik.engbrecht@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; That&amp;#39;s different than what I&amp;#39;m suggesting.  That would be:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; trait Option[+T &amp;lt;: NotNull]&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; so that object contained by the Option can&amp;#39;t be null.  What I&amp;#39;m&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; suggesting is:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; trait Option[+T] with NotNull&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; so that the compiler will enforce that a reference to an Option is not&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; null. The option would still be allowed to contain null.&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 8:42 AM, Kevin Wright&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466179&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kev.lee.wright@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; There&amp;#39;s a lovely boundary condition when fetching i.e. the 5th item&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; from a list&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; None =&amp;gt; The list doesn&amp;#39;t have a 5th item&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Some(xxx) =&amp;gt; The 5th item exists and contains the value xxx&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Some(null) =&amp;gt; The 5th item exists and was explicitly populated with&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; null&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 1:25 PM, Francois &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466179&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fanf42@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On 21/11/2009 13:53, Erik Engbrecht wrote:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I haven&amp;#39;t dug into this much, so I could be completely off base, but&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; why doesn&amp;#39;t Option extend NotNull?&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I believe that it was already discussed in (a, don&amp;#39;t remember which)&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; mailing list and that some corner cases make that modification rather&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; disruptive for existing code. Or impossible.&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; A mailing list archive digging may be helpful here.&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; --&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Francois ARMAND&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://fanf42.blogspot.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://fanf42.blogspot.com&lt;/a&gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; --&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://erikengbrecht.blogspot.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://erikengbrecht.blogspot.com/&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Daniel C. Sobral&lt;br&gt;&lt;br&gt;Veni, vidi, veterni.&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Option-and-NotNull-tp26456316p26466179.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26466056</id>
	<title>Re: Re: Option and NotNull</title>
	<published>2009-11-22T07:09:36Z</published>
	<updated>2009-11-22T07:09:36Z</updated>
	<author>
		<name>David Flemström</name>
	</author>
	<content type="html">I would have liked to see it in 2.8. Who knows when 2.9 or even 3.0 will come 
&lt;br&gt;out? It will probably be a year or more until then.
&lt;br&gt;&lt;br&gt;On Sunday 22 November 2009 15:24:33 Jesper Nordenberg wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Martin just wrote it will be worked on after the 2.8 release, which is
&lt;br&gt;&amp;gt; certainly more important than NotNull at this time. But I agree that it
&lt;br&gt;&amp;gt; should be fixed in a not too distant future.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /Jesper Nordenberg
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; David Flemström wrote:
&lt;br&gt;&amp;gt; &amp;gt; It's sad that this has such a low priority; about 50% of the bugs I get
&lt;br&gt;&amp;gt; &amp;gt; when doing Java inter-operation come from NPE's, or the lack thereof as
&lt;br&gt;&amp;gt; &amp;gt; the case may be.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I would personally really have preferred if there wasn't a null in Scala
&lt;br&gt;&amp;gt; &amp;gt; at all, and if Java methods would have thrown a NullException when they
&lt;br&gt;&amp;gt; &amp;gt; return null (The null check for the exception throw would be optimized
&lt;br&gt;&amp;gt; &amp;gt; away for the case when a special method &amp;quot;toOption(javaMethod())&amp;quot; (or
&lt;br&gt;&amp;gt; &amp;gt; similarly named) was used)
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Saturday 21 November 2009 17:55:51 martin odersky wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; NotNull is very much work in progress (or should I say: in
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; suspension?). We'll get back to it sometimes after 2.8 is released.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Cheers
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp;-- Martin
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 2:50 PM, Erik Engbrecht
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466056&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erik.engbrecht@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; That's different than what I'm suggesting. &amp;nbsp;That would be:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; trait Option[+T &amp;lt;: NotNull]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; so that object contained by the Option can't be null. &amp;nbsp;What I'm
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; suggesting is:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; trait Option[+T] with NotNull
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; so that the compiler will enforce that a reference to an Option is not
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; null. The option would still be allowed to contain null.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 8:42 AM, Kevin Wright
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466056&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kev.lee.wright@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; There's a lovely boundary condition when fetching i.e. the 5th item
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; from a list
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; None =&amp;gt; The list doesn't have a 5th item
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Some(xxx) =&amp;gt; The 5th item exists and contains the value xxx
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Some(null) =&amp;gt; The 5th item exists and was explicitly populated with
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; null
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 1:25 PM, Francois &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26466056&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fanf42@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On 21/11/2009 13:53, Erik Engbrecht wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I haven't dug into this much, so I could be completely off base, but
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; why doesn't Option extend NotNull?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I believe that it was already discussed in (a, don't remember which)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; mailing list and that some corner cases make that modification rather
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; disruptive for existing code. Or impossible.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; A mailing list archive digging may be helpful here.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Francois ARMAND
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://fanf42.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fanf42.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://erikengbrecht.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://erikengbrecht.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Option-and-NotNull-tp26456316p26466056.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26465715</id>
	<title>Re: Option and NotNull</title>
	<published>2009-11-22T06:24:33Z</published>
	<updated>2009-11-22T06:24:33Z</updated>
	<author>
		<name>Jesper Nordenberg</name>
	</author>
	<content type="html">Martin just wrote it will be worked on after the 2.8 release, which is 
&lt;br&gt;certainly more important than NotNull at this time. But I agree that it 
&lt;br&gt;should be fixed in a not too distant future.
&lt;br&gt;&lt;br&gt;/Jesper Nordenberg
&lt;br&gt;&lt;br&gt;David Flemström wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; It's sad that this has such a low priority; about 50% of the bugs I get when 
&lt;br&gt;&amp;gt; doing Java inter-operation come from NPE's, or the lack thereof as the case 
&lt;br&gt;&amp;gt; may be.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I would personally really have preferred if there wasn't a null in Scala at 
&lt;br&gt;&amp;gt; all, and if Java methods would have thrown a NullException when they return 
&lt;br&gt;&amp;gt; null (The null check for the exception throw would be optimized away for the 
&lt;br&gt;&amp;gt; case when a special method &amp;quot;toOption(javaMethod())&amp;quot; (or similarly named) was 
&lt;br&gt;&amp;gt; used)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Saturday 21 November 2009 17:55:51 martin odersky wrote:
&lt;br&gt;&amp;gt;&amp;gt; NotNull is very much work in progress (or should I say: in
&lt;br&gt;&amp;gt;&amp;gt; suspension?). We'll get back to it sometimes after 2.8 is released.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Cheers
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;-- Martin
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 2:50 PM, Erik Engbrecht
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26465715&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erik.engbrecht@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; That's different than what I'm suggesting. &amp;nbsp;That would be:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; trait Option[+T &amp;lt;: NotNull]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; so that object contained by the Option can't be null. &amp;nbsp;What I'm
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; suggesting is:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; trait Option[+T] with NotNull
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; so that the compiler will enforce that a reference to an Option is not
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; null. The option would still be allowed to contain null.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 8:42 AM, Kevin Wright
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26465715&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kev.lee.wright@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; There's a lovely boundary condition when fetching i.e. the 5th item from
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; a list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; None =&amp;gt; The list doesn't have a 5th item
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Some(xxx) =&amp;gt; The 5th item exists and contains the value xxx
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Some(null) =&amp;gt; The 5th item exists and was explicitly populated with null
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 1:25 PM, Francois &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26465715&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fanf42@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On 21/11/2009 13:53, Erik Engbrecht wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I haven't dug into this much, so I could be completely off base, but
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; why doesn't Option extend NotNull?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I believe that it was already discussed in (a, don't remember which)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; mailing list and that some corner cases make that modification rather
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; disruptive for existing code. Or impossible.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; A mailing list archive digging may be helpful here.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Francois ARMAND
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://fanf42.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fanf42.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://erikengbrecht.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://erikengbrecht.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Option-and-NotNull-tp26456316p26465715.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26459956</id>
	<title>Re: Option and NotNull</title>
	<published>2009-11-21T12:28:04Z</published>
	<updated>2009-11-21T12:28:04Z</updated>
	<author>
		<name>David Flemström</name>
	</author>
	<content type="html">It's sad that this has such a low priority; about 50% of the bugs I get when 
&lt;br&gt;doing Java inter-operation come from NPE's, or the lack thereof as the case 
&lt;br&gt;may be.
&lt;br&gt;&lt;br&gt;I would personally really have preferred if there wasn't a null in Scala at 
&lt;br&gt;all, and if Java methods would have thrown a NullException when they return 
&lt;br&gt;null (The null check for the exception throw would be optimized away for the 
&lt;br&gt;case when a special method &amp;quot;toOption(javaMethod())&amp;quot; (or similarly named) was 
&lt;br&gt;used)
&lt;br&gt;&lt;br&gt;On Saturday 21 November 2009 17:55:51 martin odersky wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; NotNull is very much work in progress (or should I say: in
&lt;br&gt;&amp;gt; suspension?). We'll get back to it sometimes after 2.8 is released.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Cheers
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;-- Martin
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Sat, Nov 21, 2009 at 2:50 PM, Erik Engbrecht
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26459956&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erik.engbrecht@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; That's different than what I'm suggesting. &amp;nbsp;That would be:
&lt;br&gt;&amp;gt; &amp;gt; trait Option[+T &amp;lt;: NotNull]
&lt;br&gt;&amp;gt; &amp;gt; so that object contained by the Option can't be null. &amp;nbsp;What I'm
&lt;br&gt;&amp;gt; &amp;gt; suggesting is:
&lt;br&gt;&amp;gt; &amp;gt; trait Option[+T] with NotNull
&lt;br&gt;&amp;gt; &amp;gt; so that the compiler will enforce that a reference to an Option is not
&lt;br&gt;&amp;gt; &amp;gt; null. The option would still be allowed to contain null.
&lt;br&gt;&amp;gt; &amp;gt; On Sat, Nov 21, 2009 at 8:42 AM, Kevin Wright
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26459956&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kev.lee.wright@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; There's a lovely boundary condition when fetching i.e. the 5th item from
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; a list
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; None =&amp;gt; The list doesn't have a 5th item
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Some(xxx) =&amp;gt; The 5th item exists and contains the value xxx
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Some(null) =&amp;gt; The 5th item exists and was explicitly populated with null
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 1:25 PM, Francois &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26459956&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fanf42@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; On 21/11/2009 13:53, Erik Engbrecht wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; I haven't dug into this much, so I could be completely off base, but
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; why doesn't Option extend NotNull?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; I believe that it was already discussed in (a, don't remember which)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; mailing list and that some corner cases make that modification rather
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; disruptive for existing code. Or impossible.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; A mailing list archive digging may be helpful here.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Francois ARMAND
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://fanf42.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fanf42.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://erikengbrecht.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://erikengbrecht.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Option-and-NotNull-tp26456316p26459956.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26459392</id>
	<title>Re: Opening request for debate: the &quot;requires&quot;  clause...</title>
	<published>2009-11-21T11:09:23Z</published>
	<updated>2009-11-21T11:09:23Z</updated>
	<author>
		<name>Quenio dos Santos</name>
	</author>
	<content type="html">I was surprised that nobody else picked up on this one. &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;It just makes so much sense to me. The &amp;quot;requires&amp;quot; syntax does portray very well one of the main characteristics of this language, which is working on the small and the large.&lt;br&gt;
&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Nov 20, 2009 at 10:11 PM, Dave  Griffith &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26459392&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dave.l.griffith@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
&lt;br&gt;
&lt;br&gt;
I strongly advocate the resurrection of the &amp;quot;requires&amp;quot; syntax.  Clean,&lt;br&gt;
evocative, precise, giving an exact indication of the normal usage.  That it&lt;br&gt;
was yanked due to griping from the JML community (??!?!WTF??!!!?) was a&lt;br&gt;
ridiculous inversion of importance.&lt;br&gt;
&lt;br&gt;
--Dave Griffith&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;--&lt;br&gt;
View this message in context: &lt;a href=&quot;http://old.nabble.com/Opening-request-for-debate%3A-the-%22requires%22-clause...-tp26453515p26453643.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Opening-request-for-debate%3A-the-%22requires%22-clause...-tp26453515p26453643.html&lt;/a&gt;&lt;br&gt;

Sent from the Scala - Debate mailing list archive at Nabble.com.&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Opening-request-for-debate%3A-the-%22requires%22-clause...-tp26453515p26459392.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26458282</id>
	<title>Re: Option and NotNull</title>
	<published>2009-11-21T08:55:51Z</published>
	<updated>2009-11-21T08:55:51Z</updated>
	<author>
		<name>Martin Odersky</name>
	</author>
	<content type="html">NotNull is very much work in progress (or should I say: in
&lt;br&gt;suspension?). We'll get back to it sometimes after 2.8 is released.
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;&lt;br&gt;&amp;nbsp;-- Martin
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Sat, Nov 21, 2009 at 2:50 PM, Erik Engbrecht
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26458282&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;erik.engbrecht@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; That's different than what I'm suggesting.  That would be:
&lt;br&gt;&amp;gt; trait Option[+T &amp;lt;: NotNull]
&lt;br&gt;&amp;gt; so that object contained by the Option can't be null.  What I'm suggesting
&lt;br&gt;&amp;gt; is:
&lt;br&gt;&amp;gt; trait Option[+T] with NotNull
&lt;br&gt;&amp;gt; so that the compiler will enforce that a reference to an Option is not null.
&lt;br&gt;&amp;gt;  The option would still be allowed to contain null.
&lt;br&gt;&amp;gt; On Sat, Nov 21, 2009 at 8:42 AM, Kevin Wright
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26458282&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kev.lee.wright@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; There's a lovely boundary condition when fetching i.e. the 5th item from a
&lt;br&gt;&amp;gt;&amp;gt; list
&lt;br&gt;&amp;gt;&amp;gt; None =&amp;gt; The list doesn't have a 5th item
&lt;br&gt;&amp;gt;&amp;gt; Some(xxx) =&amp;gt; The 5th item exists and contains the value xxx
&lt;br&gt;&amp;gt;&amp;gt; Some(null) =&amp;gt; The 5th item exists and was explicitly populated with null
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Sat, Nov 21, 2009 at 1:25 PM, Francois &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26458282&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fanf42@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On 21/11/2009 13:53, Erik Engbrecht wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I haven't dug into this much, so I could be completely off base, but why
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; doesn't Option extend NotNull?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I believe that it was already discussed in (a, don't remember which)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; mailing list and that some corner cases make that modification rather
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; disruptive for existing code. Or impossible.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; A mailing list archive digging may be helpful here.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Francois ARMAND
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://fanf42.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fanf42.blogspot.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://erikengbrecht.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://erikengbrecht.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Option-and-NotNull-tp26456316p26458282.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26457091</id>
	<title>Mailing list reminder: Scala-debate</title>
	<published>2009-11-21T06:32:02Z</published>
	<updated>2009-11-21T06:32:02Z</updated>
	<author>
		<name>Scala website</name>
	</author>
	<content type="html">Welcome to the &amp;quot;Scala-debate&amp;quot; mailing list.
&lt;br&gt;&lt;br&gt;This automatic reminder is sent once a month to the list,
&lt;br&gt;to keep subscribers up-to-date with the mailing list services,
&lt;br&gt;and to help keeping the list on topic.
&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;The &amp;quot;Scala-debate&amp;quot; mailing list:
&lt;br&gt;&lt;br&gt;This list is a more relaxed forum for Scala discussions
&lt;br&gt;that would probably be off-topic or too convoluted for
&lt;br&gt;the other lists, but that may still be quite interesting
&lt;br&gt;to follow for a selected readership.
&lt;br&gt;&lt;br&gt;In particular, the following are appropriate:
&lt;br&gt;&lt;br&gt;&amp;nbsp; * threads that evolved beyond their initial topic,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; and have become too long or convoluted to be
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; of interest to most readers
&lt;br&gt;&amp;nbsp; * threads discussing extremely specialized topics
&lt;br&gt;&amp;nbsp; * threads that are mostly speculative in nature,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; out-of-the-box thinking, philosophical views
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (as long as they are still somehow related
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; to Scala)
&lt;br&gt;&amp;nbsp; * debates (of course)
&lt;br&gt;&lt;br&gt;The &amp;quot;Scala-debate&amp;quot; list is the natural destination of all
&lt;br&gt;the threads that start on other mailing lists, but are no
&lt;br&gt;longer on topic on their original list, or have turned
&lt;br&gt;into an in-depth debate about something.
&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;Other information:
&lt;br&gt;&lt;br&gt;There are several Scala lists devoted to individual topics (and
&lt;br&gt;more may be created in the future). For the full list, please
&lt;br&gt;see: &lt;a href=&quot;http://www.scala-lang.org/node/199&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.scala-lang.org/node/199&lt;/a&gt;&lt;br&gt;&lt;br&gt;Try to avoid cross-posting whenever possible. If you can, select
&lt;br&gt;the list that is closer to your topic and post in that list only.
&lt;br&gt;In any case, never cross-post replies.
&lt;br&gt;&lt;br&gt;If you ever want to unsubscribe from this list, just follow the
&lt;br&gt;instructions on this page:
&lt;br&gt;&lt;a href=&quot;http://listes.epfl.ch/doc_en.cgi?liste=scala-debate&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://listes.epfl.ch/doc_en.cgi?liste=scala-debate&lt;/a&gt;&lt;br&gt;&lt;br&gt;Thank you!
&lt;br&gt;The Scala Team
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mailing-list-reminder%3A-Scala-debate-tp26457091p26457091.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26456770</id>
	<title>Re: Option and NotNull</title>
	<published>2009-11-21T05:50:08Z</published>
	<updated>2009-11-21T05:50:08Z</updated>
	<author>
		<name>Erik Engbrecht</name>
	</author>
	<content type="html">That&amp;#39;s different than what I&amp;#39;m suggesting.  That would be:&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;trait Option[+T &amp;lt;: NotNull]&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;so that object contained by the Option can&amp;#39;t be null.  What I&amp;#39;m suggesting is:&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;trait Option[+T] with NotNull&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;so that the compiler will enforce that a reference to an Option is not null.  The option would still be allowed to contain null.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;
On Sat, Nov 21, 2009 at 8:42 AM, Kevin Wright &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26456770&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kev.lee.wright@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
There&amp;#39;s a lovely boundary condition when fetching i.e. the 5th item from a list&lt;div&gt;&lt;br&gt;&lt;div&gt;None =&amp;gt; The list doesn&amp;#39;t have a 5th item&lt;br&gt;&lt;div&gt;Some(xxx) =&amp;gt; The 5th item exists and contains the value xxx&lt;/div&gt;
&lt;div&gt;
Some(null) =&amp;gt; The 5th item exists and was explicitly populated with null&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Sat, Nov 21, 2009 at 1:25 PM, Francois &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26456770&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fanf42@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;

&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;&lt;div&gt;On 21/11/2009 13:53, Erik Engbrecht wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;
I haven&amp;#39;t dug into this much, so I could be completely off base, but why&lt;br&gt;
doesn&amp;#39;t Option extend NotNull?&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;/div&gt;
I believe that it was already discussed in (a, don&amp;#39;t remember which) mailing list and that some corner cases make that modification rather disruptive for existing code. Or impossible.&lt;br&gt;
&lt;br&gt;
A mailing list archive digging may be helpful here.&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Francois ARMAND&lt;br&gt;
&lt;a href=&quot;http://fanf42.blogspot.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://fanf42.blogspot.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;&lt;a href=&quot;http://erikengbrecht.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://erikengbrecht.blogspot.com/&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Option-and-NotNull-tp26456316p26456770.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26456686</id>
	<title>Re: Option and NotNull</title>
	<published>2009-11-21T05:42:28Z</published>
	<updated>2009-11-21T05:42:28Z</updated>
	<author>
		<name>Kevin Wright-4</name>
	</author>
	<content type="html">There&amp;#39;s a lovely boundary condition when fetching i.e. the 5th item from a list&lt;div&gt;&lt;br&gt;&lt;div&gt;None =&amp;gt; The list doesn&amp;#39;t have a 5th item&lt;br&gt;&lt;div&gt;Some(xxx) =&amp;gt; The 5th item exists and contains the value xxx&lt;/div&gt;&lt;div&gt;
Some(null) =&amp;gt; The 5th item exists and was explicitly populated with null&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Sat, Nov 21, 2009 at 1:25 PM, Francois &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26456686&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fanf42@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;&lt;div class=&quot;im&quot;&gt;On 21/11/2009 13:53, Erik Engbrecht wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;
I haven&amp;#39;t dug into this much, so I could be completely off base, but why&lt;br&gt;
doesn&amp;#39;t Option extend NotNull?&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;/div&gt;
I believe that it was already discussed in (a, don&amp;#39;t remember which) mailing list and that some corner cases make that modification rather disruptive for existing code. Or impossible.&lt;br&gt;
&lt;br&gt;
A mailing list archive digging may be helpful here.&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Francois ARMAND&lt;br&gt;
&lt;a href=&quot;http://fanf42.blogspot.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://fanf42.blogspot.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Option-and-NotNull-tp26456316p26456686.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26456532</id>
	<title>Re: Option and NotNull</title>
	<published>2009-11-21T05:25:30Z</published>
	<updated>2009-11-21T05:25:30Z</updated>
	<author>
		<name>Francois Armand-2</name>
	</author>
	<content type="html">On 21/11/2009 13:53, Erik Engbrecht wrote:
&lt;br&gt;&amp;gt; I haven't dug into this much, so I could be completely off base, but why
&lt;br&gt;&amp;gt; doesn't Option extend NotNull?
&lt;br&gt;&lt;br&gt;I believe that it was already discussed in (a, don't remember which) 
&lt;br&gt;mailing list and that some corner cases make that modification rather 
&lt;br&gt;disruptive for existing code. Or impossible.
&lt;br&gt;&lt;br&gt;A mailing list archive digging may be helpful here.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Francois ARMAND
&lt;br&gt;&lt;a href=&quot;http://fanf42.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fanf42.blogspot.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Option-and-NotNull-tp26456316p26456532.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26456316</id>
	<title>Option and NotNull</title>
	<published>2009-11-21T04:53:48Z</published>
	<updated>2009-11-21T04:53:48Z</updated>
	<author>
		<name>Erik Engbrecht</name>
	</author>
	<content type="html">I haven&amp;#39;t dug into this much, so I could be completely off base, but why doesn&amp;#39;t Option extend NotNull?
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Here&amp;#39;s an interpreter sessions showing usage of NotNull for reference.  It seems to me that having a null where one would expect an Option is just plain evil, and if there&amp;#39;s compiler support that can be enlisted to prevent it, it should be enlisted.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;scala&amp;gt; def foo(x: String with NotNull) = &amp;quot;Hello, &amp;quot; + x + &amp;quot;!&amp;quot;&lt;/div&gt;&lt;div&gt;foo: (String with NotNull)java.lang.String&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;scala&amp;gt; foo(null)&lt;/div&gt;&lt;div&gt;&amp;lt;console&amp;gt;:6: error: type mismatch;&lt;/div&gt;
&lt;div&gt; found   : Null(null)&lt;/div&gt;&lt;div&gt; required: String with NotNull&lt;/div&gt;&lt;div&gt;       foo(null)&lt;/div&gt;&lt;div&gt;           ^&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;scala&amp;gt; val x = &amp;quot;world&amp;quot;&lt;/div&gt;&lt;div&gt;x: java.lang.String = world&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;scala&amp;gt; foo(x)&lt;/div&gt;&lt;div&gt;&amp;lt;console&amp;gt;:7: error: type mismatch;&lt;/div&gt;&lt;div&gt; found   : java.lang.String&lt;/div&gt;&lt;div&gt; required: String with NotNull&lt;/div&gt;&lt;div&gt;       foo(x)&lt;/div&gt;&lt;div&gt;           ^&lt;/div&gt;&lt;div&gt;
&lt;br&gt;&lt;/div&gt;&lt;div&gt;scala&amp;gt; val y: String with NotNull = &amp;quot;world&amp;quot;&lt;/div&gt;&lt;div&gt;y: String with NotNull = world&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;scala&amp;gt; foo(y)&lt;/div&gt;&lt;div&gt;res2: java.lang.String = Hello, world!&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;scala&amp;gt; def bar(x: String) = &amp;quot;Hello, &amp;quot; + x + &amp;quot;!&amp;quot;&lt;/div&gt;&lt;div&gt;bar: (String)java.lang.String&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;scala&amp;gt; bar(null)&lt;/div&gt;&lt;div&gt;res3: java.lang.String = Hello, null!&lt;/div&gt;&lt;div&gt;&lt;br&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;scala&amp;gt; foo(&amp;quot;world&amp;quot;)&lt;/div&gt;&lt;div&gt;res4: java.lang.String = Hello, world!&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;scala&amp;gt; &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Option-and-NotNull-tp26456316p26456316.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26454692</id>
	<title>Binary Literals and underscore numbers in Scala?</title>
	<published>2009-11-21T02:38:40Z</published>
	<updated>2009-11-21T02:38:40Z</updated>
	<author>
		<name>Landei</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;The binary literal and underscore number &amp;quot;coins&amp;quot; just hit the last Java7 milestone. Are there any plans to add these features in Scala? I guess it wouldn't be too complicated to implement (but probably too complicated to me).
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Daniel</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Binary-Literals-and-underscore-numbers-in-Scala--tp26454692p26454692.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26453643</id>
	<title>Re: Opening request for debate: the &quot;requires&quot; clause...</title>
	<published>2009-11-20T20:11:27Z</published>
	<updated>2009-11-20T20:11:27Z</updated>
	<author>
		<name>Dave  Griffith</name>
	</author>
	<content type="html">&lt;br&gt;I strongly advocate the resurrection of the &amp;quot;requires&amp;quot; syntax. &amp;nbsp;Clean, evocative, precise, giving an exact indication of the normal usage. &amp;nbsp;That it was yanked due to griping from the JML community (??!?!WTF??!!!?) was a ridiculous inversion of importance.
&lt;br&gt;&lt;br&gt;--Dave Griffith</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Opening-request-for-debate%3A-the-%22requires%22-clause...-tp26453515p26453643.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26453515</id>
	<title>Opening request for debate: the &quot;requires&quot; clause...</title>
	<published>2009-11-20T19:39:16Z</published>
	<updated>2009-11-20T19:39:16Z</updated>
	<author>
		<name>Quenio dos Santos</name>
	</author>
	<content type="html">Hello All,&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I am wondering how people few about this, but I am all for the return of the &amp;quot;requires&amp;quot; syntax as an option to define selftypes.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;That syntax is much more intuitive when you are implementing system modules as traits and defining the dependencies of those modules using selftypes.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;From the Programming in Scala book, where SimpleRecipes uses fruits defined in SimpleFoods, this is how one would define the dependency of SimpleRecipes on SimpleFoods with the selftype syntax in Scala 2.7:&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;trait SimpleRecipes {&lt;/div&gt;&lt;div&gt;    this: SimpleFoods =&amp;gt; // expresses the dependency by having SimpleFoods as the selftype&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;    object FruitSalad extends Recipe(&amp;quot;Fruit Salad&amp;quot;, List(Apple, Pear)) // Apple and Pear are in scope.&lt;/div&gt;
&lt;div&gt;    ...&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;The syntax above is probably more precise than the &amp;quot;requires&amp;quot; syntax in earlier versions of Scala, but from the context of combining system&amp;#39;s modules (which is what SimpleRecipes and SimpleFoods are in this example; they are part of a larger system of Recipes), the &amp;quot;requires&amp;quot; syntax is so much more intuitive:&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;trait SimpleRecipes requires SimpleFoods {&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;    object FruitSalad extends Recipe(&amp;quot;Fruit Salad&amp;quot;, List(Apple, Pear)) &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;
I would love it to come back even if optional.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;- Quenio&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Opening-request-for-debate%3A-the-%22requires%22-clause...-tp26453515p26453515.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26433710</id>
	<title>Re: Closures make it into Java 7</title>
	<published>2009-11-19T12:38:27Z</published>
	<updated>2009-11-19T12:38:27Z</updated>
	<author>
		<name>Ricky Clarkson</name>
	</author>
	<content type="html">I would suggest that, for example, () =&amp;gt; println(&amp;quot;hello&amp;quot;), would be
&lt;br&gt;better typed to match its context, rather than automatically being a
&lt;br&gt;Function0[Unit] (and then maybe implicitly converted to a Runnable).
&lt;br&gt;&lt;br&gt;Without a new language construct. &amp;nbsp;Does this break any code?
&lt;br&gt;&lt;br&gt;2009/11/19 Philip Köster &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26433710&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;philip.koester@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; The whole point of Scala's language features is that better Java interop
&lt;br&gt;&amp;gt;&amp;gt; is &amp;quot;just a library&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Of course this is what makes Scala so appealing: that it would let you
&lt;br&gt;&amp;gt; design advanced libraries that are both pleasant to use and read. And
&lt;br&gt;&amp;gt; pleasant to design, even! As for automatic ``closure conversion,&amp;quot; as Ricky
&lt;br&gt;&amp;gt; called it, we would of course need a new construct in the language, which
&lt;br&gt;&amp;gt; should be easy to implement as well as easy to understand and adopt. Groovy
&lt;br&gt;&amp;gt; users have come to love this feature. In Scala, once you have implicit
&lt;br&gt;&amp;gt; conversions to do the job for `Runnable', you might need the same for
&lt;br&gt;&amp;gt; `Callable', and then, while you're at it, for `Future', `RunnableFuture' and
&lt;br&gt;&amp;gt; what have you. This will easily bloat your collection of implicit defs anf
&lt;br&gt;&amp;gt; force you to write boilerplate.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; While it is true what you wrote and while I agree this to be a good thing, a
&lt;br&gt;&amp;gt; second point of Scala is to avoid boilerplate. This is not just a matter of
&lt;br&gt;&amp;gt; design or taste---code that comprises less boilerplate is easier to review,
&lt;br&gt;&amp;gt; which directly increases robustness and security.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Best
&lt;br&gt;&amp;gt; ---Ph.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ricky Clarkson
&lt;br&gt;Java and Scala Programmer, AD Holdings
&lt;br&gt;+44 1565 770804
&lt;br&gt;Skype: ricky_clarkson
&lt;br&gt;Google Talk: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26433710&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ricky.clarkson@...&lt;/a&gt;
&lt;br&gt;Google Wave: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26433710&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ricky.clarkson@...&lt;/a&gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Closures-make-it-into-Java-7-tp26416600p26433710.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26432810</id>
	<title>Re: Closures make it into Java 7</title>
	<published>2009-11-19T11:42:58Z</published>
	<updated>2009-11-19T11:42:58Z</updated>
	<author>
		<name>phkoester</name>
	</author>
	<content type="html">Kris Nuttycombe wrote:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; Much better in my opinion would
&lt;br&gt;&amp;gt; be:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; implicit def f2richF[T](f: Function0[T]): RichFunction0[T] = RichFunction0(f)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; case class RichFunction0[T](f: Function0[T]) {
&lt;br&gt;&amp;gt; &amp;nbsp; def runnable = new Runnable {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; def run: Unit = f()
&lt;br&gt;&amp;gt; &amp;nbsp; }
&lt;br&gt;&amp;gt; }
&lt;br&gt;&lt;br&gt;What is improved this way? I'm asking because I don't see it at first 
&lt;br&gt;glance.
&lt;br&gt;&lt;br&gt;&amp;gt; Closure conversion seems like it'd obscure a whole lot of potentially
&lt;br&gt;&amp;gt; important type information, particularly if a closure was being
&lt;br&gt;&amp;gt; converted in a place where all the types are inferred.
&lt;br&gt;&lt;br&gt;Mind to share an example? What is lost, and in which direction? Of 
&lt;br&gt;course I don't want to be able to reconstruct all of my type signatures 
&lt;br&gt;when Java answers me. My thoughts concentrate on the way Scala to Java 
&lt;br&gt;only, and how that could be simplified. Now ``closure conversion,&amp;quot; where 
&lt;br&gt;I would prefer the term ``function conversion (to Java interfaces)&amp;quot; is 
&lt;br&gt;nothing new and already implemented in other languages such as Groovy.
&lt;br&gt;&lt;br&gt;---Phil
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Closures-make-it-into-Java-7-tp26416600p26432810.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26432721</id>
	<title>Re: Closures make it into Java 7</title>
	<published>2009-11-19T11:38:33Z</published>
	<updated>2009-11-19T11:38:33Z</updated>
	<author>
		<name>phkoester</name>
	</author>
	<content type="html">Jorge Ortiz wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I guess I don't see boilerplate in the -library- as that big of a 
&lt;br&gt;&amp;gt; problem, as long as user code is fairly clean.
&lt;br&gt;&lt;br&gt;As much as I agree that the burden should always be taken by the 
&lt;br&gt;designer of a library, not by its users, library designers are 
&lt;br&gt;themselves users, namely users of the language. The more they are forced 
&lt;br&gt;to repeat themselves, the more likely mistakes are to sneak in. It is 
&lt;br&gt;the same as with prose: the author might need weeks, months, or years 
&lt;br&gt;even to write a short story that the audience is supposed to read in an 
&lt;br&gt;hour or less.
&lt;br&gt;&lt;br&gt;&amp;gt; Yes, Java has a lot of 
&lt;br&gt;&amp;gt; cases/classes that need to be handled (tragic what Java resorted to for 
&lt;br&gt;&amp;gt; lack of a Function interface!), but such are the perils of interop with 
&lt;br&gt;&amp;gt; Java.
&lt;br&gt;&lt;br&gt;I don't understand what you mean. Java's lack of a `Function' interface 
&lt;br&gt;is not an explanation or justification why I need implicit defs for each 
&lt;br&gt;and every interface I need to deal with. `Runnable' was only one 
&lt;br&gt;example---it could easily be transferred to every Java interface I need 
&lt;br&gt;to deliver.
&lt;br&gt;&lt;br&gt;And we haven't even talked about duck typing yet. One could argue, ``if 
&lt;br&gt;my class has a `run' method taking no args, I want to be able to pass it 
&lt;br&gt;as a `Runnable' to the Java world.&amp;quot;
&lt;br&gt;&lt;br&gt;---Ph.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Closures-make-it-into-Java-7-tp26416600p26432721.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26432493</id>
	<title>Re: Closures make it into Java 7</title>
	<published>2009-11-19T11:24:59Z</published>
	<updated>2009-11-19T11:24:59Z</updated>
	<author>
		<name>Jorge Ortiz-3</name>
	</author>
	<content type="html">I guess I don&amp;#39;t see boilerplate in the -library- as that big of a problem, as long as user code is fairly clean. Yes, Java has a lot of cases/classes that need to be handled (tragic what Java resorted to for lack of a Function interface!), but such are the perils of interop with Java.&lt;br&gt;
&lt;br&gt;--j&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 19, 2009 at 10:34 AM, Philip Köster &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26432493&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;philip.koester@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div class=&quot;im&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
The whole point of Scala&amp;#39;s language features is that better Java interop is &amp;quot;just a library&amp;quot;.&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;&lt;/div&gt;
Of course this is what makes Scala so appealing: that it would let you design advanced libraries that are both pleasant to use and read. And pleasant to design, even! As for automatic ``closure conversion,&amp;quot; as Ricky called it, we would of course need a new construct in the language, which should be easy to implement as well as easy to understand and adopt. Groovy users have come to love this feature. In Scala, once you have implicit conversions to do the job for `Runnable&amp;#39;, you might need the same for `Callable&amp;#39;, and then, while you&amp;#39;re at it, for `Future&amp;#39;, `RunnableFuture&amp;#39; and what have you. This will easily bloat your collection of implicit defs anf force you to write boilerplate.&lt;br&gt;

&lt;br&gt;
While it is true what you wrote and while I agree this to be a good thing, a second point of Scala is to avoid boilerplate. This is not just a matter of design or taste---code that comprises less boilerplate is easier to review, which directly increases robustness and security.&lt;br&gt;

&lt;br&gt;
Best&lt;br&gt;
---Ph.&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Closures-make-it-into-Java-7-tp26416600p26432493.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26432111</id>
	<title>Re: Closures make it into Java 7</title>
	<published>2009-11-19T11:02:46Z</published>
	<updated>2009-11-19T11:02:46Z</updated>
	<author>
		<name>nuttycom</name>
	</author>
	<content type="html">On Thu, Nov 19, 2009 at 11:34 AM, Philip Köster &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26432111&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;philip.koester@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; The whole point of Scala's language features is that better Java interop
&lt;br&gt;&amp;gt;&amp;gt; is &amp;quot;just a library&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Of course this is what makes Scala so appealing: that it would let you
&lt;br&gt;&amp;gt; design advanced libraries that are both pleasant to use and read. And
&lt;br&gt;&amp;gt; pleasant to design, even! As for automatic ``closure conversion,&amp;quot; as Ricky
&lt;br&gt;&amp;gt; called it, we would of course need a new construct in the language, which
&lt;br&gt;&amp;gt; should be easy to implement as well as easy to understand and adopt. Groovy
&lt;br&gt;&amp;gt; users have come to love this feature. In Scala, once you have implicit
&lt;br&gt;&amp;gt; conversions to do the job for `Runnable', you might need the same for
&lt;br&gt;&amp;gt; `Callable', and then, while you're at it, for `Future', `RunnableFuture' and
&lt;br&gt;&amp;gt; what have you. This will easily bloat your collection of implicit defs anf
&lt;br&gt;&amp;gt; force you to write boilerplate.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; While it is true what you wrote and while I agree this to be a good thing, a
&lt;br&gt;&amp;gt; second point of Scala is to avoid boilerplate. This is not just a matter of
&lt;br&gt;&amp;gt; design or taste---code that comprises less boilerplate is easier to review,
&lt;br&gt;&amp;gt; which directly increases robustness and security.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Best
&lt;br&gt;&amp;gt; ---Ph.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;There's boilerplate, and then there's obfuscating the types. I'm very
&lt;br&gt;wary of implicit conversions which perform conversions like Function0
&lt;br&gt;=&amp;gt; Runnable without a syntactic cue. Much better in my opinion would
&lt;br&gt;be:
&lt;br&gt;&lt;br&gt;implicit def f2richF[T](f: Function0[T]): RichFunction0[T] = RichFunction0(f)
&lt;br&gt;&lt;br&gt;case class RichFunction0[T](f: Function0[T]) {
&lt;br&gt;&amp;nbsp; def runnable = new Runnable {
&lt;br&gt;&amp;nbsp; &amp;nbsp; def run: Unit = f()
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Closure conversion seems like it'd obscure a whole lot of potentially
&lt;br&gt;important type information, particularly if a closure was being
&lt;br&gt;converted in a place where all the types are inferred.
&lt;br&gt;&lt;br&gt;Kris
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Closures-make-it-into-Java-7-tp26416600p26432111.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26431606</id>
	<title>Re: Closures make it into Java 7</title>
	<published>2009-11-19T10:34:15Z</published>
	<updated>2009-11-19T10:34:15Z</updated>
	<author>
		<name>phkoester</name>
	</author>
	<content type="html">&amp;gt; The whole point of Scala's language features is that better Java interop 
&lt;br&gt;&amp;gt; is &amp;quot;just a library&amp;quot;.
&lt;br&gt;&lt;br&gt;Of course this is what makes Scala so appealing: that it would let you 
&lt;br&gt;design advanced libraries that are both pleasant to use and read. And 
&lt;br&gt;pleasant to design, even! As for automatic ``closure conversion,&amp;quot; as 
&lt;br&gt;Ricky called it, we would of course need a new construct in the 
&lt;br&gt;language, which should be easy to implement as well as easy to 
&lt;br&gt;understand and adopt. Groovy users have come to love this feature. In 
&lt;br&gt;Scala, once you have implicit conversions to do the job for `Runnable', 
&lt;br&gt;you might need the same for `Callable', and then, while you're at it, 
&lt;br&gt;for `Future', `RunnableFuture' and what have you. This will easily bloat 
&lt;br&gt;your collection of implicit defs anf force you to write boilerplate.
&lt;br&gt;&lt;br&gt;While it is true what you wrote and while I agree this to be a good 
&lt;br&gt;thing, a second point of Scala is to avoid boilerplate. This is not just 
&lt;br&gt;a matter of design or taste---code that comprises less boilerplate is 
&lt;br&gt;easier to review, which directly increases robustness and security.
&lt;br&gt;&lt;br&gt;Best
&lt;br&gt;---Ph.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Closures-make-it-into-Java-7-tp26416600p26431606.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26431507</id>
	<title>Re: Design by contract, inline unit testing</title>
	<published>2009-11-19T10:27:38Z</published>
	<updated>2009-11-19T10:27:38Z</updated>
	<author>
		<name>Raoul Duke</name>
	</author>
	<content type="html">&amp;gt; 1. I've seen Design by contract in D and Eiffel (inline with the class
&lt;br&gt;&amp;gt; and method definitions, as it ought to be), and I really like it;
&lt;br&gt;&amp;gt; however, I've never had the leisure of being able to _use_ such a
&lt;br&gt;&amp;gt; language for a _real project_.  I'm sure I could invent some Scala
&lt;br&gt;&lt;br&gt;please also see JML under ESC/Java
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://kind.ucd.ie/products/opensource/ESCJava2/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://kind.ucd.ie/products/opensource/ESCJava2/&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Design-by-contract%2C-inline-unit-testing-tp26419532p26431507.html" />
</entry>

</feed>
