• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is implicit in Scala/Play and why we mark request as implicit in Play framework

 
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have gone though multiple posts where they have explained about what is implicit in scala, but still I am confuse what is it and why we make Play request implicit in some case like below and where?



I have also seen that Scala heavily using implicit as in API, and heavily using implicit conversion. I just want to know how scala compiler use implicit, handle implicit argument not passing value, how compiler will work on implicit conversion and all.


Thanks in advance.
 
Ranch Hand
Posts: 37
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not an expert but all I can say in layman language is ---

Using 'implicit' allows Scala apply its common sense.

For example,

implicit timeout = 12 seconds
// Whatever process/thread you run with this implicit timeout, the thread/process would timeout in 12 seconds even though you do not explicitly specify it. Hope I am not confusing you.




 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I find sometimes using implicits are a bit confusing if you do not understand them thoroughly.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic