This question already has an answer here:

Consider a simple code where the coder imports an external library/module to solve a particular problem. In most cases it will be a built-in library, no problem. But what if someone creates his/her own library to solve the problem. Like

import x

In this way the problem will be solved in 13 characters. Which is unfair. Now you may ask the coder to add the library x to the code too. But what if coder says he/she has created that language, and in that language, all you need to do is f() to solve that problem. Now since golfing allows all the languages, the coder has the right to use his/her own language, which has a built in function f(). How would you tackle this?


marked as duplicate by Mego, Paul Schmitz, SuperJedi224, Martin Ender Oct 3 '16 at 12:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • \$\begingroup\$ Related to meta.codegolf.stackexchange.com/questions/435/… . I think that the "written before the problem was posed" condition has some applicability to this as question as well. If you wrote the library to solve the problem that that code should count. \$\endgroup\$ – dmckee Mar 31 '13 at 17:38

What you're describing is called the HQ9+ problem. :-)

In the specific case of dealing with HQ9+, you simply avoid making code golfs for Hello World, quines, and 99 Bottles of Beer. :-)

In general, I think it's given that you should only use general-purpose languages designed before the creation of the given problem. And in a related case, for my Stack Overflow code golf, a contestant created his own language for the task, but still manages to get beaten by a Befunge entry. Go figure. :-)


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