Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Professional Scala

You're reading from   Professional Scala Combine object-oriented and functional programming to build high-performance applications

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher
ISBN-13 9781789533835
Length 186 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Ruslan Shevchenko Ruslan Shevchenko
Author Profile Icon Ruslan Shevchenko
Ruslan Shevchenko
Mads Hartmann Mads Hartmann
Author Profile Icon Mads Hartmann
Mads Hartmann
Arrow right icon
View More author details
Toc

Chapter 6. Implicits

In the previous chapter, we covered the type system and polymorphism. We also covered the different types of variance which provide ways to constrain parameterized types. Finally, we covered some advanced types such as abstract type members, option, and so on.

In this chapter, we will cover implicit parameters and implicit conversions. We'll be learning about how they work, how to use them, and what kind of benefits and perils they provide.

When using a third-party library in your code, you usually have to take its code as it is. This can make some libraries unpleasant to deal with. It can be either the code style that differs from the one in your code base or simply some functionality that the library lacks that you can't elegantly supply.

Some languages have come up with solutions to alleviate this problem. Ruby has modules, Smalltalk allows packages to add to each other's classes, and C# 3.0 has static extension methods.

Scala has implicit...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image