digitalmars.D.learn - Translating Java into D
- NonNull (3/3) Nov 14 2019 Greetings, Java seems to be almost a subset of D in various ways.
- Heromyth (9/13) Nov 14 2019 No, it's not exactly right. Java is more powerful than D as for a
- Andre Pany (8/21) Nov 15 2019 With the compile time reflection capabilities of D you can build
- Heromyth (10/35) Nov 15 2019 Yes, you can do everything with D in theory. The fact is that
- GreatSam4sure (9/22) Nov 15 2019 ?
- Jacob Carlborg (5/9) Nov 16 2019 There's DWT [1], which is a port of the Eclipse SWT Java library.
- Alexandru Ermicioi (12/25) Nov 16 2019 Regarding template member override. Generics in java are mainly
- DanielG (2/2) Nov 15 2019 Potentially relevant old thread:
- Jacob Carlborg (7/9) Nov 16 2019 Yes, I'm working on a tool, JPort [1], for automatically translating
Greetings, Java seems to be almost a subset of D in various ways. Has there been any work done to automatically translate Java source into D?
Nov 14 2019
On Thursday, 14 November 2019 at 19:50:22 UTC, NonNull wrote:Greetings, Java seems to be almost a subset of D in various ways.No, it's not exactly right. Java is more powerful than D as for a language. Many things that Java can do can't be done by D. For example, reflection, full meta info for a type in runtime, type deduction for a template, template member override. See: https://stackoverflow.com/questions/4829631/unusual-generic-syntax-arrays-stringaslist https://www.baeldung.com/java-executor-service-tutorialHas there been any work done to automatically translate Java source into D?We ported some projects in Java by hand.
Nov 14 2019
On Friday, 15 November 2019 at 03:29:16 UTC, Heromyth wrote:On Thursday, 14 November 2019 at 19:50:22 UTC, NonNull wrote:With the compile time reflection capabilities of D you can build a runtime reflection system. Therefore I would say D has reflection. The other points I do not have enough knowledge what Java provides. Kind regards AndreGreetings, Java seems to be almost a subset of D in various ways.No, it's not exactly right. Java is more powerful than D as for a language. Many things that Java can do can't be done by D. For example, reflection, full meta info for a type in runtime, type deduction for a template, template member override. See: https://stackoverflow.com/questions/4829631/unusual-generic-syntax-arrays-stringaslist https://www.baeldung.com/java-executor-service-tutorialHas there been any work done to automatically translate Java source into D?We ported some projects in Java by hand.
Nov 15 2019
On Friday, 15 November 2019 at 13:15:29 UTC, Andre Pany wrote:On Friday, 15 November 2019 at 03:29:16 UTC, Heromyth wrote:Yes, you can do everything with D in theory. The fact is that there are many stuff waiting for you to implement them when you are porting a project from Java to D, like the different or missing APIs, language features etc. See what we got from the portings: Containers: https://github.com/huntlabs/hunt/tree/master/source/hunt/collection Threading: https://github.com/huntlabs/hunt/tree/master/source/hunt/concurrencyOn Thursday, 14 November 2019 at 19:50:22 UTC, NonNull wrote:With the compile time reflection capabilities of D you can build a runtime reflection system. Therefore I would say D has reflection. The other points I do not have enough knowledge what Java provides. Kind regards AndreGreetings, Java seems to be almost a subset of D in various ways.No, it's not exactly right. Java is more powerful than D as for a language. Many things that Java can do can't be done by D. For example, reflection, full meta info for a type in runtime, type deduction for a template, template member override. See: https://stackoverflow.com/questions/4829631/unusual-generic-syntax-arrays-stringaslist https://www.baeldung.com/java-executor-service-tutorialHas there been any work done to automatically translate Java source into D?We ported some projects in Java by hand.
Nov 15 2019
On Friday, 15 November 2019 at 03:29:16 UTC, Heromyth wrote:On Thursday, 14 November 2019 at 19:50:22 UTC, NonNull wrote:? I really sure of this? Can this be true ? Pls I need more clarity on this by professional in this group. I am of the opinion that D is much more powerful than Java since I am familiar with the language to some extent. I am even to start a GUI app in java due to the fact I have no find a GUI toolkit in D that meet all my need. I will appreciate detail analysis of this claimGreetings, Java seems to be almost a subset of D in various ways.No, it's not exactly right. Java is more powerful than D as for a language. Many things that Java can do can't be done by D. For example, reflection, full meta info for a type in runtime, type deduction for a template, template member override. See: https://stackoverflow.com/questions/4829631/unusual-generic-syntax-arrays-stringaslist https://www.baeldung.com/java-executor-service-tutorialHas there been any work done to automatically translate Java source into D?We ported some projects in Java by hand.
Nov 15 2019
On 2019-11-16 08:13, GreatSam4sure wrote:I am of the opinion that D is much more powerful than Java since I am familiar with the language to some extent. I am even to start a GUI app in java due to the fact I have no find a GUI toolkit in D that meet all my need.There's DWT [1], which is a port of the Eclipse SWT Java library. [1] https://github.com/d-widget-toolkit/dwt -- /Jacob Carlborg
Nov 16 2019
On Friday, 15 November 2019 at 03:29:16 UTC, Heromyth wrote:On Thursday, 14 November 2019 at 19:50:22 UTC, NonNull wrote:Regarding template member override. Generics in java are mainly compile time thing that boils down to auto generated casts when working with generic types (in bytecode), and therefore a templated method in java is actually a standard method that just works with Object class under the hood, hence it is possible to override in implementor of interface/class. It can be done in D too you'll just need to strip out generics part in method declaration and just use casts from root Object for worst case. Also what do you mean by "type deduction for a template"? Best regards, Alexandru.Greetings, Java seems to be almost a subset of D in various ways.No, it's not exactly right. Java is more powerful than D as for a language. Many things that Java can do can't be done by D. For example, reflection, full meta info for a type in runtime, type deduction for a template, template member override. See: https://stackoverflow.com/questions/4829631/unusual-generic-syntax-arrays-stringaslist https://www.baeldung.com/java-executor-service-tutorialHas there been any work done to automatically translate Java source into D?We ported some projects in Java by hand.
Nov 16 2019
Potentially relevant old thread: https://forum.dlang.org/thread/ssdcoqhylmskfytfiian forum.dlang.org
Nov 15 2019
On 2019-11-14 20:50, NonNull wrote:Greetings, Java seems to be almost a subset of D in various ways. Has there been any work done to automatically translate Java source into D?Yes, I'm working on a tool, JPort [1], for automatically translating Java to D. It's not done yet and there's been a couple of years now since I last worked on the project. [1] https://github.com/d-widget-toolkit/jport/tree/dev -- /Jacob Carlborg
Nov 16 2019