Comparison of Factor and Joy

The following program demonstrates a feature that is present in Joy and not in Factor:

stdin fgetch [pop feof not] [putch getch] while pop pop.

The pop in the condition of the while removes the character that was read with fgetch. This is not a problem in Joy, because at the end of the condition, after the condition code has been read, the stack is restored to what it was before the condition started. Factor does not have this feature, because of performance considerations. This feature also touches the goals of the two languages: Joy wants to be high level, Factor wants to be practical.

This revision created on Thu, 27 Apr 2017 07:31:58 by Wodan58 (Initial revision)