June 01, 2005
In article <d7i7t3$299o$1@digitaldaemon.com>, Walter says...
>
>
[...]
>"Interesting" as in D programmers would want to use it to develop modern, useful GUI apps.

This is the definition of Swing :-)

Multi-platform, customizable look-and-feel, zillions of documentation,
tutorials, examples on the net, years of expertise for millions of Java
programmers (like me).
And, last but not least, easy to use.

Ciao


June 02, 2005
"Walter" <newshound@digitalmars.com> wrote in message news:d7i7t3$299o$1@digitaldaemon.com...
>
> "Andrew Fedoniouk" <news@terrainformatica.com> wrote in message news:d7h4ns$12um$1@digitaldaemon.com...
>>
>> "Walter" <newshound@digitalmars.com> wrote in message
>> > But it's not good enough these days, because people need a GUI and the interesting GUIs are not written in C.
>>
>> Probably.
>>
>> "Interesting" here means interesting for porting into D
>> or really interesting?
>
> "Interesting" as in D programmers would want to use it to develop modern, useful GUI apps.
>

Have you seen modern, useful GUI apps in Java?
Yes there is only one which comes up in mind, Eclipse.

But compare its GUI with
http://www.gexperts.com/gel.html
http://www.jcreator.com/

I am not speaking about such features as refactoring, etc. Just GUI. Speed, response time, etc.

Please don't forget that modern Java VM is
only 60%-70% slow than C++ code doing the same
task.

Java GUI solutions are theoretically clean but
practically just not working. That means bad theory
was selected. Don't think that SWT way
(use of native widgets instead of pure Java ones (Swing) )
was selected because native widgets were of better quality.
No. They were and are simply not moving.
Reason is simple: Java solutions rely on GC and fairy tale
that GC is fast.

Typical:
Rectangle getWindowRect() { return new Rectangle(1,2,3,4); }

Do you want this in D? Are you ready  to handle
memory defragmentation -> to implement copying GC
and finally to get what? Good JavaVM which is slightly
better than standard VM because it doesn't need JIT phase?
Doh!




















June 02, 2005
"John Reimer" <brk_6502@yahoo.com> wrote in message news:d7h8rn$17k4$1@digitaldaemon.com...
> Walter wrote:
>> "Roberto Mariottini" <Roberto_member@pathlink.com> wrote in message news:d7h1bt$u4g$1@digitaldaemon.com...
>>
>>>Wait, there is a free version of Swing, that is part of GNU Classpath (www.classpath.org). No Sun code used, completely rewritten from scratch,
>>
>> uses a
>>
>>>slightly modified GPL.
>>>
>>>Please consider that 99% of Java developers use Swing. SWT is used only
>>>by
>>>Eclipse and its plugins.
>>
>>
>> I don't know which is better, SWT or Swing. But D needs the best GUI we
>> can
>> get, not necessarilly the most popular one <g>.
>>
>>
>
> Swing vs SWT...
>
> Now where is that interesting piece of propoganda Kris had us reading at dsource? ;)
>
> Oh... here it is:
>
> http://www.mail-archive.com/jug-discussion@tucson-jug.org/msg00355.html
>
> Really, it was a good read.  I don't know how true it is, but it definitely gives credence to the fact that things aren't always what they appear.

Good one! Thanks John! It is close to what I knew. Some new nice facts :)
The problem was that goal to beat VS IDE was not reached.
VisualJ was simply better. It is native. And only now when
we can see VS (Whitbey) made in .NET they (VS and Eclipse) are pretty close
:)

Andrew.









June 02, 2005
Just thinking about it, I'm not sure that inner classes really add anything to the power of a language.

The essence of an inner class is that it implicitly contains a pointer to an object of the outer class.  But you could just as well define a static nested class that explicitly contains such a pointer.

So really, it seems that inner classes are just syntactic sugar.  Or am I missing something?  Is the feature really worth the weight of implementation?

Stewart.

-- 
My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
June 02, 2005
Walter wrote:

> So, the result is that Kris has convinced me to support inner classes in D.
> This is a heads up that such change is coming. It shouldn't affect any
> existing code, unless that code uses nested classes. To prepare for the
> future, declare these nested classes as "static class ...", and they'll
> continue to work in the future as they do currently. I don't have a schedule
> for this change yet, as it is not a simple "drop in" into the compiler. A
> fair amount of engineering needs to be done.

Great! I also tried to write a Java -> D converter, and it was a real pain to rewrite all Java inners to normal classes.

Will you also support anonymous inner classes, or just named ones? The anonymous type is perhaps even more important, as far as porting Java code is concerned..

If I can help in some way, let me know; I'd love to see this done ASAP.


xs0
June 02, 2005
"Andrew Fedoniouk" <news@terrainformatica.com> wrote in message news:d7m22s$5dt$1@digitaldaemon.com...
> Typical:
> Rectangle getWindowRect() { return new Rectangle(1,2,3,4); }
>
> Do you want this in D? Are you ready  to handle
> memory defragmentation -> to implement copying GC
> and finally to get what?

But D has support for structs, which are lightweight aggregates and avoid the mentioned 'typical' problems.


June 02, 2005
"Stewart Gordon" <smjg_1998@yahoo.com> wrote in message news:d7mlba$lgk$1@digitaldaemon.com...
> So really, it seems that inner classes are just syntactic sugar.  Or am I missing something?  Is the feature really worth the weight of implementation?

You're right, inner classes are nothing more than syntactic sugar. If it'll open the door to getting a lot of needed existing code translated into D, then it's worth it.


June 02, 2005
"xs0" <xs0@xs0.com> wrote in message news:d7mqah$qtr$1@digitaldaemon.com...
> Will you also support anonymous inner classes, or just named ones? The anonymous type is perhaps even more important, as far as porting Java code is concerned..

I agree that the anonymous inner classes need to be done if doing inner classes at all.

> If I can help in some way, let me know; I'd love to see this done ASAP.

Improving your Java->D converter will pay big dividends. I know Kris is working on one, too. Perhaps you two can help each other?


June 02, 2005
> So, the result is that Kris has convinced me to support inner classes in D.

Will a class defined in a function be inner to that function and have access to its variables, kind of like a delegate?


void foo()
{
   int foovar;

   class InnerFoo
   {
      void stuff()
      {
         foovar = 4; // Allowed?
      }
   }
}
June 03, 2005
>Just thinking about it, I'm not sure that inner classes really add anything to the power of a language.
>
>The essence of an inner class is that it implicitly contains a pointer to an object of the outer class.  But you could just as well define a static nested class that explicitly contains such a pointer.
>
>So really, it seems that inner classes are just syntactic sugar.  Or am I missing something?  Is the feature really worth the weight of implementation?

It is syntactic suggar, but syntactic suggar is important for a language.