Decision on container design

bearophile bearophileHUGS at lycos.com
Fri Jan 28 16:51:07 PST 2011


Andrei:

> 1. Containers will be classes.

This page:
http://www.jroller.com/scolebourne/entry/the_next_big_jvm_language1

A quotation:

>3) Everything is a monitor. In Java and the JVM, every object is a monitor, meaning that you can synchronize on any object. This is incredibly wasteful at the JVM level. Senior JVM guys have indicated large percentage improvements in JVM space and performance if we removed the requirement that every object can be synchronized on. (Instead, you would have specific classes like Java 5 Lock)<

I have read similar comments in various other places.

What about creating a @nomonitor annotation, for D2 classes to not create a monitor for specific classes annotated with it? This may reduce some class overhead.

Bye,
bearophile


More information about the Digitalmars-d mailing list