dodona-edu / universal-judge

Universal judge for educational software testing
https://docs.dodona.be/en/tested
MIT License
9 stars 4 forks source link

Support "raw" identifiers #524

Closed niknetniko closed 3 weeks ago

niknetniko commented 3 weeks ago

Using __X__ as identifiers for those that need to be kept as is, e.g. not conventionalised is a mostly nice way of doing it.

One thing that still needs to consider is how to do constructors. Since we use the convention that a constructor needs to start with a capital, which no longer works.

One solution, e.g. new__X__, is ugly and difficult to implement. Another would be to add e.g. a new function, to allow writing constructor(__X__, *arguments).

This works cleanly, but is also not that nice.

Fixes #326.

niknetniko commented 3 weeks ago

Maybe another thing to consider here is the use-case now that we support language-specific code. For example, one use-case in the original issue is toJSON in JavaScript, but since this is fairly JavaScript-specific, would it not be enough to use the language-specific stuff?

niknetniko commented 3 weeks ago

Not currently useful, see comment in #326.