Re: Scala and WebObjects
Re: Scala and WebObjects
- Subject: Re: Scala and WebObjects
- From: John Huss <email@hidden>
- Date: Thu, 11 Nov 2010 09:30:11 -0600
On Thu, Nov 11, 2010 at 6:33 AM, Mike Schrag
<email@hidden> wrote:
>> Sure, extending WO so that EOF become multi-threaded or anything like this would be a huge task, but from my point of view (a non-technical one), we can do a lot on top of WO to "fix" problems. And to me, it make more sense to extend WO than trying to rewrite it...
> Depending on how you understand "multithreaded", that's already implemented or in fact pretty easy to do. Andrus (I think?) has done some work on that years ago.
I think I would define multithreading to be something like multiple EOF stacks that don't blow out memory ... Ultimately that requires some form of lockless snapshot cache. We get the first half with object store coordinator pools, but not the second part.
Multiple stacks is what I was wondering about. If you use multiple EOF stacks then can't you use Scala Actors with EOF and avoid the single-thread problems? What is the problem with that approach?
Regardless, I would say Scala offers some very nice syntactic improvements
- Properties:
- BigDecimal (with properties)
movie.revenue += 100
instead of
movie.setRevenue(movie.revenue().add(new BigDecimal("100")));
- Better collection operations
movies.filter(_.revenue > 100000)
instead of
instead of
NSArray<String> studioNames = (NSArray<String>)movies.valueForKeyPath(Movie.STUDIO.dot(Studio.NAME).key());
- Encouragement to use immutable data makes for better code
- Option type - safer and cleaner than using nulls
- Removal of java oddities such as: primitives, nulls, autoboxing, statics, generic variance issues
I think you can use Scala and get all these benefits without having to abandon any of the important parts of WO/EOF.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden