<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-20934</id>
	<title>Nabble - Scala Programming Language</title>
	<updated>2009-11-26T14:34:37Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Scala-Programming-Language-f20934.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Scala-Programming-Language-f20934.html" />
	<subtitle type="html">&lt;a href=&quot;http://www.scala-lang.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Scala&lt;/a&gt;&amp;nbsp;is a modern multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages.
&lt;br&gt;&lt;b&gt;Scala&lt;/b&gt;&amp;nbsp;is a pure object-oriented language in the sense that every value is an object. Types and behavior of objects are described by classes and traits. Class abstractions are extended by subclassing and a flexible mixin-based composition mechanism as a clean replacement for multiple inheritance.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26535767</id>
	<title>Re: is the hashmap thread-safe</title>
	<published>2009-11-26T14:34:37Z</published>
	<updated>2009-11-26T14:34:37Z</updated>
	<author>
		<name>Viktor Klang</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 7:42 PM, Jorge Ortiz &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535767&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jorge.ortiz@...&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;
Caesar,&lt;br&gt;&lt;br&gt;If you&amp;#39;re on 2.7.x, you can use TreeHashMap, which is a truly immutable lock-free data structure.&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;I love that datastructure name, it goes against all Java logic.&lt;br&gt; &lt;/div&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;br&gt;On 2.8, unfortunately, it hasn&amp;#39;t been reintegrated with the rest of the collections library.&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
&lt;br&gt;--j&lt;/font&gt;&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 Thu, Nov 26, 2009 at 5:44 AM, Caesar You &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535767&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Caesar.Jr@...&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 style=&quot;padding-left: 10px; padding-right: 10px; word-wrap: break-word; padding-top: 15px;&quot; name=&quot;Compose message area&quot;&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;immutable hashmap use synchronized method for concurrent 
environment.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;so thread-2 must wait until thread-1 *get* something 
from the map.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;but if a map is created and will not be modified, it is 
no need to synchronized.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;what i dont know is, if the &amp;quot;get&amp;quot; action modified 
some internal state of a hashmap&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;and make it thread-not-safe.&lt;/font&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div style=&quot;background: rgb(245, 245, 245) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&quot;&gt;
&lt;div&gt;&lt;b&gt;From:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535767&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hxliang1982@...&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;b&gt;Sent:&lt;/b&gt; Thursday, November 26, 2009 9:29 PM&lt;/div&gt;&lt;div&gt;
&lt;div&gt;&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535767&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Caesar.Jr@...&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;b&gt;Subject:&lt;/b&gt; Re: [scala-user] is the hashmap 
thread-safe&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;Why do you say this? Performance more depends on underlying data 
structure, I think. Maybe I am wrong for this case... 
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br&gt;
&lt;div&gt;
&lt;div&gt;On Nov 26, 2009, at 9:09 PM, Caesar You wrote:&lt;/div&gt;&lt;br&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
  &lt;div style=&quot;padding-left: 10px; padding-right: 10px; word-wrap: break-word; padding-top: 15px;&quot; name=&quot;Compose message area&quot;&gt;
  &lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;immutable map is slow, isnt it?&lt;/font&gt;&lt;/div&gt;
  &lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;&lt;/font&gt; &lt;/div&gt;
  &lt;div style=&quot;font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;
  &lt;div&gt;&lt;br&gt;&lt;/div&gt;
  &lt;div style=&quot;background: rgb(245, 245, 245) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&quot;&gt;
  &lt;div&gt;&lt;b&gt;From:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535767&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hxliang1982@...&lt;/a&gt; &lt;/div&gt;
  &lt;div&gt;&lt;b&gt;Sent:&lt;/b&gt; Thursday, November 26, 2009 9:04 PM&lt;/div&gt;
  &lt;div&gt;&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535767&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Caesar.Jr@...&lt;/a&gt; &lt;/div&gt;
  &lt;div&gt;&lt;b&gt;Subject:&lt;/b&gt; Re: [scala-user] is the hashmap 
  thread-safe&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;div&gt;&lt;br&gt;&lt;/div&gt;If it is read only, why not using immutable map? 
  &lt;div&gt;&lt;br&gt;
  &lt;div&gt;
  &lt;div&gt;On Nov 26, 2009, at 8:41 PM, Caesar You wrote:&lt;/div&gt;&lt;br&gt;
  &lt;blockquote type=&quot;cite&quot;&gt;
    &lt;div style=&quot;padding-left: 10px; padding-right: 10px; padding-top: 15px;&quot; name=&quot;Compose message area&quot;&gt;
    &lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;if i create a mutable.HashMap, and only use the 
    &amp;quot;get(key)&amp;quot; action,&lt;/font&gt;&lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;that means i will not modify the hashmap as using 
    &amp;quot;+=&amp;quot;, &amp;quot;-=&amp;quot;.&lt;/font&gt;&lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;in this situation, is it 
    thread-safe?&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&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;Viktor Klang&lt;br&gt;| &amp;quot;A complex system that works is invariably &lt;br&gt;| found to have evolved from a simple system &lt;br&gt;| that worked.&amp;quot; - John Gall&lt;br&gt;&lt;br&gt;
Blog: &lt;a href=&quot;http://klangism.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;klangism.blogspot.com&lt;/a&gt;&lt;br&gt;Twttr: &lt;a href=&quot;http://twitter.com/viktorklang&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;twitter.com/viktorklang&lt;/a&gt;&lt;br&gt;Code: &lt;a href=&quot;http://github.com/viktorklang&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;github.com/viktorklang&lt;/a&gt;&lt;br&gt;

&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/is-the-hashmap-thread-safe-tp26528930p26535767.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26535670</id>
	<title>Re: how does lift work with redis?</title>
	<published>2009-11-26T14:21:27Z</published>
	<updated>2009-11-26T14:21:27Z</updated>
	<author>
		<name>surfman-2</name>
	</author>
	<content type="html">So, if I want to use nosql database with LIFT, what I have to use is
&lt;br&gt;JDBC driver, am I right?
&lt;br&gt;Any experienced suggestion? Google has very little searching result on
&lt;br&gt;it.
&lt;br&gt;I'd appreciate any idea on this topic. Thanks.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Surfman
&lt;br&gt;&lt;br&gt;On 11月25日, 下午4时06分, Timothy Perrett &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535670&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;timo...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Correct - Redis is a nosql database, mapper is only for RDBMS
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers, Tim
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 25 Nov 2009, at 20:13, surfman wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Thanks. Does it mean I may not use lift mapper and I have to write
&lt;br&gt;&amp;gt; &amp;gt; everything for database manipulation?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; surfman
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On 11月24日, 下午5时12分, Timothy Perrett &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535670&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;timo...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; There is no out of the box implementation. You could write a record &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; back end though - it depends on the features you want I guess.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Cheers, Tim
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Sent from my iPhone
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On 24 Nov 2009, at 22:00, surfman &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535670&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;chinasmile...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Is there anything I could learn on how lift works with redis database?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Thanks.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; You received this message because you are subscribed to the Google &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Groups &amp;quot;Lift&amp;quot; group.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535670&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535670&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb+unsubscribe@...&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; For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; .- 隐藏被引用文字 -
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; - 显示引用的文字 -
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Lift&amp;quot; group.
&lt;br&gt;&amp;gt; &amp;gt; To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535670&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535670&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; &amp;gt; For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.- 隐藏被引用文字 -
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - 显示引用的文字 -
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Lift&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535670&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535670&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/liftweb?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/liftweb?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/liftweb-f30586.html&quot; embed=&quot;fixTarget[30586]&quot; target=&quot;_top&quot; &gt;liftweb&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-does-lift-work-with-redis--tp26504039p26535670.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26535634</id>
	<title>Re: Trait-local data</title>
	<published>2009-11-26T14:16:59Z</published>
	<updated>2009-11-26T14:16:59Z</updated>
	<author>
		<name>Dimitris Andreou</name>
	</author>
	<content type="html">2009/11/26 Kevin Wright &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535634&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kev.lee.wright@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Sounds like the classic case of not being able to mix in
&lt;br&gt;&amp;gt; a parameterized trait multiple times with different type parameters.
&lt;br&gt;&amp;gt; It's also one of my use-cases for the autoproxy plugin
&lt;br&gt;&amp;gt; This  is the example I used on wave:
&lt;br&gt;&amp;gt; class Foo[T] {
&lt;br&gt;&amp;gt;   def method0(t: T) = ...
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; class Bar {
&lt;br&gt;&amp;gt;   @proxy val intfoo = new Foo[Int]
&lt;br&gt;&amp;gt;   @proxy val strfoo = new Foo[String]
&lt;br&gt;&amp;gt; }
&lt;/div&gt;&lt;br&gt;I don't see what this buys you here. Why not simply:
&lt;br&gt;&lt;br&gt;class Bar {
&lt;br&gt;&amp;nbsp; val intfoo = new Foo[Int]
&lt;br&gt;&amp;nbsp; val strfoo = new Foo[String]
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;val bar = new Bar
&lt;br&gt;&lt;br&gt;and instead of:
&lt;br&gt;&lt;br&gt;bar.method0(5)
&lt;br&gt;bar.method0(&amp;quot;test&amp;quot;)
&lt;br&gt;&lt;br&gt;we would have:
&lt;br&gt;&lt;br&gt;bar.intfoo.method0(5)
&lt;br&gt;bar.strfoo.method0(&amp;quot;test&amp;quot;)
&lt;br&gt;&lt;br&gt;Not that bad. Also, this composes more cleanly, e.g. what would happen
&lt;br&gt;if instead of Int and String you chose A and B with A &amp;lt;: B? That would
&lt;br&gt;be some error-prone overloading. It would be even impossible if A == B
&lt;br&gt;:) (I know I extend this beyond what you meant it for though).
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Dimitris
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; expands to...
&lt;br&gt;&amp;gt; class Bar {
&lt;br&gt;&amp;gt;   val intfoo = new Foo[Int]
&lt;br&gt;&amp;gt;   val strfoo = new Foo[String]
&lt;br&gt;&amp;gt;   def method0(t: Int) = intfoo.method0(t)
&lt;br&gt;&amp;gt;   def method0(t: String) = strfoo.method0(t)
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Does that help your case any?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Thu, Nov 26, 2009 at 8:01 PM, Daniel Sobral &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535634&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; I'm trying to figure out how to do something, but I'm a bit stuck on a
&lt;br&gt;&amp;gt;&amp;gt; particular approach that just isn't working, so I have come here for help on
&lt;br&gt;&amp;gt;&amp;gt; alternative approaches.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I'm building a program to solve a puzzle. I'm separating concerns
&lt;br&gt;&amp;gt;&amp;gt; regarding the puzzle representation (the &amp;quot;board&amp;quot; so to speak), the puzzle
&lt;br&gt;&amp;gt;&amp;gt; rules, and the strategies used to solve the problem. My present plan calls
&lt;br&gt;&amp;gt;&amp;gt; for quite a bit of dependency injection, where the actual solver is a mix of
&lt;br&gt;&amp;gt;&amp;gt; traits.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; My present problem concerns the game strategies. The initial strategies I
&lt;br&gt;&amp;gt;&amp;gt; were writing were all based on one of two different data structures, though
&lt;br&gt;&amp;gt;&amp;gt; more could be added later on. So I laid out these traits like this:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; trait StrategyA {
&lt;br&gt;&amp;gt;&amp;gt;   // A's data structure
&lt;br&gt;&amp;gt;&amp;gt;   def aStrategy(f: A =&amp;gt; Unit) = strategies ::= f
&lt;br&gt;&amp;gt;&amp;gt;   private var strategies: List[A =&amp;gt; Unit] = Nil
&lt;br&gt;&amp;gt;&amp;gt;   // plus stuff to call each strategy in turn, when the conditions apply
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; trait StrategyB {
&lt;br&gt;&amp;gt;&amp;gt;   // B's data structure
&lt;br&gt;&amp;gt;&amp;gt;   def bStrategy(f: B =&amp;gt; Unit) = strategies ::= f
&lt;br&gt;&amp;gt;&amp;gt;   private var strategies: List[B =&amp;gt; Unit] = NIl
&lt;br&gt;&amp;gt;&amp;gt;   // plus stuff to call each strategy in turn, when conditions apply
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The idea being that each particular game strategy would be written like
&lt;br&gt;&amp;gt;&amp;gt; this:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; trait X extends StrategyA {
&lt;br&gt;&amp;gt;&amp;gt;   aStrategy { a: A =&amp;gt; ... }
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This stuff was made a bit more complicated by the fact that StrategyB
&lt;br&gt;&amp;gt;&amp;gt; itself extends StrategyA, as B is derived from A, but that's beside the
&lt;br&gt;&amp;gt;&amp;gt; point.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Once I did that, I realized the code was pretty much the same, except for
&lt;br&gt;&amp;gt;&amp;gt; A and B. So I decided to go for a parent trait for both, but that doesn't
&lt;br&gt;&amp;gt;&amp;gt; seem to work. The types clash, I'd end up with a single &amp;quot;strategies&amp;quot; list,
&lt;br&gt;&amp;gt;&amp;gt; etc. So, that's a no go. Any suggestions about how to get around that,
&lt;br&gt;&amp;gt;&amp;gt; eliminate repetition, and use the type system to compose the solver by
&lt;br&gt;&amp;gt;&amp;gt; mixing in traits, all at the same time?
&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;br&gt;&lt;/div&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Trait-local-data-tp26534311p26535634.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26535537</id>
	<title>Re: Trait-local data</title>
	<published>2009-11-26T14:09:34Z</published>
	<updated>2009-11-26T14:09:34Z</updated>
	<author>
		<name>Dimitris Andreou</name>
	</author>
	<content type="html">You could factor the common parts through composition instead of
&lt;br&gt;inheritance, at the cost of slightly more boilerplate (introducing an
&lt;br&gt;extra field in each trait). It seems hard to avoid the issue while
&lt;br&gt;sticking to inheritance - no trait can assume it &amp;quot;owns&amp;quot; the fields of
&lt;br&gt;a supertype, since these are eventually shared by all mixed-in traits.
&lt;br&gt;&lt;br&gt;I also note that so-called stackable traits cannot be implemented if
&lt;br&gt;the behavior of each stackable method depends on being able to write
&lt;br&gt;to a supertype's field and expect to read back the same value the next
&lt;br&gt;time. So this kind of pushes you to localize in a trait whatever state
&lt;br&gt;is needed, without the use of inheritance - I don't know if it is
&lt;br&gt;coincidental but it has a feel of righteousness to me.
&lt;br&gt;&lt;br&gt;Anyway, I'm just pointing the obvious solution, I can't think of
&lt;br&gt;anything to work around this using inheritance only.
&lt;br&gt;&lt;br&gt;Dimitris
&lt;br&gt;&lt;br&gt;2009/11/26 Daniel Sobral &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535537&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dcsobral@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I'm trying to figure out how to do something, but I'm a bit stuck on a
&lt;br&gt;&amp;gt; particular approach that just isn't working, so I have come here for help on
&lt;br&gt;&amp;gt; alternative approaches.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm building a program to solve a puzzle. I'm separating concerns regarding
&lt;br&gt;&amp;gt; the puzzle representation (the &amp;quot;board&amp;quot; so to speak), the puzzle rules, and
&lt;br&gt;&amp;gt; the strategies used to solve the problem. My present plan calls for quite a
&lt;br&gt;&amp;gt; bit of dependency injection, where the actual solver is a mix of traits.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; My present problem concerns the game strategies. The initial strategies I
&lt;br&gt;&amp;gt; were writing were all based on one of two different data structures, though
&lt;br&gt;&amp;gt; more could be added later on. So I laid out these traits like this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; trait StrategyA {
&lt;br&gt;&amp;gt;   // A's data structure
&lt;br&gt;&amp;gt;   def aStrategy(f: A =&amp;gt; Unit) = strategies ::= f
&lt;br&gt;&amp;gt;   private var strategies: List[A =&amp;gt; Unit] = Nil
&lt;br&gt;&amp;gt;   // plus stuff to call each strategy in turn, when the conditions apply
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; trait StrategyB {
&lt;br&gt;&amp;gt;   // B's data structure
&lt;br&gt;&amp;gt;   def bStrategy(f: B =&amp;gt; Unit) = strategies ::= f
&lt;br&gt;&amp;gt;   private var strategies: List[B =&amp;gt; Unit] = NIl
&lt;br&gt;&amp;gt;   // plus stuff to call each strategy in turn, when conditions apply
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The idea being that each particular game strategy would be written like
&lt;br&gt;&amp;gt; this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; trait X extends StrategyA {
&lt;br&gt;&amp;gt;   aStrategy { a: A =&amp;gt; ... }
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This stuff was made a bit more complicated by the fact that StrategyB itself
&lt;br&gt;&amp;gt; extends StrategyA, as B is derived from A, but that's beside the point.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Once I did that, I realized the code was pretty much the same, except for A
&lt;br&gt;&amp;gt; and B. So I decided to go for a parent trait for both, but that doesn't seem
&lt;br&gt;&amp;gt; to work. The types clash, I'd end up with a single &amp;quot;strategies&amp;quot; list, etc.
&lt;br&gt;&amp;gt; So, that's a no go. Any suggestions about how to get around that, eliminate
&lt;br&gt;&amp;gt; repetition, and use the type system to compose the solver by mixing in
&lt;br&gt;&amp;gt; traits, all at the same time?
&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;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Trait-local-data-tp26534311p26535537.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26535479</id>
	<title>Re: Improvements on this (perhaps with a DSL)?</title>
	<published>2009-11-26T14:04:16Z</published>
	<updated>2009-11-26T14:04:16Z</updated>
	<author>
		<name>Justin Reardon</name>
	</author>
	<content type="html">I assumed ticket would a a val declared somewhere earlier, I wasn't &amp;nbsp;
&lt;br&gt;quite sure how it was supposed to work. So, in your usual code you &amp;nbsp;
&lt;br&gt;would call say:
&lt;br&gt;&lt;br&gt;val ticket = ServiceRegistry().jobticket.createTicketForDocument(1234)
&lt;br&gt;val media = ServiceRegistry().jobticket.setOutputMedia(ticket, &amp;quot;PDF&amp;quot;)
&lt;br&gt;&lt;br&gt;yes? If these two functions are returning Options (or Boxes, etc), &amp;nbsp;
&lt;br&gt;then the for comprehension code will work if you added the yield part. &amp;nbsp;
&lt;br&gt;If they're not you can either wrap them in those tryo's you used in &amp;nbsp;
&lt;br&gt;the original post, or something like:
&lt;br&gt;&lt;br&gt;//not tested, working code for comparison: &amp;quot;test&amp;quot; |&amp;gt; { x =&amp;gt; x.length/2 &amp;nbsp;
&lt;br&gt;|&amp;gt; x.substring }
&lt;br&gt;ServiceRegistry().jobticket |&amp;gt; ( driver =&amp;gt; &amp;nbsp;
&lt;br&gt;driver.createTicketForDocument(1234) |&amp;gt; driver.setOutputMedia(ticket, &amp;nbsp;
&lt;br&gt;&amp;quot;PDF&amp;quot;)
&lt;br&gt;&lt;br&gt;which would only return the last value. If you need both out it'd be a &amp;nbsp;
&lt;br&gt;bit more complicated, say:
&lt;br&gt;&lt;br&gt;&amp;quot;test&amp;quot; |&amp;gt; { x =&amp;gt; x.length/2 |&amp;gt; { y =&amp;gt; (y, x.substring(y))} }
&lt;br&gt;&lt;br&gt;or you could use a for comprehension.
&lt;br&gt;&lt;br&gt;On 26-Nov-09, at 12:36 , Tim Perrett wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks for the response Justin... yet more brain food! Let me give a
&lt;br&gt;&amp;gt; little more information about the setup...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ServiceLocator() //=&amp;gt; vends a ServiceRegistry
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; //=&amp;gt; lazy val on the service registry instance for the &amp;quot;jobticket&amp;quot; &amp;nbsp;
&lt;br&gt;&amp;gt; soap endpoint
&lt;br&gt;&amp;gt; ServiceLocator().jobticket
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; //=&amp;gt; lazy val on the service registry instance for the &amp;quot;production&amp;quot;
&lt;br&gt;&amp;gt; soap endpoint
&lt;br&gt;&amp;gt; ServiceLocator().production
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Both of these properties have their own set of methods that can be
&lt;br&gt;&amp;gt; called on that endpoint. So, in your example in your previous mail, im
&lt;br&gt;&amp;gt; a little on confused where ticket came from? Wouldnt it actually be
&lt;br&gt;&amp;gt; passing the driver instance, not the ticket?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Perhaps it would be possible to do:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ServiceRegistry().jobticket |&amp;gt; (driver =&amp;gt; for(
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;ticket &amp;lt;- driver.createTicketForDocument(1234);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;media &amp;lt;- driver.setOutputMedia(ticket, &amp;quot;PDF&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp;)
&lt;br&gt;&amp;gt; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I've no idea if that would even compile ;-)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers, Tim
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 2009/11/26 Justin Reardon &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535479&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;justin.reardon@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt;&amp;gt; Hi Tim,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; So what you're looking for is a way to chop off the
&lt;br&gt;&amp;gt;&amp;gt; ServiceLocator().something bits you keep repeating?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If this is just a few one off bits you could use the import trick &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; mentioned
&lt;br&gt;&amp;gt;&amp;gt; earlier, eg:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; val aString = &amp;quot;test&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; import aString._
&lt;br&gt;&amp;gt;&amp;gt; length() // same as aString, untested
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If you want something general, the code Vicktor posted last &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; ( CallWS ), or a
&lt;br&gt;&amp;gt;&amp;gt; more general version, assuming the Thrush code from my last &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; example, I think
&lt;br&gt;&amp;gt;&amp;gt; this works:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ServiceLocator().something |&amp;gt; { x =&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; x.something.anotherThing(ticket, ...)
&lt;br&gt;&amp;gt;&amp;gt; x.moreCallStuff(ticket, ...) }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 2009-11-26, at 7:28, Tim Perrett &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535479&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tperrett@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks Viktor / Justin,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I've been reconsidering my use case here, as these have been great
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; responses and some interesting solutions.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Most of the calls I make that feel very boiler plate are calling a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; stateful web service, e.g:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; val ticket = // make the call
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ServiceLocator().something.anotherThing(ticket, ...)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ServiceLocator().something.moreCallStuff(ticket, ...)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; In light of that, what do you guys think?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Cheers, Tim
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Improvements-on-this-%28perhaps-with-a-DSL%29--tp26522401p26535479.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26535167</id>
	<title>Re: [scala] New scala blog</title>
	<published>2009-11-26T13:36:14Z</published>
	<updated>2009-11-26T13:36:14Z</updated>
	<author>
		<name>Kevin Wright-4</name>
	</author>
	<content type="html">I&amp;#39;m always a bit cynical about how much re-use *really* occurs with most in-house corporate development...&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;But I&amp;#39;m in total agreement about the benefits of refactoring.&lt;/div&gt;&lt;div&gt;Maintainability is important, but too many people still think of software as something that is simply written and then sold.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 7:03 PM, Colin Howe &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26535167&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;colinthehowe@...&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;Nice post :-)&lt;br&gt;&lt;br&gt;Although, I&amp;#39;d argue that many &lt;i&gt;good&lt;/i&gt; things initially lead to more lines but eventually lead to fewer as re-use etc is increased.&lt;br&gt;

&lt;br&gt;Also, testing makes refactoring easier, which makes it easier to prune away excess baggage&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 6:55 PM, 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=26535167&amp;i=1&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;border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex&quot;&gt;
Okay, I&amp;#39;ve been threatening this for quite some time now...&lt;div&gt;Finally got round to it :)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.artima.com/weblogs/index.jsp?blogger=kevwright&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.artima.com/weblogs/index.jsp?blogger=kevwright&lt;/a&gt;&lt;/div&gt;



&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;enjoy!&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala-f14147.html&quot; embed=&quot;fixTarget[14147]&quot; target=&quot;_top&quot; &gt;Scala&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-scala--New-scala-blog-tp26533647p26535167.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26534980</id>
	<title>Re: Trait-local data</title>
	<published>2009-11-26T13:15:48Z</published>
	<updated>2009-11-26T13:15:48Z</updated>
	<author>
		<name>Kevin Wright-4</name>
	</author>
	<content type="html">Sounds like the classic case of not being able to mix in a parameterized trait multiple times with different type parameters.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;It&amp;#39;s also one of my use-cases for the autoproxy plugin&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;This  is the example I used on wave:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;class Foo[T] {&lt;/div&gt;&lt;div&gt;  def method0(t: T) = ...&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class Bar {&lt;/div&gt;&lt;div&gt;  @proxy val intfoo = new Foo[Int]&lt;/div&gt;
&lt;div&gt;  @proxy val strfoo = new Foo[String]&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;expands to...&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class Bar {&lt;/div&gt;&lt;div&gt;  val intfoo = new Foo[Int]&lt;/div&gt;&lt;div&gt;  val strfoo = new Foo[String]&lt;/div&gt;&lt;div&gt;  def method0(t: Int) = intfoo.method0(t)&lt;/div&gt;
&lt;div&gt;  def method0(t: String) = strfoo.method0(t)&lt;/div&gt;&lt;div&gt;} &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Does that help your case any?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 8:01 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=26534980&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;&lt;div&gt;I&amp;#39;m trying to figure out how to do something, but I&amp;#39;m a bit stuck on a particular approach that just isn&amp;#39;t working, so I have come here for help on alternative approaches.&lt;/div&gt;

&lt;div&gt; &lt;/div&gt;
&lt;div&gt;I&amp;#39;m building a program to solve a puzzle. I&amp;#39;m separating concerns regarding the puzzle representation (the &amp;quot;board&amp;quot; so to speak), the puzzle rules, and the strategies used to solve the problem. My present plan calls for quite a bit of dependency injection, where the actual solver is a mix of traits.&lt;/div&gt;



&lt;div&gt; &lt;/div&gt;
&lt;div&gt;My present problem concerns the game strategies. The initial strategies I were writing were all based on one of two different data structures, though more could be added later on. So I laid out these traits like this:&lt;/div&gt;



&lt;div&gt; &lt;/div&gt;
&lt;div&gt;trait StrategyA {&lt;/div&gt;
&lt;div&gt;  // A&amp;#39;s data structure&lt;/div&gt;
&lt;div&gt;  def aStrategy(f: A =&amp;gt; Unit) = strategies ::= f&lt;/div&gt;
&lt;div&gt;  private var strategies: List[A =&amp;gt; Unit] = Nil&lt;/div&gt;
&lt;div&gt;  // plus stuff to call each strategy in turn, when the conditions apply&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;trait StrategyB {&lt;/div&gt;
&lt;div&gt;  // B&amp;#39;s data structure&lt;/div&gt;
&lt;div&gt;  def bStrategy(f: B =&amp;gt; Unit) = strategies ::= f&lt;/div&gt;
&lt;div&gt;  private var strategies: List[B =&amp;gt; Unit] = NIl&lt;/div&gt;
&lt;div&gt;  // plus stuff to call each strategy in turn, when conditions apply&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The idea being that each particular game strategy would be written like this:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;trait X extends StrategyA {&lt;/div&gt;
&lt;div&gt;  aStrategy { a: A =&amp;gt; ... }&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;This stuff was made a bit more complicated by the fact that StrategyB itself extends StrategyA, as B is derived from A, but that&amp;#39;s beside the point.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Once I did that, I realized the code was pretty much the same, except for A and B. So I decided to go for a parent trait for both, but that doesn&amp;#39;t seem to work. The types clash, I&amp;#39;d end up with a single &amp;quot;strategies&amp;quot; list, etc. So, that&amp;#39;s a no go. Any suggestions about how to get around that, eliminate repetition, and use the type system to compose the solver by mixing in traits, all at the same time?&lt;/div&gt;



&lt;div&gt;&lt;br&gt;-- &lt;br&gt;Daniel C. Sobral&lt;br&gt;&lt;br&gt;Veni, vidi, veterni.&lt;br&gt;&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Trait-local-data-tp26534311p26534980.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26534786</id>
	<title>Re: derby</title>
	<published>2009-11-26T12:54:35Z</published>
	<updated>2009-11-26T12:54:35Z</updated>
	<author>
		<name>jlist9</name>
	</author>
	<content type="html">Hi David,
&lt;br&gt;&lt;br&gt;Would you care to elaborate in what way Derby is inferior?
&lt;br&gt;I understand H2 is probably faster as speed is one of its main
&lt;br&gt;design goals. Does Derby have any other issues?
&lt;br&gt;&lt;br&gt;Are there any potential issues with using H2 for production?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Jack
&lt;br&gt;&lt;br&gt;&amp;gt; Derby is inferior in every way to H2 (another open source pure Java
&lt;br&gt;&amp;gt; relational database).  If you're building something for production,
&lt;br&gt;&amp;gt; Postgresql is your best choice.  If you need a simple database that needs no
&lt;br&gt;&amp;gt; separate process and &amp;quot;just works&amp;quot; H2 is your best choice.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Lift&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534786&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534786&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/liftweb?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/liftweb?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/liftweb-f30586.html&quot; embed=&quot;fixTarget[30586]&quot; target=&quot;_top&quot; &gt;liftweb&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/derby-tp26524992p26534786.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26534752</id>
	<title>Impossible to use Mapper on GAE?</title>
	<published>2009-11-26T12:51:05Z</published>
	<updated>2009-11-26T12:51:05Z</updated>
	<author>
		<name>jlist9</name>
	</author>
	<content type="html">Hi, I read from the list that Mapper is not supported on Google App Engine
&lt;br&gt;(I see people use JPA instead.) I wonder if this is a matter of non-existent
&lt;br&gt;drivers, or there are some fundamental issues that make it impossible?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Jack
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Lift&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534752&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534752&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/liftweb?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/liftweb?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/liftweb-f30586.html&quot; embed=&quot;fixTarget[30586]&quot; target=&quot;_top&quot; &gt;liftweb&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Impossible-to-use-Mapper-on-GAE--tp26534752p26534752.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26534315</id>
	<title>Re: Re: simple database question</title>
	<published>2009-11-26T12:02:25Z</published>
	<updated>2009-11-26T12:02:25Z</updated>
	<author>
		<name>jackwidman</name>
	</author>
	<content type="html">excellent. Thanks. Just what I needed.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 2:34 PM, harryh &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534315&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;harryh@...&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;

Here is what you need for a minimal Person table that contains two&lt;br&gt;
columns: an id for the primary key, and name which is a string:&lt;br&gt;
&lt;br&gt;
package com.jacksdomain.model&lt;br&gt;
&lt;br&gt;
import net.liftweb.mapper._&lt;br&gt;
&lt;br&gt;
class Person extends LongKeyedMapper[Person] with IdPK {&lt;br&gt;
  def getSingleton = Person&lt;br&gt;
&lt;br&gt;
  object name extends MappedString(this, 100)&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
object Person extends Person with LongKeyedMetaMapper[Person] {&lt;br&gt;
  override def dbTableName = &amp;quot;person&amp;quot;&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
You can then do things like this:&lt;br&gt;
&lt;br&gt;
val person = Person.find(1)   // retrieve the person with id = 1 from&lt;br&gt;
the database&lt;br&gt;
val person = Person.find(By(Person.name, &amp;quot;Jack&amp;quot;)) // retrieve the&lt;br&gt;
person with name = &amp;quot;Jack&amp;quot; from the database&lt;br&gt;
val people = Person.findAll() // retrieve all people form the database&lt;br&gt;
val people = Person.findAll(By_&amp;lt;(Person.id, 10)) // retrieve all the&lt;br&gt;
people with id &amp;lt; 10&lt;br&gt;
&lt;br&gt;
etc.&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;
-harryh&lt;br&gt;
&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
On Nov 26, 1:39 pm, jack &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534315&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jack.wid...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; wow. thats impressive. But for this, what does the Person class have&lt;br&gt;
&amp;gt; to look like? Suppose I have the table but I don&amp;#39;t have the Person&lt;br&gt;
&amp;gt; class written. What does it need to look like?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; On Nov 26, 1:32 pm, harryh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534315&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;har...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; val people = Person.findAll()&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; On Nov 26, 1:22 pm, jack &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534315&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jack.wid...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I have my database configured properly in Boot.scala and in my&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; pom.xml. Suppose I have a table name person with a field called name.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; What is the simple code to return all rows of this table using Mapper.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I want to understand the essence of how lift ties tables to objects&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; with a simple example.&lt;br&gt;
&lt;br&gt;
--&lt;br&gt;
&lt;br&gt;
You received this message because you are subscribed to the Google Groups &amp;quot;Lift&amp;quot; group.&lt;br&gt;
To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534315&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.&lt;br&gt;
To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534315&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb%2Bunsubscribe@...&lt;/a&gt;.&lt;br&gt;
For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/liftweb?hl=en&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/liftweb?hl=en&lt;/a&gt;.&lt;br&gt;
&lt;br&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;Jack Widman&lt;br&gt;&lt;br&gt;co-founder / cto,  Authoritude, Inc.&lt;br&gt;&lt;br&gt;203-641-9355&lt;br&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;Lift&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534315&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534315&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.&lt;br /&gt;

&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/liftweb-f30586.html&quot; embed=&quot;fixTarget[30586]&quot; target=&quot;_top&quot; &gt;liftweb&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/simple-database-question-tp26533261p26534315.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26534311</id>
	<title>Trait-local data</title>
	<published>2009-11-26T12:01:23Z</published>
	<updated>2009-11-26T12:01:23Z</updated>
	<author>
		<name>Daniel Sobral</name>
	</author>
	<content type="html">&lt;div&gt;I&amp;#39;m trying to figure out how to do something, but I&amp;#39;m a bit stuck on a particular approach that just isn&amp;#39;t working, so I have come here for help on alternative approaches.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;I&amp;#39;m building a program to solve a puzzle. I&amp;#39;m separating concerns regarding the puzzle representation (the &amp;quot;board&amp;quot; so to speak), the puzzle rules, and the strategies used to solve the problem. My present plan calls for quite a bit of dependency injection, where the actual solver is a mix of traits.&lt;/div&gt;


&lt;div&gt; &lt;/div&gt;
&lt;div&gt;My present problem concerns the game strategies. The initial strategies I were writing were all based on one of two different data structures, though more could be added later on. So I laid out these traits like this:&lt;/div&gt;


&lt;div&gt; &lt;/div&gt;
&lt;div&gt;trait StrategyA {&lt;/div&gt;
&lt;div&gt;  // A&amp;#39;s data structure&lt;/div&gt;
&lt;div&gt;  def aStrategy(f: A =&amp;gt; Unit) = strategies ::= f&lt;/div&gt;
&lt;div&gt;  private var strategies: List[A =&amp;gt; Unit] = Nil&lt;/div&gt;
&lt;div&gt;  // plus stuff to call each strategy in turn, when the conditions apply&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;trait StrategyB {&lt;/div&gt;
&lt;div&gt;  // B&amp;#39;s data structure&lt;/div&gt;
&lt;div&gt;  def bStrategy(f: B =&amp;gt; Unit) = strategies ::= f&lt;/div&gt;
&lt;div&gt;  private var strategies: List[B =&amp;gt; Unit] = NIl&lt;/div&gt;
&lt;div&gt;  // plus stuff to call each strategy in turn, when conditions apply&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The idea being that each particular game strategy would be written like this:&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;trait X extends StrategyA {&lt;/div&gt;
&lt;div&gt;  aStrategy { a: A =&amp;gt; ... }&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;This stuff was made a bit more complicated by the fact that StrategyB itself extends StrategyA, as B is derived from A, but that&amp;#39;s beside the point.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Once I did that, I realized the code was pretty much the same, except for A and B. So I decided to go for a parent trait for both, but that doesn&amp;#39;t seem to work. The types clash, I&amp;#39;d end up with a single &amp;quot;strategies&amp;quot; list, etc. So, that&amp;#39;s a no go. Any suggestions about how to get around that, eliminate repetition, and use the type system to compose the solver by mixing in traits, all at the same time?&lt;/div&gt;


&lt;div&gt;&lt;br&gt;-- &lt;br&gt;Daniel C. Sobral&lt;br&gt;&lt;br&gt;Veni, vidi, veterni.&lt;br&gt;&lt;/div&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Trait-local-data-tp26534311p26534311.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26534037</id>
	<title>Re: simple database question</title>
	<published>2009-11-26T11:34:00Z</published>
	<updated>2009-11-26T11:34:00Z</updated>
	<author>
		<name>harryh</name>
	</author>
	<content type="html">Here is what you need for a minimal Person table that contains two
&lt;br&gt;columns: an id for the primary key, and name which is a string:
&lt;br&gt;&lt;br&gt;package com.jacksdomain.model
&lt;br&gt;&lt;br&gt;import net.liftweb.mapper._
&lt;br&gt;&lt;br&gt;class Person extends LongKeyedMapper[Person] with IdPK {
&lt;br&gt;&amp;nbsp; def getSingleton = Person
&lt;br&gt;&lt;br&gt;&amp;nbsp; object name extends MappedString(this, 100)
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;object Person extends Person with LongKeyedMetaMapper[Person] {
&lt;br&gt;&amp;nbsp; override def dbTableName = &amp;quot;person&amp;quot;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;You can then do things like this:
&lt;br&gt;&lt;br&gt;val person = Person.find(1) &amp;nbsp; // retrieve the person with id = 1 from
&lt;br&gt;the database
&lt;br&gt;val person = Person.find(By(Person.name, &amp;quot;Jack&amp;quot;)) // retrieve the
&lt;br&gt;person with name = &amp;quot;Jack&amp;quot; from the database
&lt;br&gt;val people = Person.findAll() // retrieve all people form the database
&lt;br&gt;val people = Person.findAll(By_&amp;lt;(Person.id, 10)) // retrieve all the
&lt;br&gt;people with id &amp;lt; 10
&lt;br&gt;&lt;br&gt;etc.
&lt;br&gt;&lt;br&gt;-harryh
&lt;br&gt;&lt;br&gt;On Nov 26, 1:39 pm, jack &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534037&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jack.wid...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; wow. thats impressive. But for this, what does the Person class have
&lt;br&gt;&amp;gt; to look like? Suppose I have the table but I don't have the Person
&lt;br&gt;&amp;gt; class written. What does it need to look like?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 26, 1:32 pm, harryh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534037&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;har...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; val people = Person.findAll()
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Nov 26, 1:22 pm, jack &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534037&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jack.wid...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I have my database configured properly in Boot.scala and in my
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; pom.xml. Suppose I have a table name person with a field called name.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; What is the simple code to return all rows of this table using Mapper.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I want to understand the essence of how lift ties tables to objects
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; with a simple example.
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Lift&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534037&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534037&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/liftweb?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/liftweb?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/liftweb-f30586.html&quot; embed=&quot;fixTarget[30586]&quot; target=&quot;_top&quot; &gt;liftweb&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/simple-database-question-tp26533261p26534037.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533860</id>
	<title>Re: [scala] jvm5 build should be default?</title>
	<published>2009-11-26T11:14:20Z</published>
	<updated>2009-11-26T11:14:20Z</updated>
	<author>
		<name>Blair Zajac</name>
	</author>
	<content type="html">&lt;br&gt;On Nov 25, 2009, at 9:11 PM, Jorge Ortiz wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; LinkedIn has 100+ engineers stuck on Java 1.5 because of a blocker bug in Apple's 1.6 JDK. It certainly doesn't &amp;quot;work just fine&amp;quot;.
&lt;br&gt;&lt;br&gt;Out of curiosity, which bug is this?
&lt;br&gt;&lt;br&gt;Blair
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala-f14147.html&quot; embed=&quot;fixTarget[14147]&quot; target=&quot;_top&quot; &gt;Scala&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-scala--jvm5-build-should-be-default--tp26518762p26533860.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533819</id>
	<title>Re: simple database question</title>
	<published>2009-11-26T11:10:20Z</published>
	<updated>2009-11-26T11:10:20Z</updated>
	<author>
		<name>TylerWeir</name>
	</author>
	<content type="html">Take a look at the User class example:
&lt;br&gt;&lt;a href=&quot;http://github.com/dpp/liftweb/blob/master/lift-examples/hellolift/src/main/scala/com/hellolift/model/User.scala&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/dpp/liftweb/blob/master/lift-examples/hellolift/src/main/scala/com/hellolift/model/User.scala&lt;/a&gt;&lt;br&gt;&lt;br&gt;On Nov 26, 1:39 pm, jack &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533819&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jack.wid...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; wow. thats impressive. But for this, what does the Person class have
&lt;br&gt;&amp;gt; to look like? Suppose I have the table but I don't have the Person
&lt;br&gt;&amp;gt; class written. What does it need to look like?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 26, 1:32 pm, harryh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533819&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;har...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; val people = Person.findAll()
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Nov 26, 1:22 pm, jack &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533819&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jack.wid...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I have my database configured properly in Boot.scala and in my
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; pom.xml. Suppose I have a table name person with a field called name.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; What is the simple code to return all rows of this table using Mapper.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I want to understand the essence of how lift ties tables to objects
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; with a simple example.
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Lift&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533819&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533819&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/liftweb?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/liftweb?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/liftweb-f30586.html&quot; embed=&quot;fixTarget[30586]&quot; target=&quot;_top&quot; &gt;liftweb&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/simple-database-question-tp26533261p26533819.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533731</id>
	<title>Re: [scala] New scala blog</title>
	<published>2009-11-26T11:03:22Z</published>
	<updated>2009-11-26T11:03:22Z</updated>
	<author>
		<name>Colin Howe-2</name>
	</author>
	<content type="html">Nice post :-)&lt;br&gt;&lt;br&gt;Although, I&amp;#39;d argue that many &lt;i&gt;good&lt;/i&gt; things initially lead to more lines but eventually lead to fewer as re-use etc is increased.&lt;br&gt;&lt;br&gt;Also, testing makes refactoring easier, which makes it easier to prune away excess baggage&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 6:55 PM, 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=26533731&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;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Okay, I&amp;#39;ve been threatening this for quite some time now...&lt;div&gt;Finally got round to it :)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.artima.com/weblogs/index.jsp?blogger=kevwright&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.artima.com/weblogs/index.jsp?blogger=kevwright&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;enjoy!&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala-f14147.html&quot; embed=&quot;fixTarget[14147]&quot; target=&quot;_top&quot; &gt;Scala&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-scala--New-scala-blog-tp26533647p26533731.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533647</id>
	<title>[scala] New scala blog</title>
	<published>2009-11-26T10:55:35Z</published>
	<updated>2009-11-26T10:55:35Z</updated>
	<author>
		<name>Kevin Wright-4</name>
	</author>
	<content type="html">Okay, I&amp;#39;ve been threatening this for quite some time now...&lt;div&gt;Finally got round to it :)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.artima.com/weblogs/index.jsp?blogger=kevwright&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.artima.com/weblogs/index.jsp?blogger=kevwright&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;enjoy!&lt;/div&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala-f14147.html&quot; embed=&quot;fixTarget[14147]&quot; target=&quot;_top&quot; &gt;Scala&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-scala--New-scala-blog-tp26533647p26533647.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533615</id>
	<title>Re: Package objects, implicits, and imports</title>
	<published>2009-11-26T10:52:51Z</published>
	<updated>2009-11-26T10:52:51Z</updated>
	<author>
		<name>Robert Macomber-3</name>
	</author>
	<content type="html">On 2009-11-26, Jorge Ortiz &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533615&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jorge.ortiz@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Please file a bug on Trac.
&lt;br&gt;&lt;br&gt;Ok; #2709 is created.
&lt;br&gt;-- 
&lt;br&gt;Robert Macomber
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533615&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;xbymeu@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Package-objects%2C-implicits%2C-and-imports-tp26532360p26533615.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533510</id>
	<title>Re: protected modifier bug?</title>
	<published>2009-11-26T10:42:52Z</published>
	<updated>2009-11-26T10:42:52Z</updated>
	<author>
		<name>Robbert van Dalen-2</name>
	</author>
	<content type="html">Thanks for pointing me to 'Programming in Scala' and for noting that &amp;nbsp;
&lt;br&gt;g(m: N) = m.f does compile.
&lt;br&gt;&lt;br&gt;Indeed, the chapter on access modifiers is an interesting read.
&lt;br&gt;&lt;br&gt;... it's hard to get Java out of my system but I'm getting there....
&lt;br&gt;&lt;br&gt;-Robbert
&lt;br&gt;&lt;br&gt;On Nov 26, 2009, at 7:30 PM, Daniel Sobral wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Scala's protected and private differs a lot from Java, but they are &amp;nbsp;
&lt;br&gt;&amp;gt; much more flexible a lot. I recommend reading up on it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; According to Programming in Scala, the Java-equivalent statements are;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; private[parent class] = same as private in Java
&lt;br&gt;&amp;gt; private[declaring class] = same as private in Scala
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You can also make the private's scope any enclosing class, object or &amp;nbsp;
&lt;br&gt;&amp;gt; package. And, then, there is private[this], which makes a field only &amp;nbsp;
&lt;br&gt;&amp;gt; accessible to the object itself (ie, two objects of the same type &amp;nbsp;
&lt;br&gt;&amp;gt; can't access each other's private[this] fields).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; For protected, declaring the scope to be the package makes it the &amp;nbsp;
&lt;br&gt;&amp;gt; same as Java.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The funny thing about your example is that you can't access &amp;quot;f&amp;quot; on &amp;nbsp;
&lt;br&gt;&amp;gt; an &amp;quot;M&amp;quot;, but you can access it on an &amp;quot;N&amp;quot;. If you declare &amp;quot;m&amp;quot; to be of &amp;nbsp;
&lt;br&gt;&amp;gt; type &amp;quot;N&amp;quot;, it works. This is as specified, as you can see in the last &amp;nbsp;
&lt;br&gt;&amp;gt; line below:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; A protected identifier
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; x may be used as a member name in a selection r .x
&lt;br&gt;&amp;gt; only if one of the following applies:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; –
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The access is within the template defining the member, or, if a &amp;nbsp;
&lt;br&gt;&amp;gt; qualification
&lt;br&gt;&amp;gt; C
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; is given, inside the package C, or the class C, or its companion
&lt;br&gt;&amp;gt; module, or
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 58 Classes and Objects
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; –
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; r is one of the reserved words this and super, or
&lt;br&gt;&amp;gt; –
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; r ’s type conforms to a type-instance of the class which contains &amp;nbsp;
&lt;br&gt;&amp;gt; the access.
&lt;br&gt;&amp;gt; On Thu, Nov 26, 2009 at 4:06 PM, Robbert Dalen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533510&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;robbert.van.dalen@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; &amp;gt; wrote:
&lt;br&gt;&amp;gt; So a protected modifier only allows access to subclasses?
&lt;br&gt;&amp;gt; But N is a proper subclass of M, so why shouldn't N be able to &amp;nbsp;
&lt;br&gt;&amp;gt; access f? &amp;nbsp;(albeit via an instance of M)
&lt;br&gt;&amp;gt; (O can access f)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; abstract class M {
&lt;br&gt;&amp;gt; &amp;nbsp;protect def: Int
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; abstract class N extends M {
&lt;br&gt;&amp;gt; &amp;nbsp;def(g: M) = m.f
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; abstract class O extends M {
&lt;br&gt;&amp;gt; &amp;nbsp;def g = f
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It looks as though you're subclassing here simply as a way to allow &amp;nbsp;
&lt;br&gt;&amp;gt; protected method access.
&lt;br&gt;&amp;gt; 'extends' is the tightest possible coupling that you can have &amp;nbsp;
&lt;br&gt;&amp;gt; between two classes, is that really what you want?
&lt;br&gt;&amp;gt; Unless it's *really* true that N is-an M, this could seriously &amp;nbsp;
&lt;br&gt;&amp;gt; confuse anyone who maintains the code after you.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Like you, I don't like subclassing, I'm just demonstrating strange &amp;nbsp;
&lt;br&gt;&amp;gt; behavior.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; A better solution would be to put both classes in a common package:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I agree this is more idiomatic Scala.
&lt;br&gt;&amp;gt; But then again: Java's protected also allows classes within the same &amp;nbsp;
&lt;br&gt;&amp;gt; package to have access.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -Robbert
&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;br&gt;&amp;gt; Daniel C. Sobral
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Veni, vidi, veterni.
&lt;/div&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/protected-modifier-bug--tp26526724p26533510.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533504</id>
	<title>Re: is the hashmap thread-safe</title>
	<published>2009-11-26T10:42:43Z</published>
	<updated>2009-11-26T10:42:43Z</updated>
	<author>
		<name>Jorge Ortiz-3</name>
	</author>
	<content type="html">Caesar,&lt;br&gt;&lt;br&gt;If you&amp;#39;re on 2.7.x, you can use TreeHashMap, which is a truly immutable lock-free data structure.&lt;br&gt;&lt;br&gt;On 2.8, unfortunately, it hasn&amp;#39;t been reintegrated with the rest of the collections library.&lt;br&gt;
&lt;br&gt;--j&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 5:44 AM, Caesar You &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533504&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Caesar.Jr@...&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 style=&quot;padding-left: 10px; padding-right: 10px; word-wrap: break-word; padding-top: 15px;&quot; name=&quot;Compose message area&quot;&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;immutable hashmap use synchronized method for concurrent 
environment.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;so thread-2 must wait until thread-1 *get* something 
from the map.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;but if a map is created and will not be modified, it is 
no need to synchronized.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;what i dont know is, if the &amp;quot;get&amp;quot; action modified 
some internal state of a hashmap&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;and make it thread-not-safe.&lt;/font&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div style=&quot;background: rgb(245, 245, 245) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&quot;&gt;
&lt;div&gt;&lt;b&gt;From:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533504&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hxliang1982@...&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;b&gt;Sent:&lt;/b&gt; Thursday, November 26, 2009 9:29 PM&lt;/div&gt;&lt;div class=&quot;im&quot;&gt;
&lt;div&gt;&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533504&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Caesar.Jr@...&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;b&gt;Subject:&lt;/b&gt; Re: [scala-user] is the hashmap 
thread-safe&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;Why do you say this? Performance more depends on underlying data 
structure, I think. Maybe I am wrong for this case... 
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;div&gt;&lt;br&gt;
&lt;div&gt;
&lt;div&gt;On Nov 26, 2009, at 9:09 PM, Caesar You wrote:&lt;/div&gt;&lt;br&gt;
&lt;blockquote type=&quot;cite&quot;&gt;
  &lt;div style=&quot;padding-left: 10px; padding-right: 10px; word-wrap: break-word; padding-top: 15px;&quot; name=&quot;Compose message area&quot;&gt;
  &lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;immutable map is slow, isnt it?&lt;/font&gt;&lt;/div&gt;
  &lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;&lt;/font&gt; &lt;/div&gt;
  &lt;div style=&quot;font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;
  &lt;div&gt;&lt;br&gt;&lt;/div&gt;
  &lt;div style=&quot;background: rgb(245, 245, 245) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&quot;&gt;
  &lt;div&gt;&lt;b&gt;From:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533504&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hxliang1982@...&lt;/a&gt; &lt;/div&gt;
  &lt;div&gt;&lt;b&gt;Sent:&lt;/b&gt; Thursday, November 26, 2009 9:04 PM&lt;/div&gt;
  &lt;div&gt;&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533504&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Caesar.Jr@...&lt;/a&gt; &lt;/div&gt;
  &lt;div&gt;&lt;b&gt;Subject:&lt;/b&gt; Re: [scala-user] is the hashmap 
  thread-safe&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;div&gt;&lt;br&gt;&lt;/div&gt;If it is read only, why not using immutable map? 
  &lt;div&gt;&lt;br&gt;
  &lt;div&gt;
  &lt;div&gt;On Nov 26, 2009, at 8:41 PM, Caesar You wrote:&lt;/div&gt;&lt;br&gt;
  &lt;blockquote type=&quot;cite&quot;&gt;
    &lt;div style=&quot;padding-left: 10px; padding-right: 10px; padding-top: 15px;&quot; name=&quot;Compose message area&quot;&gt;
    &lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;if i create a mutable.HashMap, and only use the 
    &amp;quot;get(key)&amp;quot; action,&lt;/font&gt;&lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;that means i will not modify the hashmap as using 
    &amp;quot;+=&amp;quot;, &amp;quot;-=&amp;quot;.&lt;/font&gt;&lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Calibri&quot;&gt;in this situation, is it 
    thread-safe?&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/is-the-hashmap-thread-safe-tp26528930p26533504.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533464</id>
	<title>Re: simple database question</title>
	<published>2009-11-26T10:39:44Z</published>
	<updated>2009-11-26T10:39:44Z</updated>
	<author>
		<name>jackwidman</name>
	</author>
	<content type="html">wow. thats impressive. But for this, what does the Person class have
&lt;br&gt;to look like? Suppose I have the table but I don't have the Person
&lt;br&gt;class written. What does it need to look like?
&lt;br&gt;&lt;br&gt;On Nov 26, 1:32 pm, harryh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533464&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;har...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; val people = Person.findAll()
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 26, 1:22 pm, jack &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533464&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jack.wid...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I have my database configured properly in Boot.scala and in my
&lt;br&gt;&amp;gt; &amp;gt; pom.xml. Suppose I have a table name person with a field called name.
&lt;br&gt;&amp;gt; &amp;gt; What is the simple code to return all rows of this table using Mapper.
&lt;br&gt;&amp;gt; &amp;gt; I want to understand the essence of how lift ties tables to objects
&lt;br&gt;&amp;gt; &amp;gt; with a simple example.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Lift&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533464&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533464&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/liftweb?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/liftweb?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/liftweb-f30586.html&quot; embed=&quot;fixTarget[30586]&quot; target=&quot;_top&quot; &gt;liftweb&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/simple-database-question-tp26533261p26533464.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533460</id>
	<title>Re: Package objects, implicits, and imports</title>
	<published>2009-11-26T10:39:14Z</published>
	<updated>2009-11-26T10:39:14Z</updated>
	<author>
		<name>Jorge Ortiz-3</name>
	</author>
	<content type="html">Please file a bug on Trac.&lt;br&gt;&lt;br&gt;--j&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 8:58 AM, Robert Macomber &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533460&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;xbymeu@...&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;
I&amp;#39;ve been working a little with the package objects in 2.8, and I&amp;#39;ve&lt;br&gt;
found a little oddity.  Say you&amp;#39;ve got a package with a package&lt;br&gt;
object:&lt;br&gt;
&lt;br&gt;
  package com.rojoma&lt;br&gt;
&lt;br&gt;
  package object pkg {&lt;br&gt;
    implicit def enrich(a: A) = new RichA(a)&lt;br&gt;
  }&lt;br&gt;
&lt;br&gt;
If you&amp;#39;re *outside* the package, all works as expected:&lt;br&gt;
&lt;br&gt;
  import com.rojoma.pkg._&lt;br&gt;
  (new A).someRichAMethod() // finds the implicit, great&lt;br&gt;
&lt;br&gt;
But if you&amp;#39;re *inside* it, you still have to explicitly import the&lt;br&gt;
package&amp;#39;s contents for the implicits to be found:&lt;br&gt;
&lt;br&gt;
  package com.rojoma.pkg&lt;br&gt;
&lt;br&gt;
  class Cls {&lt;br&gt;
    // doesn&amp;#39;t find the implicit unless com.rojoma.pkg._ is imported&lt;br&gt;
    (new A).someRichAMethod()&lt;br&gt;
  }&lt;br&gt;
&lt;br&gt;
The enrich method is in scope; calling it explicitly works.  It&amp;#39;s just&lt;br&gt;
not found by the implicit-resolution machinery.  Is this by design or&lt;br&gt;
an oversight?&lt;br&gt;
&lt;br&gt;
For completeness, the same thing happens if the code that wants to use&lt;br&gt;
the implicit is in a package nested inside &amp;quot;com.rojoma.pkg&amp;quot;.&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;--&lt;br&gt;
Robert Macomber&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533460&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;xbymeu@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Package-objects%2C-implicits%2C-and-imports-tp26532360p26533460.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533385</id>
	<title>Re: Actors don't work with Java 1.5</title>
	<published>2009-11-26T10:32:20Z</published>
	<updated>2009-11-26T10:32:20Z</updated>
	<author>
		<name>Daniel Sobral</name>
	</author>
	<content type="html">The question is the Scala distribution being used. A 1.6 Scala distribution won&amp;#39;t work with Java 1.5, particularly concerning Actors.&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 4:14 PM, Miles Sabin &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533385&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;miles@...&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;div class=&quot;im&quot;&gt;On Thu, Nov 26, 2009 at 6:08 PM, Sciss &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533385&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;contact@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; i have always been using&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.scala-lang.org/scala-eclipse-plugin-nightly&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.scala-lang.org/scala-eclipse-plugin-nightly&lt;/a&gt; ... is there a&lt;br&gt;

&amp;gt; separate eclipse plug-in site for java 1.5?&lt;br&gt;&lt;br&gt;&lt;/div&gt;At the moment, no ... there probably should be.&lt;br&gt;&lt;br&gt;What JDK are you using to build your application? Even if the IDE code&lt;br&gt;was built with 1.6 you should be able to select 1.5 for building your&lt;br&gt;

own projects.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;&lt;br&gt;&lt;br&gt;Miles&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;--&lt;br&gt;Miles Sabin&lt;br&gt;tel: +44 (0)7813 944 528&lt;br&gt;skype:  milessabin&lt;br&gt;&lt;a href=&quot;http://www.chuusai.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.chuusai.com/&lt;/a&gt;&lt;br&gt;

&lt;a href=&quot;http://twitter.com/milessabin&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/milessabin&lt;/a&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;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Actors-don%27t-work-with-Java-1.5-tp26532911p26533385.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533368</id>
	<title>Re: simple database question</title>
	<published>2009-11-26T10:32:09Z</published>
	<updated>2009-11-26T10:32:09Z</updated>
	<author>
		<name>harryh</name>
	</author>
	<content type="html">val people = Person.findAll()
&lt;br&gt;&lt;br&gt;On Nov 26, 1:22 pm, jack &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533368&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jack.wid...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; I have my database configured properly in Boot.scala and in my
&lt;br&gt;&amp;gt; pom.xml. Suppose I have a table name person with a field called name.
&lt;br&gt;&amp;gt; What is the simple code to return all rows of this table using Mapper.
&lt;br&gt;&amp;gt; I want to understand the essence of how lift ties tables to objects
&lt;br&gt;&amp;gt; with a simple example.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Lift&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533368&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533368&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/liftweb?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/liftweb?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/liftweb-f30586.html&quot; embed=&quot;fixTarget[30586]&quot; target=&quot;_top&quot; &gt;liftweb&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/simple-database-question-tp26533261p26533368.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533375</id>
	<title>Re: protected modifier bug?</title>
	<published>2009-11-26T10:31:57Z</published>
	<updated>2009-11-26T10:31:57Z</updated>
	<author>
		<name>Robbert van Dalen-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt;&amp;gt; Perhaps, protected grants access to a member when you're accessing &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; that member through a subclass mechanism, i.e. super.f
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;That sounds plausible, yes.
&lt;br&gt;&lt;br&gt;&amp;gt; N is accessing f as any other external entity would.
&lt;br&gt;&lt;br&gt;I now believe that the Java version compiles *because* the classes N &amp;nbsp;
&lt;br&gt;and M are in the same package, not because N is a subclass of M.
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I think.
&lt;br&gt;&lt;br&gt;I think you are right.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;-Robbert.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/protected-modifier-bug--tp26526724p26533375.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533354</id>
	<title>Re: protected modifier bug?</title>
	<published>2009-11-26T10:30:23Z</published>
	<updated>2009-11-26T10:30:23Z</updated>
	<author>
		<name>Daniel Sobral</name>
	</author>
	<content type="html">&lt;div&gt;Scala&amp;#39;s protected and private differs a lot from Java, but they are much more flexible a lot. I recommend reading up on it.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;According to Programming in Scala, the Java-equivalent statements are;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;private[parent class] = same as private in Java&lt;/div&gt;
&lt;div&gt;private[declaring class] = same as private in Scala&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;You can also make the private&amp;#39;s scope any enclosing class, object or package. And, then, there is private[this], which makes a field only accessible to the object itself (ie, two objects of the same type can&amp;#39;t access each other&amp;#39;s private[this] fields).&lt;/div&gt;


&lt;div&gt; &lt;/div&gt;
&lt;div&gt;For protected, declaring the scope to be the package makes it the same as Java.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The funny thing about your example is that you can&amp;#39;t access &amp;quot;f&amp;quot; on an &amp;quot;M&amp;quot;, but you can access it on an &amp;quot;N&amp;quot;. If you declare &amp;quot;m&amp;quot; to be of type &amp;quot;N&amp;quot;, it works. This is as specified, as you can see in the last line below:&lt;/div&gt;


&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;
&lt;p align=&quot;left&quot;&gt;A protected identifier &lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;x &lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;may be used as a member name in a selection &lt;/font&gt;&lt;/font&gt;&lt;i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;r &lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;font size=&quot;2&quot; face=&quot;LuxiMono&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;LuxiMono&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;x&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;
&lt;p align=&quot;left&quot;&gt;only if one of the following applies:&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;b&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Bold&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Bold&quot;&gt;
&lt;p align=&quot;left&quot;&gt;– &lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;The access is within the template defining the member, or, if a qualification&lt;/font&gt;&lt;/font&gt;&lt;i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;
&lt;p align=&quot;left&quot;&gt;C &lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;is given, inside the package &lt;/font&gt;&lt;/font&gt;&lt;i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;C&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;, or the class &lt;/font&gt;&lt;/font&gt;&lt;i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;C&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;, or its companion
&lt;p align=&quot;left&quot;&gt;module, or&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot; face=&quot;NimbusSanL-Regu&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;NimbusSanL-Regu&quot;&gt;
&lt;p align=&quot;left&quot;&gt;58 Classes and Objects&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;b&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Bold&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Bold&quot;&gt;
&lt;p align=&quot;left&quot;&gt;– &lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;r &lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;is one of the reserved words &lt;/font&gt;&lt;/font&gt;&lt;b&gt;&lt;font size=&quot;2&quot; face=&quot;LuxiMono-Bold&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;LuxiMono-Bold&quot;&gt;this &lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;and &lt;/font&gt;&lt;/font&gt;&lt;b&gt;&lt;font size=&quot;2&quot; face=&quot;LuxiMono-Bold&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;LuxiMono-Bold&quot;&gt;super&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;, or&lt;/font&gt;&lt;/font&gt;&lt;b&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Bold&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Bold&quot;&gt;
&lt;p&gt;– &lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;&lt;i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Italic&quot;&gt;r &lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;&lt;font size=&quot;3&quot; face=&quot;Utopia-Regular&quot;&gt;’s type conforms to a type-instance of the class which contains the access.&lt;/font&gt;&lt;/font&gt;&lt;br&gt;

&lt;/div&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 4:06 PM, Robbert Dalen &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533354&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;robbert.van.dalen@...&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;So a protected modifier only allows access to subclasses?&lt;br&gt;But N is a proper subclass of M, so why shouldn&amp;#39;t N be able to access f?  (albeit via an instance of M)&lt;br&gt;

(O can access f)&lt;br&gt;&lt;br&gt;abstract class M {&lt;br&gt; protect def: Int 
&lt;div class=&quot;im&quot;&gt;&lt;br&gt;}&lt;br&gt;abstract class N extends M {&lt;br&gt;&lt;/div&gt; def(g: M) = m.f&lt;br&gt;}&lt;br&gt;abstract class O extends M {&lt;br&gt; def g = f 
&lt;div class=&quot;im&quot;&gt;&lt;br&gt;}&lt;br&gt;&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;It looks as though you&amp;#39;re subclassing here simply as a way to allow protected method access.&lt;br&gt;&amp;#39;extends&amp;#39; is the tightest possible coupling that you can have between two classes, is that really what you want?&lt;br&gt;

Unless it&amp;#39;s *really* true that N is-an M, this could seriously confuse anyone who maintains the code after you.&lt;br&gt;&lt;/blockquote&gt;&lt;br&gt;&lt;/div&gt;Like you, I don&amp;#39;t like subclassing, I&amp;#39;m just demonstrating strange behavior. 
&lt;div class=&quot;im&quot;&gt;&lt;br&gt;&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;A better solution would be to put both classes in a common package:&lt;br&gt;&lt;/blockquote&gt;&lt;br&gt;&lt;/div&gt;I agree this is more idiomatic Scala.&lt;br&gt;

But then again: Java&amp;#39;s protected also allows classes within the same package to have access.&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;-Robbert&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;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/protected-modifier-bug--tp26526724p26533354.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533261</id>
	<title>simple database question</title>
	<published>2009-11-26T10:22:39Z</published>
	<updated>2009-11-26T10:22:39Z</updated>
	<author>
		<name>jackwidman</name>
	</author>
	<content type="html">I have my database configured properly in Boot.scala and in my
&lt;br&gt;pom.xml. Suppose I have a table name person with a field called name.
&lt;br&gt;What is the simple code to return all rows of this table using Mapper.
&lt;br&gt;I want to understand the essence of how lift ties tables to objects
&lt;br&gt;with a simple example.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Lift&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533261&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533261&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;liftweb+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/liftweb?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/liftweb?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/liftweb-f30586.html&quot; embed=&quot;fixTarget[30586]&quot; target=&quot;_top&quot; &gt;liftweb&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/simple-database-question-tp26533261p26533261.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533205</id>
	<title>Re: Actors don't work with Java 1.5</title>
	<published>2009-11-26T10:17:18Z</published>
	<updated>2009-11-26T10:17:18Z</updated>
	<author>
		<name>Sciss-3</name>
	</author>
	<content type="html">i'm using JVM 1.5.0, since i'm on OS X 10.4 with a 32-bit intel... &amp;nbsp;
&lt;br&gt;some day i will upgrade to snow leopard, but as for now, i'm stuck &amp;nbsp;
&lt;br&gt;with java 1.5
&lt;br&gt;&lt;br&gt;does that mean that the eclipse plug-in doesn't actually support java &amp;nbsp;
&lt;br&gt;1.5 any more? at least it seems to be working ok here...
&lt;br&gt;&lt;br&gt;cheers, -sciss-
&lt;br&gt;&lt;br&gt;&lt;br&gt;Am 26.11.2009 um 18:14 schrieb Miles Sabin:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thu, Nov 26, 2009 at 6:08 PM, Sciss &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533205&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;contact@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; i have always been using
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.scala-lang.org/scala-eclipse-plugin-nightly&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.scala-lang.org/scala-eclipse-plugin-nightly&lt;/a&gt;&amp;nbsp;... is there a
&lt;br&gt;&amp;gt;&amp;gt; separate eclipse plug-in site for java 1.5?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; At the moment, no ... there probably should be.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What JDK are you using to build your application? Even if the IDE code
&lt;br&gt;&amp;gt; was built with 1.6 you should be able to select 1.5 for building your
&lt;br&gt;&amp;gt; own projects.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Miles
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; Miles Sabin
&lt;br&gt;&amp;gt; tel: +44 (0)7813 944 528
&lt;br&gt;&amp;gt; skype: &amp;nbsp;milessabin
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.chuusai.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.chuusai.com/&lt;/a&gt;&lt;br&gt;&amp;gt; &lt;a href=&quot;http://twitter.com/milessabin&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/milessabin&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Actors-don%27t-work-with-Java-1.5-tp26532911p26533205.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533181</id>
	<title>Re: Actors don't work with Java 1.5</title>
	<published>2009-11-26T10:14:29Z</published>
	<updated>2009-11-26T10:14:29Z</updated>
	<author>
		<name>Miles Sabin</name>
	</author>
	<content type="html">On Thu, Nov 26, 2009 at 6:08 PM, Sciss &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533181&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;contact@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; i have always been using
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.scala-lang.org/scala-eclipse-plugin-nightly&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.scala-lang.org/scala-eclipse-plugin-nightly&lt;/a&gt;&amp;nbsp;... is there a
&lt;br&gt;&amp;gt; separate eclipse plug-in site for java 1.5?
&lt;br&gt;&lt;br&gt;At the moment, no ... there probably should be.
&lt;br&gt;&lt;br&gt;What JDK are you using to build your application? Even if the IDE code
&lt;br&gt;was built with 1.6 you should be able to select 1.5 for building your
&lt;br&gt;own projects.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;&lt;br&gt;Miles
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Miles Sabin
&lt;br&gt;tel: +44 (0)7813 944 528
&lt;br&gt;skype: &amp;nbsp;milessabin
&lt;br&gt;&lt;a href=&quot;http://www.chuusai.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.chuusai.com/&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://twitter.com/milessabin&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/milessabin&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Actors-don%27t-work-with-Java-1.5-tp26532911p26533181.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533168</id>
	<title>Re: protected modifier bug?</title>
	<published>2009-11-26T10:13:32Z</published>
	<updated>2009-11-26T10:13:32Z</updated>
	<author>
		<name>Gordon Tyler</name>
	</author>
	<content type="html">Robbert Dalen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; So a protected modifier only allows access to subclasses?
&lt;br&gt;&amp;gt; But N is a proper subclass of M, so why shouldn't N be able to access 
&lt;br&gt;&amp;gt; f? &amp;nbsp;(albeit via an instance of M)
&lt;br&gt;&amp;gt; (O can access f)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; abstract class M {
&lt;br&gt;&amp;gt; &amp;nbsp;protect def: Int
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; abstract class N extends M {
&lt;br&gt;&amp;gt; &amp;nbsp;def(g: M) = m.f
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; abstract class O extends M {
&lt;br&gt;&amp;gt; &amp;nbsp;def g = f
&lt;br&gt;&amp;gt; }
&lt;/div&gt;&lt;br&gt;Perhaps, protected grants access to a member when you're accessing that 
&lt;br&gt;member through a subclass mechanism, i.e. super.f
&lt;br&gt;&lt;br&gt;N is accessing f as any other external entity would.
&lt;br&gt;&lt;br&gt;I think.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/protected-modifier-bug--tp26526724p26533168.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533126</id>
	<title>Re: [scala-tools] Scala plugin for Netbeans 6.8beta -  BoxedBooleanArray class not found</title>
	<published>2009-11-26T10:11:18Z</published>
	<updated>2009-11-26T10:11:18Z</updated>
	<author>
		<name>Lalit Pant</name>
	</author>
	<content type="html">Looking forward to it - especially the 'real-time interactive compilation' feature - which, I gather from another thread, works now for the new version of the plugin.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;- Lalit
&lt;br&gt;&lt;br&gt;:::
&lt;br&gt;Lalit Pant
&lt;br&gt;&lt;a href=&quot;http://www.kogics.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.kogics.net&lt;/a&gt;&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;dcaoyuan wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;That's great.
&lt;br&gt;&lt;br&gt;A new version of Scala plugin for NetBeans 6.8RC1 will be available
&lt;br&gt;all at once in couple of days.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---Tools-f27364.html&quot; embed=&quot;fixTarget[27364]&quot; target=&quot;_top&quot; &gt;Scala - Tools&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-scala-tools--Scala-plugin-for-Netbeans-6.8beta---BoxedBooleanArray-class-not-found-tp26520432p26533126.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533090</id>
	<title>Re: Actors don't work with Java 1.5</title>
	<published>2009-11-26T10:08:06Z</published>
	<updated>2009-11-26T10:08:06Z</updated>
	<author>
		<name>Sciss-3</name>
	</author>
	<content type="html">i have always been using &lt;a href=&quot;http://www.scala-lang.org/scala-eclipse-&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.scala-lang.org/scala-eclipse-&lt;/a&gt;&amp;nbsp;
&lt;br&gt;plugin-nightly ... is there a separate eclipse plug-in site for java &amp;nbsp;
&lt;br&gt;1.5?
&lt;br&gt;&lt;br&gt;thanks, -sciss-
&lt;br&gt;&lt;br&gt;&lt;br&gt;Am 26.11.2009 um 17:57 schrieb Daniel Sobral:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; There are two distributions, 1.5 and 1.6. Are you sure you got the &amp;nbsp;
&lt;br&gt;&amp;gt; 1.5 distribution?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Thu, Nov 26, 2009 at 3:49 PM, Sciss &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533090&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;contact@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; using a recent nightly from scala, my previously working code &amp;nbsp;
&lt;br&gt;&amp;gt; breaks with
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; java.lang.NoSuchMethodError: &amp;nbsp;
&lt;br&gt;&amp;gt; java.util.concurrent.locks.LockSupport.park(Ljava/lang/Object;)V
&lt;br&gt;&amp;gt; &amp;nbsp; and
&lt;br&gt;&amp;gt; java.lang.NoClassDefFoundError: java/util/concurrent/RunnableFuture
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; when calling the actor method... seems some java 1.6 stuff sneaked &amp;nbsp;
&lt;br&gt;&amp;gt; in here?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ciao, -sciss-
&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;br&gt;&amp;gt; Daniel C. Sobral
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Veni, vidi, veterni.
&lt;/div&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Actors-don%27t-work-with-Java-1.5-tp26532911p26533090.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533073</id>
	<title>Re: protected modifier bug?</title>
	<published>2009-11-26T10:06:51Z</published>
	<updated>2009-11-26T10:06:51Z</updated>
	<author>
		<name>Robbert van Dalen-2</name>
	</author>
	<content type="html">So a protected modifier only allows access to subclasses?
&lt;br&gt;But N is a proper subclass of M, so why shouldn't N be able to access &amp;nbsp;
&lt;br&gt;f? &amp;nbsp;(albeit via an instance of M)
&lt;br&gt;(O can access f)
&lt;br&gt;&lt;br&gt;abstract class M {
&lt;br&gt;&amp;nbsp; protect def: Int
&lt;br&gt;}
&lt;br&gt;abstract class N extends M {
&lt;br&gt;&amp;nbsp; def(g: M) = m.f
&lt;br&gt;}
&lt;br&gt;abstract class O extends M {
&lt;br&gt;&amp;nbsp; def g = f
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&amp;gt; It looks as though you're subclassing here simply as a way to allow &amp;nbsp;
&lt;br&gt;&amp;gt; protected method access.
&lt;br&gt;&amp;gt; 'extends' is the tightest possible coupling that you can have &amp;nbsp;
&lt;br&gt;&amp;gt; between two classes, is that really what you want?
&lt;br&gt;&amp;gt; Unless it's *really* true that N is-an M, this could seriously &amp;nbsp;
&lt;br&gt;&amp;gt; confuse anyone who maintains the code after you.
&lt;br&gt;&lt;br&gt;Like you, I don't like subclassing, I'm just demonstrating strange &amp;nbsp;
&lt;br&gt;behavior.
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; A better solution would be to put both classes in a common package:
&lt;br&gt;&lt;br&gt;I agree this is more idiomatic Scala.
&lt;br&gt;But then again: Java's protected also allows classes within the same &amp;nbsp;
&lt;br&gt;package to have access.
&lt;br&gt;&lt;br&gt;-Robbert
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/protected-modifier-bug--tp26526724p26533073.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533041</id>
	<title>Re: [scala] jvm5 build should be default?</title>
	<published>2009-11-26T10:02:42Z</published>
	<updated>2009-11-26T10:02:42Z</updated>
	<author>
		<name>Ismael Juma</name>
	</author>
	<content type="html">On Thu, 2009-11-26 at 14:55 +0100, Antonio Cunei wrote:
&lt;br&gt;&amp;gt; Therefore our planned naming scheme is just:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; * scala-2.7.x &amp;nbsp; &amp;nbsp; &amp;nbsp; requires jvm 1.5
&lt;br&gt;&amp;gt; &amp;nbsp; * scala-2.7.x-jvm4 &amp;nbsp;runs on jvm 1.4
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; * scala-2.8.x &amp;nbsp; &amp;nbsp; &amp;nbsp; requires jvm 1.6
&lt;br&gt;&amp;gt; &amp;nbsp; * scala-2.8.x-jvm5 &amp;nbsp;runs on jvm 1.5
&lt;br&gt;&lt;br&gt;I am wondering if it won't be better to have the jvm suffix for both
&lt;br&gt;builds given recent emails I've seen where people use the default build,
&lt;br&gt;expect it to work with Java 5 and then email the list asking what's up.
&lt;br&gt;&lt;br&gt;I would hope that including the expected jvm in the name may improve the
&lt;br&gt;situation. Is there a downside to this?
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;Ismael
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala-f14147.html&quot; embed=&quot;fixTarget[14147]&quot; target=&quot;_top&quot; &gt;Scala&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-scala--jvm5-build-should-be-default--tp26518762p26533041.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26532998</id>
	<title>Re: Actors don't work with Java 1.5</title>
	<published>2009-11-26T09:57:59Z</published>
	<updated>2009-11-26T09:57:59Z</updated>
	<author>
		<name>Daniel Sobral</name>
	</author>
	<content type="html">There are two distributions, 1.5 and 1.6. Are you sure you got the 1.5 distribution?&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 3:49 PM, Sciss &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26532998&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;contact@...&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;hi,&lt;br&gt;&lt;br&gt;using a recent nightly from scala, my previously working code breaks with&lt;br&gt;&lt;br&gt;java.lang.NoSuchMethodError: java.util.concurrent.locks.LockSupport.park(Ljava/lang/Object;)V&lt;br&gt;

  and&lt;br&gt;java.lang.NoClassDefFoundError: java/util/concurrent/RunnableFuture&lt;br&gt;&lt;br&gt;when calling the actor method... seems some java 1.6 stuff sneaked in here?&lt;br&gt;&lt;br&gt;ciao, -sciss-&lt;br&gt;&lt;br&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;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Actors-don%27t-work-with-Java-1.5-tp26532911p26532998.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26532911</id>
	<title>Actors don't work with Java 1.5</title>
	<published>2009-11-26T09:49:19Z</published>
	<updated>2009-11-26T09:49:19Z</updated>
	<author>
		<name>Sciss-3</name>
	</author>
	<content type="html">hi,
&lt;br&gt;&lt;br&gt;using a recent nightly from scala, my previously working code breaks &amp;nbsp;
&lt;br&gt;with
&lt;br&gt;&lt;br&gt;java.lang.NoSuchMethodError: &amp;nbsp;
&lt;br&gt;java.util.concurrent.locks.LockSupport.park(Ljava/lang/Object;)V
&lt;br&gt;&amp;nbsp; &amp;nbsp; and
&lt;br&gt;java.lang.NoClassDefFoundError: java/util/concurrent/RunnableFuture
&lt;br&gt;&lt;br&gt;when calling the actor method... seems some java 1.6 stuff sneaked in &amp;nbsp;
&lt;br&gt;here?
&lt;br&gt;&lt;br&gt;ciao, -sciss-
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Scala---User-f30217.html&quot; embed=&quot;fixTarget[30217]&quot; target=&quot;_top&quot; &gt;Scala - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Actors-don%27t-work-with-Java-1.5-tp26532911p26532911.html" />
</entry>

</feed>
