Some features should NOT include from GO/Java.

Matthew Ong ongbp at yahoo.com
Mon May 16 07:37:02 PDT 2011


Hi All,

The reason I am starting this thread is to gather some valid/experience that
people do not like about using Go or even Java. Naturally D-programming might
not wants to repeat the same error.

Java:
1) Swing API --- The inheritance tree is too deep. New OO encourages
   flatten object (1-2 level inheritance) for easy memory management from the
JVM/GC.
2) final --- does not protect the content of the LinkedList/Hashmap.
   I think immutable keywords managed that? Informed me if I am wrong.
3) Do not have keywords to allow conditional compilation like version in D.
4) Threads are rather heavy and synchronization, that is why people introduced
   kilim. Something like the fiber-thread concept.
5) No marco-preprocessor like in C #define, when the limitations of the
   syntax is met. Sometime, that allows
6) No void* to allow passing of function pointer into any method to be
   called. That can be tricked:
   by using
   interface F1<R,P>{
    R func1(P p1);
   }
7) No closure...Or lamda J.
8) No clear IPC like COM+, DCOM. Need to do networks sockets with full stack
overheads.
9) GUI inter-component messaging is complex and can only do share memory.
   I hope that is defined with D. Yes, there MVC, but how to inter-comm
   without exposing too much info, there should be a way to do in-memory JMS
   model.


GO:
1) No while/do-while/foreach... ONLY for loop.
2) Only Public/private scope... That claim is semi-true.
   It allowed to have method introduction to a library defined type. And
   allows user of that type to use the new method without knowing.
3) there is no auto promotion of data type even when it is safe.
   int does not go into long automatically. byte to int...etc (Aiks!!!)

Both,
There is no way to have a centralized Exception handling routine that
allow routing of error message & filtering for both language like in the JSP.
JSP.

Over all, those are modeling issues that I do see.

Matthew Ong
ongbp at yahoo.com


More information about the Digitalmars-d mailing list