• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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: 10191
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.
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!