Explicit or Implicit ?

2
Josh Suereth @jsuereth

@djspiewak @hseeberger if it's an 'opt-in' implicit impedance mismatch fixer, I think it's fine. "asScala" for explicit is great too

2011-09-01 05:42:40
Daniel Spiewak @djspiewak

@jsuereth @hseeberger :-) I guess so. I simply have yet to see even one case where Jorge's laws didn't unerringly predict the best design.

2011-09-01 05:42:55
Josh Suereth @jsuereth

@djspiewak @hseeberger I guess I consider sub-type polymorphism a big implicit :)

2011-09-01 05:44:07
Jorge Ortiz @JorgeO

@jsuereth For type conversions, explicit is better than implicit. Just because you CAN make an implicit conversion, doesn't mean you SHOULD.

2011-09-01 05:44:09
Daniel Spiewak @djspiewak

@jsuereth @hseeberger Exactly! Therefore, the rules you use to decide when to subtype should also govern when you convert.

2011-09-01 05:44:31
Heiko Seeberger @hseeberger

@jorgeortiz85 OK, I see that boxing is a great plus. Did you try to contribute to JavaConverters?

2011-09-01 05:47:15
Daniel Spiewak @djspiewak

@hseeberger I believe JavaConverters was forked off of an earlier version of scalaj. /cc @jorgeortiz85

2011-09-01 05:47:55
Jorge Ortiz @JorgeO

@hseeberger The Scala team has an atrocious track record when it comes to outside contributions.

2011-09-01 05:49:36
Josh Suereth @jsuereth

@jorgeortiz85 @hseeberger We're trying to fix that. Maybe it's time to revisit this one.

2011-09-01 05:52:52
Josh Suereth @jsuereth

@jorgeortiz85 In any case, for my full opinion, read Scala In Depth (not that you need to) :) Just doesn't fit in 144 chars

2011-09-01 05:53:30
Daniel Spiewak @djspiewak

@hseeberger 1. You may convert if you are pimping a member onto an existing type. You must convert to a new type unrelated to anything else.

2011-09-01 06:07:51
brendan mcadams 🫥 @rit

@jsuereth @jorgeortiz85 @hseeberger one other note. JavaConversioms debuted in 2.8.1. scalaj is a best bet for maintaining support for 2.8.0

2011-09-01 06:07:56
Daniel Spiewak @djspiewak

@hseeberger 2. You may convert to "fix" a class hierarchy. If A *should* have extended B, then you may define an implicit A => B.

2011-09-01 06:08:00
brendan mcadams 🫥 @rit

@djspiewak @hseeberger we really should get mock stone slabs with these and have @jorgeortiz85 hand them out (from on high) at conferences.

2011-09-01 06:09:25
Daniel Spiewak @djspiewak

@pk11 @hseeberger Actually, @jorgeortiz85 never posted his laws on scalatips. I can't for the life of me remember where I heard them first.

2011-09-01 06:09:27
Daniel Spiewak @djspiewak

@rit @hseeberger @jorgeortiz85 Seriously! Jorge, would you mind growing a long beard and wearing a priestly robe?

2011-09-01 06:10:20
Jorge Ortiz @JorgeO

@djspiewak The Laws are just a better reformulation of http://t.co/pk47f5E. Probably lost in the annals of Twitter somewhere.

2011-09-01 06:10:22
Daniel Spiewak @djspiewak

@jorgeortiz85 Watch and it all turns out to be something I made up… :-)

2011-09-01 06:10:41
Jorge Ortiz @JorgeO

@jsuereth As good a reason as any to buy your MEAP. Any particular chapter/section I should look at?

2011-09-01 06:11:12
Heiko Seeberger @hseeberger

@jorgeortiz85 Thinking about switching to grave mode and reciting these laws tomorrow during my Advanced Scala training course.

2011-09-01 06:17:42