Jump to page: 1 215  
Page
Thread overview
D vs Java
Mar 18, 2006
Walter Bright
Mar 18, 2006
Hasan Aljudy
Mar 18, 2006
pragma
Mar 18, 2006
Andrew Fedoniouk
Mar 18, 2006
U.Baumanis
Mar 19, 2006
Andrew Fedoniouk
Mar 19, 2006
U.Baumanis
Mar 19, 2006
Andrew Fedoniouk
Mar 19, 2006
U.Baumanis
Mar 20, 2006
Tom
Mar 19, 2006
BLS
Mar 19, 2006
BLS
Mar 19, 2006
Jim Miller
Mar 19, 2006
Tom
Mar 19, 2006
David Medlock
Mar 19, 2006
Tom
Mar 19, 2006
U.Baumanis
Mar 19, 2006
Tom
Mar 19, 2006
Charles
Mar 19, 2006
Tom
Mar 19, 2006
Andrew Fedoniouk
Mar 19, 2006
Deewiant
Mar 21, 2006
Georg Wrede
Mar 21, 2006
Georg Wrede
Mar 21, 2006
Derek Parnell
Mar 21, 2006
Don Clugston
Mar 21, 2006
Georg Wrede
Mar 21, 2006
Dave
Re: D vs Java [OT:Gentoo]
Mar 21, 2006
Lucas Goss
Mar 21, 2006
Lucas Goss
Re: D vs Java [OT: Ubuntu]
Mar 21, 2006
Dave
Mar 21, 2006
Lucas Goss
Mar 19, 2006
Dave
Mar 19, 2006
Walter Bright
Mar 20, 2006
Tom
Mar 20, 2006
Dave
Mar 20, 2006
Walter Bright
Mar 20, 2006
Sean Kelly
Mar 20, 2006
Dave
Mar 20, 2006
Sean Kelly
Mar 20, 2006
Dave
Mar 21, 2006
Georg Wrede
Mar 21, 2006
David Medlock
Mar 19, 2006
sai
Mar 19, 2006
John Demme
Mar 19, 2006
Kyle Furlong
Mar 19, 2006
james
Mar 19, 2006
Walter Bright
Mar 20, 2006
james
Mar 20, 2006
Sean Kelly
Mar 20, 2006
Brad Anderson
Mar 21, 2006
Georg Wrede
Mar 21, 2006
Sean Kelly
Mar 21, 2006
Lucas Goss
Mar 21, 2006
james
Mar 21, 2006
Lucas Goss
Mar 21, 2006
james
Mar 22, 2006
Lucas Goss
Mar 23, 2006
Lucas Goss
Mar 23, 2006
Hasan Aljudy
Mar 23, 2006
Lucas Goss
Mar 21, 2006
Knud Sørensen
Mar 21, 2006
Georg Wrede
Mar 20, 2006
David Medlock
Mar 19, 2006
Thomas Kuehne
Mar 20, 2006
Roberto Mariottini
Mar 20, 2006
Walter Bright
Mar 21, 2006
Roberto Mariottini
Mar 21, 2006
Walter Bright
Mar 21, 2006
Sean Kelly
Mar 21, 2006
Def
Mar 22, 2006
Roberto Mariottini
Mar 22, 2006
Walter Bright
Mar 23, 2006
Georg Wrede
Mar 24, 2006
Kyle Furlong
Mar 21, 2006
Georg Wrede
Mar 21, 2006
Walter Bright
Mar 21, 2006
Hasan Aljudy
Mar 21, 2006
Georg Wrede
Mar 23, 2006
Bruno Medeiros
Mar 23, 2006
Georg Wrede
Mar 24, 2006
Sean Kelly
Mar 24, 2006
Georg Wrede
Mar 24, 2006
Sean Kelly
Mar 24, 2006
Niko Korhonen
Mar 24, 2006
Fredrik Olsson
Mar 21, 2006
Oskar Linde
Mar 21, 2006
Matthias Spycher
Mar 21, 2006
Def
Mar 22, 2006
Roald Ribe
Mar 21, 2006
kris
Mar 21, 2006
Walter Bright
Mar 21, 2006
kris
Mar 22, 2006
Kyle Furlong
Mar 22, 2006
kris
Mar 22, 2006
pragma
Mar 22, 2006
Don Clugston
Mar 22, 2006
Lars Ivar Igesund
Mar 22, 2006
pragma
Mar 22, 2006
Sean Kelly
Mar 22, 2006
pragma
Mar 23, 2006
Georg Wrede
Mar 23, 2006
David Medlock
Mar 22, 2006
Kyle Furlong
Mar 22, 2006
Dave
Mar 22, 2006
Matthias Spycher
Mar 22, 2006
Sean Kelly
Mar 22, 2006
Matthias Spycher
Mar 22, 2006
Sean Kelly
Mar 22, 2006
Dave
Mar 23, 2006
James Dunne
March 18, 2006
I'm no expert on Java programming, but I get this question a lot: "What compelling reason does D have that would entice a Java programmer to switch to D?"

I know several of you have come to D from Java, and are expert Java programmers, so you folks' reasons would be very valuable.


March 18, 2006
Walter Bright wrote:
> I'm no expert on Java programming, but I get this question a lot: "What compelling reason does D have that would entice a Java programmer to switch to D?"
> 
> I know several of you have come to D from Java, and are expert Java programmers, so you folks' reasons would be very valuable. 
> 
> 

no VM!!

If it wasn't for Java's VM, maybe I wouldn't have moved to D.

Other reasons that maybe compelling for some:
not restrictively OO (although in java you can work around it by declaring static methods & variables all over the place)


March 18, 2006
"Walter Bright" <newshound@digitalmars.com> wrote in message news:dvhohr$asa$1@digitaldaemon.com...
> I'm no expert on Java programming, but I get this question a lot: "What compelling reason does D have that would entice a Java programmer to switch to D?"
>
> I know several of you have come to D from Java, and are expert Java programmers, so you folks' reasons would be very valuable.

They are not strictly comparable to be honest.
E.g. Java programmer doing server side stuff will not switch to D.
Completely different execution models.

Such switch makes more sense for GUI Java programmers (client side):

0) D application does not require JRE (java runtime) to be installed on
client machine.
1) D allows to write Java code and at the same time to write code hidden
behind JNI - a.k.a native.
    Thus you don't need two completely different environments.
2) D is natively compileable, has structures and compile time templates (vs
runtime generics).
3) If someone will forget his/her Java background then he/she will be able
to write code which will execute
    way faster than Java code.

Andrew.





March 18, 2006
In article <dvhr8j$eg0$1@digitaldaemon.com>, Hasan Aljudy says...
>
>Walter Bright wrote:
>> I'm no expert on Java programming, but I get this question a lot: "What compelling reason does D have that would entice a Java programmer to switch to D?"
>> 
>> I know several of you have come to D from Java, and are expert Java programmers, so you folks' reasons would be very valuable.
>> 
>> 
>
>no VM!!
>
>If it wasn't for Java's VM, maybe I wouldn't have moved to D.
>
>Other reasons that maybe compelling for some:
>not restrictively OO (although in java you can work around it by
>declaring static methods & variables all over the place)
>

I'll second that.  These are the core reasons for switching from Java to D, or even .NET to D for that matter.  The rest is just icing on the cake.

On a less technical note, I have enjoyed the fact that "D is just D".  Its a nice switch from the "Sun Java(tm)" branding that has been pasted on everything Java from the very start.  When one uses Java, the branding is so overt that it makes one feel like they're using someone else's tool, rather than one of their own.  I honestly feel that its small touches like this that keep D near and dear to our hearts.

- EricAnderton at yahoo
March 18, 2006
In article <dvhtsa$hh5$1@digitaldaemon.com>, Andrew Fedoniouk says...
>
>
>"Walter Bright" <newshound@digitalmars.com> wrote in message news:dvhohr$asa$1@digitaldaemon.com...
>> I'm no expert on Java programming, but I get this question a lot: "What compelling reason does D have that would entice a Java programmer to switch to D?"
>>
>> I know several of you have come to D from Java, and are expert Java programmers, so you folks' reasons would be very valuable.
>
>They are not strictly comparable to be honest.
>E.g. Java programmer doing server side stuff will not switch to D.
>Completely different execution models.
>
>Such switch makes more sense for GUI Java programmers (client side):
>
>
>Andrew.
>

I don't agree about GUI - Java GUI (Swing) is very strong. There is no
comparable alternative in D (yet). Don't tell me about DWT. ;)

--
ub


March 19, 2006
On 3/18/06, Walter Bright <newshound@digitalmars.com> wrote:
>
> I'm no expert on Java programming, but I get this question a lot: "What
> compelling reason does D have that would entice a Java programmer to
> switch
> to D?"
>
> I know several of you have come to D from Java, and are expert Java programmers, so you folks' reasons would be very valuable.



1) Native binaries
2) Garbage collection
3) Module system

I've programmed quite a bit of Java over the past 12 years but most of my Java programming is server side, non-gui, non-web applications.  Attempting to do supervised management of Java programs as daemons is very difficult (how do I ensure my application is running?) without having to roll in the Java Management extensions which just bloats my code.


March 19, 2006
Walter Bright wrote:
> I'm no expert on Java programming, but I get this question a lot: "What compelling reason does D have that would entice a Java programmer to switch to D?"
> 
> I know several of you have come to D from Java, and are expert Java programmers, so you folks' reasons would be very valuable. 

Java
- Sucks 'cause of its horrendous slowness
- Has a VM (this is the worst disadvantage)
- Eats memory as a monster of hell (even in simple apps)
- Language itself is nice but clearly D is more than a superset of it
- The JDK is enormous _OMG_, never nice to download!
+ "Dynamic Linking" of packages with JAVA is damn easy!
+ Infrastructure is really complete (IDE and stuff)

Tom;
March 19, 2006
One and only one reason for me : speed

Sai



In article <dvhohr$asa$1@digitaldaemon.com>, Walter Bright says...
>
>I'm no expert on Java programming, but I get this question a lot: "What compelling reason does D have that would entice a Java programmer to switch to D?"
>
>I know several of you have come to D from Java, and are expert Java programmers, so you folks' reasons would be very valuable.
>
>


March 19, 2006
Walter Bright wrote:

> I'm no expert on Java programming, but I get this question a lot: "What compelling reason does D have that would entice a Java programmer to switch to D?"
> 
> I know several of you have come to D from Java, and are expert Java programmers, so you folks' reasons would be very valuable.

I converted from Java a few years ago after just having finished a large Java server and client system.

There are a lot of reasons, but since I tend to make gut decisions, it's hard to say why I prefer D. I guess it boils down to three things: the lack of a VM, it's close relationship to the metal (bare-metal) and it's flexibility.

-Java's VM sucks up memory and CPU time like nothing else.  It takes some time to start, and makes it difficult to interface Java programs with the system and each other. D has not these problems.  The initialization that D programs require is miniscule in comparison.

-D can (and does) interface with C.  Yes, yes, so can Java, but D can do it in an easy and meaningful way.  This means that it's trivial for me to do things like get an environment variable via a system call, whereas this is non-trivial in Java.

-Thanks to D being bare-metal, I can do a lot of cool stuff, like manual memory-management (only where it makes sense, of course.)  For instance, in my SAX parser, I make almost no memory allocations (and the few which I do can be avoided.)  I'm able to do cool stuff like copy a String onto the stack.  My linked list class could use a free-list of nodes and still use new to instiante them and let the GC manage them.  Hell, we've got inline assembly!  Again, my XML parser takes advantage of some text searching instructions (via calls to mango.text.Text) on x86 machines.

-DMD is super-fast.  Automatically inlining function/method calls is great-- it actually speeds up my XML parser by 25%!

-All this and I haven't even talked about the language itself yet. Flexibility.  I can program however I like.  As a Java guy, I used to think that pointers and goto statements were the devil, but now that I can use them I've found that pointers help make more than a few things easier and legible (if you understand pointers) and I've actually used the goto statement a few times in ways which I would consider legimate.

-D's templates--  OMFG!!! (to use the parlance of our times.)  The containers library I made for Mango makes extensive use of templates.  I can't imagine a containers library without them, and this is only the most basic usage of templates.  Compile time regular expressions!  Awesome! Generics? Phfff!  A child's plaything!

There are, however, several things which I prefer about Java:
-Application support.  Yes, the chicken-and-the-egg thing.  Since everybody
and their wicked step sister program in Java a lot of things are easier.
It'd be nice if emacs had better D support.  I don't consider this point a
big deal, however.  It'll come with time.

-Java's package system: Java's protection attributes are consistent and (generally) make sense. (D's are close.)  D's modules and packages are OK, but not great.  I like that Java makes you put one class per source file (to be public).  It makes it A LOT easier to find code.  That said, given that not everything in D is a class, this system probably doesn't make sense for D.  Perhaps that's another advantage to Java: compared to D it's quite simple.  Where there's one or two reasonable ways to do something in Java, there's 15 or 20 reasonable ways in D.  I both love and hate this.


All in all, I generally recommend D to people who understand C programming but like Java's abstractions.  I think it's easier to blow your foot off with D, but that's only because D is a compact fully-automatic shotgun with builtin sniper rifle, whereas Java is a tank.

I probably got a bit off topic, but I like D because it's a swiss army knife; it'll do whatever I want it to and really well.

~John Demme
March 19, 2006
> I don't agree about GUI - Java GUI (Swing) is very strong. There is no
> comparable alternative in D (yet). Don't tell me about DWT. ;)

There are no real GUI Applications using Swing either :)

So score: 1:1.

Your turn.

Andrew.



« First   ‹ Prev
1 2 3 4 5 6 7 8 9 10 11