digitalmars.D - Sorry
- BLS (27/27) Oct 23 2006 ...writing a message frustated and in a bad mood never has been an good
- Ary Manzana (9/15) Oct 23 2006 D has associative arrays, which can behave like any Java Map. And it has...
- BLS (10/13) Oct 23 2006 You simply can't compare Java Arrays with D arrays. And yes :
- BLS (4/6) Oct 23 2006 I mean f.i using GNU classpath interfaces with a concrete implementation...
- John Reimer (7/12) Oct 23 2006 Bjorn,
- Alexander Panek (5/25) Oct 23 2006 Hah, oh so true.
- BLS (3/3) Oct 23 2006 ..for your warm words.
- he_the_great (19/54) Oct 25 2006 Now I am still new to programming, but I don't see the need to implement...
- Bill Baxter (12/20) Oct 25 2006 Because there's about a gazillion lines of Java code out there. Whether...
- BLS (4/36) Oct 28 2006 Hi Bill,
...writing a message frustated and in a bad mood never has been an good idea. <<D not for me anymore>> What I've said was too negative and at least not fair against all the efforts allready made. So, my apologies. Sorry! Why this frustration : Simply because I have tried to translate some Java code into D. I wasn't able to do that because even a small Java programm allmost depends on java.util /*collections (Hashmap, Hashset,Hashtable, ...) */ as well as Java array and strings. Due to the fact that phobos doesn't offer much support for these basic data structures it is, at least, very difficult to translate Java into D. (even by hand) Meanwhile (today) I have seen that Mango offers something from java.util.* (even if it is not part of the binary ditribution) *and* listening to Walter's RedBackTree query, I have some hope that mango collections will find a way into phobos. Next : I am still convinced that a semi automatic Java to D Translation is possible if we just have these java-like collections, a compatible Sting and Array??? class. Some of you may have noticed that I spend some time on a translator tool like that. What I'll publish here in the attachemenmt is a not my code. The Code-Emitter attached is based on a Java Tree Parser. But you'll agreee : The following,attached Java code can be adapted to produce valid D code. Björn To test: You need 1) ANTLR 2.7.5/6, 2) Java 1.3 respectice 1.5 grammar and tree-grammar from the ANTLR Hompage 3) The attached file.
Oct 23 2006
BLS wrote:I wasn't able to do that because even a small Java programm allmost depends on java.util /*collections (Hashmap, Hashset,Hashtable, ...) */ as well as Java array and strings. Due to the fact that phobos doesn't offer much support for these basic data structures it is, at least, very difficult to translate Java into D. (even by hand)D has associative arrays, which can behave like any Java Map. And it has dynmic arrays, so you get lists. Arrays are in d, and strings also. So what's the problem? BTW, I also think phobos should come with an extensive library of classes and functions, just like Java and .Net have (and I think this, and a "decent" IDE, is what make people use them), but not forcing the user to statically link all of it to the code. Ary
Oct 23 2006
Ary Manzana schrieb:D has associative arrays, which can behave like any Java Map. And it has dynmic arrays, so you get lists. Arrays are in d, and strings also. So what's the problem?You simply can't compare Java Arrays with D arrays. And yes : Associative arrays and dynamic arrays enables a lot but you can't build *every* advanced datastructure upon arrays. To translate Java into *D* it will also *help a lot* to use the same interfaces (of course with a D-ish implementation) Regarding Java Arrays,Strings and Collections I would like to suggest : Just ask Shawn about porting SWT to DWT. :-) Thanks for your feedback Björn
Oct 23 2006
BLS schrieb: To translate Java into *D*it will also *help a lot* to use the same interfaces (of course with a D-ish implementation)I mean f.i using GNU classpath interfaces with a concrete implementation in D.
Oct 23 2006
On Mon, 23 Oct 2006 07:53:56 -0700, BLS <nanali wanadoo.fr> wrote:...writing a message frustated and in a bad mood never has been an good idea. <<D not for me anymore>> What I've said was too negative and at least not fair against all the efforts allready made. So, my apologies. Sorry!Bjorn, Hey, no problem! After all, the thread merely ended up spawning a gigantic discussion in which most people managed to mainatin a certain amount of level-headedness. Nothing wrong with that. That's a whole lot better than some of the past discussions. :D -JJR
Oct 23 2006
Hah, oh so true. There have been quite some nice discussion lately in and after/because of that thread, so it's really a good thing actually. ;) Alex On Mon, 2006-10-23 at 08:50 -0700, John Reimer wrote:On Mon, 23 Oct 2006 07:53:56 -0700, BLS <nanali wanadoo.fr> wrote:...writing a message frustated and in a bad mood never has been an good idea. <<D not for me anymore>> What I've said was too negative and at least not fair against all the efforts allready made. So, my apologies. Sorry!Bjorn, Hey, no problem! After all, the thread merely ended up spawning a gigantic discussion in which most people managed to mainatin a certain amount of level-headedness. Nothing wrong with that. That's a whole lot better than some of the past discussions. :D -JJR
Oct 23 2006
..for your warm words. hope somebody is interested in my annex. Björn
Oct 23 2006
Now I am still new to programming, but I don't see the need to implement Java style anything. Why do we need easy translation from Java to D? D C. Not only that but Java is a bloated object only language. I also have found, other than GUI stuff, Java is very easy to translate into D. I know I haven't programed anything extremely complicated, but the basics never really change. I don't know much about what Sean has been doing with his DWT translation, but I would think the problem he is running into is the back-end (dealing with the displaying of graphics), and not what the end user sees. Since Java just has to make calls to the virtual machine it can be universal, but Sean would be working on what the virtual machine does to display the graphics. Lastly if you want to have the ability to use basic data structures as Java does, you could always create a wrapper (I think thats what you'd call it). Like I said I'm a fairly new programmer, maybe I'm missing something, but this is where I stand right now. BLS wrote:...writing a message frustated and in a bad mood never has been an good idea. <<D not for me anymore>> What I've said was too negative and at least not fair against all the efforts allready made. So, my apologies. Sorry! Why this frustration : Simply because I have tried to translate some Java code into D. I wasn't able to do that because even a small Java programm allmost depends on java.util /*collections (Hashmap, Hashset,Hashtable, ...) */ as well as Java array and strings. Due to the fact that phobos doesn't offer much support for these basic data structures it is, at least, very difficult to translate Java into D. (even by hand) Meanwhile (today) I have seen that Mango offers something from java.util.* (even if it is not part of the binary ditribution) *and* listening to Walter's RedBackTree query, I have some hope that mango collections will find a way into phobos. Next : I am still convinced that a semi automatic Java to D Translation is possible if we just have these java-like collections, a compatible Sting and Array??? class. Some of you may have noticed that I spend some time on a translator tool like that. What I'll publish here in the attachemenmt is a not my code. The Code-Emitter attached is based on a Java Tree Parser. But you'll agreee : The following,attached Java code can be adapted to produce valid D code. Björn
Oct 25 2006
he_the_great wrote:Now I am still new to programming, but I don't see the need to implement Java style anything. Why do we need easy translation from Java to D?Because there's about a gazillion lines of Java code out there. Whether you like Java or don't, Java is very very popular, and there are tons of useful libraries and applications written in it. Also, as you noted below, the syntax is pretty similar. Probably the most similar to D of any currently popular language.C.But Java was also trying to be an improvement on C/C++.Not only that but Java is a bloated object only language. I also have found, other than GUI stuff, Java is very easy to translate into D. I know I haven't programed anything extremely complicated, but the basics never really change.The only reason people are interested in automatically translating Java to D is because if such a thing existed, it would be possible to basically to increase the amount of tested, quality code accessible to D users by 100X or more, practically overnight. --bb
Oct 25 2006
Hi Bill, You got it. Nothing else to say. Thanks Björn Bill Baxter schrieb:he_the_great wrote:Now I am still new to programming, but I don't see the need to implement Java style anything. Why do we need easy translation from Java to D?Because there's about a gazillion lines of Java code out there. Whether you like Java or don't, Java is very very popular, and there are tons of useful libraries and applications written in it. Also, as you noted below, the syntax is pretty similar. Probably the most similar to D of any currently popular language.improvement on C.But Java was also trying to be an improvement on C/C++.Not only that but Java is a bloated object only language. I also have found, other than GUI stuff, Java is very easy to translate into D. I know I haven't programed anything extremely complicated, but the basics never really change.The only reason people are interested in automatically translating Java to D is because if such a thing existed, it would be possible to basically to increase the amount of tested, quality code accessible to D users by 100X or more, practically overnight. --bb
Oct 28 2006