Could/should an implicit conversion from T to Option[T] be added/created in Scala?

Viewed 5006

Is this an opportunity to make things a bit more efficient (for the prorammer): I find it gets a bit tiresome having to wrap things in Some, e.g. Some(5). What about something like this:

implicit def T2OptionT( x : T) : Option[T] = if ( x == null ) None else Some(x)
6 Answers
Related