D affects others

Russel Winder via Digitalmars-d digitalmars-d at puremagic.com
Wed May 28 01:49:53 PDT 2014


Mike Hearn has started a thread on the Kotlin (*) mailing list extolling
the virtues of D's transitive const.  Andrey Breslav (the leader of the
Kotlin team at JetBrains) has made a couple of replies that I think may
be interesting here:


"As C++ and D show, const is not that easy. We'd like to have something
like it, but it's hard to implement in a useful way"

"D's approach is useful, but to make it work in Kotlin we'd need to know
what's const in JDK and what's not. We are exploring the possible ways
of knowing that, but it's not straightforward.
Also, D's approach does not support lazy evaluation, caches of all sorts
etc, that we think are crucial in application software.
 
BTW, note that const does not come alone, but together with immutable,
which we also would like to have in Kotlin, and which needs some more
careful design wrt Java libearies, memory model etc"




(*) Kotlin is a statically-typed language being created by JetBrains as
a successor to Java. http://kotlin.jetbrains.org/ (**) Scala and Ceylon
(and indeed Groovy) are other players in this game.

(**) Kotlin, like Scala and Ceylon, is full open source. One day Java
may also be, cf. OpenJDK.
-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder



More information about the Digitalmars-d mailing list