synchronized (this[.classinfo]) in druntime and phobos
Dmitry Olshansky
dmitry.olsh at gmail.com
Wed May 30 03:21:09 PDT 2012
On 30.05.2012 13:28, Jacob Carlborg wrote:
> On 2012-05-30 00:06, Dmitry Olshansky wrote:
>
>> *I like the one in Smalltalk or Obj-C. Also I think exposing type-tag as
>> ordinal (index inside one global master v-table) instead of pointless
>> _hidden_ v-table pointer could be interesting in certain designs.
>> Another idea is to try tackling multi-methods via some form of
>> compressed 2-stage v-table. (my recent work on generalized tries in D
>> sparked some ideas)
>
> I like that classes are first class citizens in Objective-C and Ruby.
> Class methods instead of static methods. Easily extendable from outside
> the class. But I still like to have the "class" and "interface" keywords.
>
Yup. Even Java has Class as object. If D copied most of OOP from Java it
seems strange that it was replaced by halfhearted factory method in
object.di
kind of saying "you have RTTI but it's crippled just in case if it is of
no use".
Still I'd think it's reasonable course to enact slow but steady
evolution of existing OOP design, changing synchronized/monitors seems
as good start as any.
> Would this solve the problem with const:
>
> https://github.com/D-Programming-Language/dmd/pull/3
>
I know, and hoped it would happen sooner. But at least it's possible.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list