What is the closest to ConcurrentHashMap and NavigableMap in Java?

bearophile bearophileHUGS at lycos.com
Thu Nov 14 15:05:01 PST 2013


Jacek Furmankiewicz:

> Well, these are the types of questions I have as a Java veteran
> who is having a first look at D after the recent Facebook 
> announcement.
>
> By now I have a decent idea of where most of the new languages 
> (Go has same issues, for the most part) come up short when 
> compared to Java's very mature SDK, so that is usually where I 
> start probing first.
>
> Sorry :-(

The development of the Java language, its GC, Oracle JVM, 
standard library (and its IDEs, etc) have received tons of money, 
time, and hours of work, so it's not strange Java is "better" 
than D.

On the other hand different languages are fitter for different 
purposes. I like D a lot, but programmers should choose languages 
wisely, and Java is a wiser choice for several commercial 
purposes. If you rewrite Minecraft from Java to D I suspect you 
produce a game that's faster and with a shorter source code, 
while keeping most of its programmer-friendly nature and its 
coding safety, despite the current limits of the D GC.

If you want to use D try to find niches where it could be useful 
and fit. I am using D where it's better than equivalent Java 
code. Today Python is used a lot, but in many cases it's not 
replacing equivalent Java code.

Probably you can replace some Java code with Scala code.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list