Implicits and iteratee-exec#807

21 views
Skip to first unread message

Vitaliy Morarian

unread,
Apr 24, 2013, 10:52:09 AM4/24/13
to play-fram...@googlegroups.com
Hi all,

I'm curious, why all functions are designed without implicit of ExecutionContext

In other words, new version is defined as 
def foreach[E](f: E => Unit)(ec: ExecutionContext): Iteratee[E, Unit] = .....

So why not 
def foreach[E](f: E => Unit)(implicit ec: ExecutionContext): Iteratee[E, Unit] = .....

Can anybody explain it.

With best regards,
Vitaliy

Pascal Voitot Dev

unread,
Apr 24, 2013, 10:55:00 AM4/24/13
to Vitaliy Morarian, play-fram...@googlegroups.com
Have a look at master Iteratee.scala ;)
(executioncontext are quite recent and iteratee existed before them)

Pascal


--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Vitaliy Morarian

unread,
Apr 24, 2013, 11:07:47 AM4/24/13
to Pascal Voitot Dev, play-fram...@googlegroups.com
Pascal,

I'm already looking in master and unfortunately still can't find a reason why ExecutionContext is not used implicitely.
Let me rephrase -- any plans to add implicits later? ;)

With best regards,
Vitaliy Morarian

Pascal Voitot Dev

unread,
Apr 24, 2013, 11:13:36 AM4/24/13
to Vitaliy Morarian, play-fram...@googlegroups.com
On Wed, Apr 24, 2013 at 5:07 PM, Vitaliy Morarian <vmor...@gmail.com> wrote:
Pascal,

I'm already looking in master and unfortunately still can't find a reason why ExecutionContext is not used implicitely.
Let me rephrase -- any plans to add implicits later? ;)


Sorry I anwered too quickly because I thought we had already introduced those implicits but not yet :D
Actually, the code in master is work in progress: when we are sure everything works correctly with those execution contexts, we'll make them implicit.

Pascal

Vitaliy Morarian

unread,
Apr 24, 2013, 11:16:45 AM4/24/13
to Pascal Voitot Dev, play-fram...@googlegroups.com
Pascal,

Now it's clear. Thanks

With best regards,
Vitaliy Morarian


Rich Dougherty

unread,
Apr 24, 2013, 5:38:15 PM4/24/13
to Vitaliy Morarian, Pascal Voitot Dev, play-fram...@googlegroups.com
Yes, Pascal is correct. I'm actually working on this change at the moment. The implicits should be fixed up in 1-2 weeks.

Usually I'd try to do everything in a single PR but introducing ECs to iteratees is a big change. I'm doing everything in smaller parts. The first step is getting all the ECs in the iteratee project right, which is pretty complicated in itself. Right now, I'm writing unit tests to test that. Once the tests are done I'll make all the ECs implicit and then go through the Play code to tidy every place that uses iteratees. That will be the main bit of work done. Then there are other miscellaneous tasks: replacing deprecated methods, optimisation, etc.

Cheers
Rich
Reply all
Reply to author
Forward
0 new messages