Scala Implicits Debate

The cluster centers on discussions about Scala's implicits, including implicit parameters and conversions, debating their power, readability issues, comparisons to other languages like Kotlin and C#, and overall merits versus drawbacks.

➡️ Stable 0.6x Programming Languages
895
Comments
17
Years Active
5
Top Authors
#14
Topic ID

Activity Over Time

2009
3
2010
12
2011
15
2012
36
2013
64
2014
64
2015
63
2016
56
2017
84
2018
91
2019
35
2020
56
2021
101
2022
43
2023
54
2024
59
2025
59

Keywords

SBT e.g DSL ML DHH JavaScript IntMonoid ActorSystem GUI implicit scala conversions parameters code def traits language implicitly classes

Sample Comments

lolinder May 8, 2021 View on HN

What Kotlin features do implicits serve to replace? I'm new to Scala and am having trouble imagining when I'd want to use an implicit, so I'm genuinely curious.

frowaway001 Dec 14, 2013 View on HN

What's wrong with implicits?

jjtheblunt Mar 30, 2019 View on HN

Scala's "implicit" keyword seems a famously contentious example of code obfuscating trickery

tutanchamun Jun 23, 2018 View on HN

What's the problem of implicit arguments in scala? I can see why implicit conversions can be a problem but aren't implicit arguments required for typeclasses and other nice features?

seertaak May 15, 2021 View on HN

I'm a programming language design geek... Out of curiosity, could you explain some of the ways you've been bitten by implicits?

acjohnson55 Mar 11, 2016 View on HN

Implicits are tricky, but they are the best way I know of to solve the problems they do. Other languages (JavaScript, Swift, etc.) have essentially open classes, where attachment of additional functionality to a type impacts a program globally. Implicits make it much easier to scope these extensions.They are also quite useful for wiring up context (take Akka's ActorSystem, for example) at the declaration level, so that the bodies of your classes and functions only explicitly talk about y

Cyph0n Apr 20, 2018 View on HN

Implicits are very powerful when used correctly, but are terrible if not.

injidup Mar 12, 2021 View on HN

It's called implicits in Scala

weego Nov 23, 2012 View on HN

Apart from it's not all accurate. Implicits have been part of Scala from the start and are used heavily throughout all the core libraries and many large projects so they will not be going anywhere... the changes in 2.10 allow you to use implicit classes on top of the current uses (and using implicit parameters is considered good practice), though they generate a compile time warning if you don't import implicitConversions.

TeeWEE Jun 19, 2013 View on HN

Implicit Conversion is indeed powerfull. But so is the goto statement. My experience with implicit conversion is: "Lets read this code, Ah i think it does X. Let's run it, wait what is happening, ow my why is this implicits here?"You could argue that you should use them with care, but i'd argue not to include them in the language. You'll go c++ all the way.Implicits are very powerfull for creating DSL's in Scala. And indeed scala is a good language for doing D