1
\$\begingroup\$

I've been thinking about creating a language where it's impossible to create a constant with a known value. Thus, it's impossible to guarantee a program will work 100% of the time (though you'd be able to achieve an arbitrarily high accuracy, at the cost of bytes).

My question is, would it be allowed to use this language? Would there be some threshold, like a requirement for it to work with at least a certain probability?

I'd imagine this would be similar to golfing languages, in that they have the advantage of being designed to complete challenges more efficiently, and thus they aren't competing with other languages.

Also, from my (very very limited) understanding, isn't the result of quantum computers the most probable answer, rather than one guaranteed to be correct? In the future there may be quantum-based languages which will need a similar consensus (assuming my understanding is correct).

\$\endgroup\$
2

1 Answer 1

3
\$\begingroup\$

First off I want to challenge the assumption in your challenge:

[...] it's impossible to create a constant with a known value. Thus, it's impossible to guarantee a program will work 100% of the time [...]

The second claim doesn't actually follow from the first. A language can have baked in unavoidable randomness and still be capable of creating fully deterministic programs. To see how we can look at lost, a language with a randomized execution order. Despite the fact that it can start anywhere in the program deterministic programming in lost is possible, and there are several answers in lost already on the site.

The limitation makes programming in lost way harder, but it is also the reason to program in lost.

If you design a programming language with such serious limitations you have to deal with the fact that it will not be able to compete in every challenge. If you want it to be able to compete then you should not limit it, or you should design it so that the limits can be overcome with ingenuity.

Additionally, there are plenty of challenges on this site that require random output, so if you do eliminate the possibility of deterministic output, you can always limit yourself to those challenges.

\$\endgroup\$
1
  • \$\begingroup\$ There is also Thue, a language where your program is a list of very simple substitution rules and the interpreter applies them randomly, and it's also somehow Turing-complete. \$\endgroup\$ Apr 13, 2020 at 3:53

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