lyxal / Keg

A stack-based esolang with condensability as well as simplicity and readability in mind.
https://www.esolangs.org/wiki/Keg
26 stars 3 forks source link

While loop feature discussion #10

Closed ghost closed 5 years ago

ghost commented 5 years ago
  1. First of all, I do not think that the unofficial ï and ; s are useful for code-golfing. Do you think so? (I will make a PR to revert these changes if that's a yes.) (I am adding the command to represent exponentation.)

  2. (Debatable) I think that the implicit while loop condition 1 is too challenging to golf for a Keg program. E.g. this highly-golfed Truth-machine:

    :[{:.

    If the condition is the top of the stack, then the program will be:

    :{:.

    However, some challenges require explicit infinite loops, and the current while loop is useful for these:

    {

    If the condition is the top of the stack, then the loop has to be:

    1{

Do you want to keep or change the while loop condition?

lyxal commented 5 years ago
  1. Keep the ï and ; command just in case they are needed.
  2. I believe that keeping 1 as the while loop condition would be best as some challenges (e.g. * interpreter) require it.