Re:Gosu – A pragmatic language for the JVM
by gclaramunt on Thursday July 24, 2014 @03:30PM
(#8081622)
For the record, the only performance problem that Scala implicits give is just extra compile time, but there's no runtime overhead of using it. (as compared to explicitly call the function)
[ Parent
| on HN ]
Re:Gosu – A pragmatic language for the JVM
by kasey_junk on Thursday July 24, 2014 @04:10PM
(#8081880)
It depends on what you mean by implicits. If you are talking about implicit parameters then yes you are right. If on the other hand you are talking about implicit conversions, depending on their implementation they can impact performance by generating garbage etc.
I think that's a problem with the conversion itself, not the implicits. How can an implicit generate garbage that could be avoided by explicitly calling the conversion?
Re:Gosu – A pragmatic language for the JVM
by kasey_junk on Thursday July 24, 2014 @04:55PM
(#8082141)
No, you are right. But I've encountered people that did not understand this. Implicit classes make it when less obvious especially as they were introduced at the same time as value classes.