11
\$\begingroup\$

I am the main designer and implementor of GCC MELT, a Lisp-like domain specific language -which I call MELT- to customize the GCC compiler, implemented by a bootstrapped meta-plugin for GCC. GCC and GCC MELT are both GPLv3+ free software.

GCC MELT is quite big (80KLOC of MELT code) and is bootstrapped, in the sense that the MELT language is translated to C++ (suited & specific to GCC plugins) and that MELT -> C++ translator is coded in MELT (so the subversion repository also contains the 2MLOC of C++ generated code); since I am the main designer of that language (and still the main user) I have not explicited any coding rules.

Hence my question:

Can a domain specific language code be reviewed here?


Intuitively, I would sadly think that no, at least in my case (because MELT is quite obscure and has not a lot of users, and also because the code base is quite big).

However, I would imagine that some reviewers could at least give feedback like "this function is too big, you should split it" or "this name does not mean anything" (and I am not a native English speaker, so I obviously make mistakes).

This meta-question is related but not the same.

\$\endgroup\$
16
\$\begingroup\$

A question about code written in a domain-specific language is on-topic here, so there's nothing stopping you from posting it.

However, you are likely to be disappointed by the results. It's almost certain that no-one reading your question here will have any expertise in GCC-MELT, so you can't expect to get detailed feedback on your code. Moreover, the target audience for GCC-MELT is "advanced GCC users", and it's unlikely that are any such people here.

So you should think carefully about what you are trying to achieve, and whether the reviewers here can help you achieve it, and then structure your question accordingly. You should hold our hands as far as possible by picking a short, self-contained piece of code for us to review, and writing an introduction that explains the MELT features that it uses.

\$\endgroup\$
2
\$\begingroup\$

The worst thing that can happen is that you don't get an answer.

I don't share the sentiment that you wouldn't find people here that could review the "obvious" things. Even if you have a DSL, assuming you link the necessary documentation while possibly highlighting the important bits and assuming that the semantics are similar to other packages (e.g. for pattern matching and so on), then a lot of knowledge from other environments is transferable, same for more architecture-level issues.

It also gives you exposure. While perhaps less likely, someone might just see it and start contributing even though they can't help with a particular issue that you've posted here.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .