• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scala and WebObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:
move.title = "Title" 
instead of 
movie.setTitle("Title");

- 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
Movie.REVENUE.gt(new BigDecimal("100000")).filtered(movies)

val studioNames = movies.map(_.studio.name)
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

References: 
 >Re: Scala and WebObjects (From: Ravi Mendis <email@hidden>)
 >Re: Scala and WebObjects (From: Marius Soutier <email@hidden>)
 >Re: Scala and WebObjects (From: Anjo Krank <email@hidden>)
 >Re: Scala and WebObjects (From: Karl <email@hidden>)
 >Re: Scala and WebObjects (From: Anjo Krank <email@hidden>)
 >Re: Scala and WebObjects (From: Mike Schrag <email@hidden>)
 >Re: Scala and WebObjects (From: Anjo Krank <email@hidden>)
 >Re: Scala and WebObjects (From: Pascal Robert <email@hidden>)
 >Re: Scala and WebObjects (From: Anjo Krank <email@hidden>)
 >Re: Scala and WebObjects (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: WOWODC 2011 news
  • Next by Date: Joda-Time and NSTimestamp
  • Previous by thread: Re: Scala and WebObjects
  • Next by thread: Re: Scala and WebObjects
  • Index(es):
    • Date
    • Thread