Could new keyword help function hijacking and prevented aliasing all over the place??

Matthew Ong ongbp at yahoo.com
Fri May 27 07:38:24 PDT 2011


On 5/27/2011 9:37 PM, Jacob Carlborg wrote:
> On 2011-05-27 13:42, Matthew Ong wrote:
>> On 5/27/2011 7:08 PM, Steven Schveighoffer wrote:
>Maybe you are not doing something correctly, you shouldn't need this
feature all the time.
Not me, others that has coded the dwt and I suspect other code in
dsource where they tries to mimic Java Library and perhaps C# also.
>
> DWT is a direct port of the Java library SWT and it tries to stay as
> close to the original code base as possible to easy merges of future
> release of SWT.
No problem.I have not worked too much with SWT but people from 
development world told me they really do not like Swing. Yes. I agree
because of the heavy/deep tree inheritance/too much manual 
copy/paste/undo sort handling. Different topic.

 >DWT is manually ported from Java. A automatic port was tried and it 
 >didn't workout that well, too much of the Java standard library needed 
 >to be reimplemented in D.
Yes. I notice that and notice that the language converter does
not work that well because of the semantics of differences in the 
languages. Not impossible, but too heavy. Unless something like 
JRuby(JVM) and also IronRuby(.NET) is done and made use of the existing 
script engine extensions with existing API libray.

> When coding my own projects (projects I've written from scratch and not
> ported from other languages) it's a feature I rarely use, don't know if
> I ever have used it.
Actually from scratch is NOT a good approach and migration approach. How 
do you
justify this to business management people or to your client? There are 
also your
learning cycle time.

Using Java well know Model-View-Controller as a simple model as a 
discussion. See:
http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller

Model= Business Data/IO/Persistance storage
Controller= Business Logic and where transaction code are done.
View= GUI/Web/Webservices(I am aware webservice is not a view)/Console.
Interconnection =  how all the MVC are interacting with each other. 
Those arrow in the diagram top right.

Model and Controller typically are similar if not identical across 
different languages and platform. Most people would just do as much 
POJO(Plain Old Java Object) as possible here.

However when it comes to the View and Interconnection...Those typically 
changed when moving into different platform. Unless there is someone 
that port them. Nothing much can be done here.

 >it's a feature I rarely use, don't know if I ever have used it.
Because of many years of object-relational database management system 
(ORDBMS). Most Database table even the flat one like Mysql are design 
with this concept in mind. Hence, the Model and Controller will have
plenty of inheritance tree and mutually dependent code. That would mean
alias would be used.

If porting SWT has already such syntax and scatted aliases, that would 
be the burden that coder would have to take on, may I stress, could have 
been taken over my compiler with new sets of keyword.


-- 
Matthew Ong
email: ongbp at yahoo.com



More information about the Digitalmars-d mailing list