turingatemyhams...@gmail.com> wrote:+1 -- I suspect getting there from here is difficult in practice (due to
> I think everyone can agree that nulls are from the devil and null pointer
> exceptions are his spawn. However, doing anything about it is complicated
> by Java interop and legacy. If I had the choice, I'd make every type T be
> disjoint from null except for `Nullable[T]`. It would be a compilation
> error to assign null to anything except Nullable[T], and un-annotated code
> from outside scala would be presumed to be Nullable types.
scads of existing code), but this makes oodles of sense in principle. If
the only real reason Scala supports null is interop (and I think that's
true of good idiomatic Scala), it should be treated as such and made
explicit. And changing the *default* behaviour from with-null to
without-null would lead folks to better and safer code pretty efficiently.
Programmers are lazy, so we really should avoid having an easy, lazy path
to using nulls.
I'm rather conscious of this at the moment. I'm finally doing Scala
Has anybody written a compiler plugin to do this? Adding a plugin, then a
Sie müssen sich anmelden, bevor Sie Nachrichten veröffentlichen können.
Bevor Sie eine Nachricht posten können, müssen Sie zunächst dieser Gruppe beitreten.
Bitte aktualisieren Sie vor dem Posten in den Abonnementeinstellungen Ihren Spitznamen.
Sie haben nicht die erforderliche Berechtigung zum Posten.