Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • 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 Java Tomcat Server
  • Mark post as helpful
  • send pies
  • 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: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find sometimes using implicits are a bit confusing if you do not understand them thoroughly.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!