On 2017-07-12 18:22, Dejan Lekic wrote:

I thought the guy who originally worked on DWT actually wrote a Java-to-D translator??

It depends on what you mean with "originally". There's an old port of SWT 3.0.2 that was for Windows only. This port was not entirely API compatible, IIRC. Then a new port of SWT 3.4.x was created by Frank Beniot [1] that supports both Windows and Linux. The ported source code tries to be as close to the original Java code as possible. This has been updated to D2 and it's the port I'm currently maintaining [2].

He also wrote a tool called Tioport to automatically port Java code to D. It's based one some form of XML documents IIRC. This was eventually stalled because he was not satisfied with the result [3].

The tool I'm working on now, JPort [4], is written in Scala and uses the Eclipse JDT compiler library. The aim is not, at least not first, to be able to port arbitrary Java projects to D. The main focus is to have SWT automatically ported. Then hopefully JDT itself, so the tool can be rewritten in D. I might add specific logic for SWT if that's needed. I think I have a much bigger chance to get this working by using a proper compiler.

[1] http://dsource.org/projects/dwt
[2] https://github.com/d-widget-toolkit
[3] http://dsource.org/projects/tioport/wiki/project_stalled
[4] https://github.com/d-widget-toolkit/jport/tree/dev

/Jacob Carlborg

Reply via email to