Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Language request] Please add D programmimng language #34

Closed
Teashrock opened this issue Oct 13, 2021 · 9 comments · Fixed by #79
Closed

[Language request] Please add D programmimng language #34

Teashrock opened this issue Oct 13, 2021 · 9 comments · Fixed by #79

Comments

@Teashrock
Copy link

D programming language is a low-level C++ rework with very convenient syntax, very fast compilation results, and clearly understandable code. It has the main features of C++, but they work in their own, programmer-friendly way.
One can read about it here: https://dlang.org
image

@pfusik
Copy link
Collaborator

pfusik commented Oct 13, 2021

cito used to have a D backend created by @epi. I expect that restoring it would be straightforward now that we have a testsuite.

@smokeytube
Copy link

I AGREE

@d1snin
Copy link

d1snin commented Oct 13, 2021

I think JVM languages are better then D @smokeytube

@Teashrock
Copy link
Author

@d1snin
D is a C-like language. You have just said that JVM languages are better than C-family.

@d1snin
Copy link

d1snin commented Oct 13, 2021

@Teashrock
yes

@pfusik
Copy link
Collaborator

pfusik commented Oct 13, 2021

Please stay on topic. This is a reasonable request for a new backend. We have the Java backend already.

I owe you an explanation why there's no D backend at the moment. A few years ago cito underwent a complete rewrite to address language changes and better error reporting. Every backend requires some work and I chose to postpone the D backend.

I'd be happy to accept a pull request with a well-written GenD.cs. I can offer help implementing that. If you have experience with D, you can start by looking at how the other backends are implemented.

@Teashrock
Copy link
Author

@pfusik
Ok, I can try...

@pfusik
Copy link
Collaborator

pfusik commented Oct 14, 2021

Great!

Start the implementation with:

public class GenD : GenTyped
{
}

and

case "d": gen = new GenD(); break;

in CiTo.cs.

You'll get compilation errors for abstract methods. Implement them and you'll have your first version of the backend.

Then add the test-d target in Makefile. make test-d to run the tests.

@smokeytube
Copy link

I think JVM languages are better then D @smokeytube

заткнись ты, монументальный идиот

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants