3 ms·
This is actually a very different piece of code. puts and gets are string functions. read and print are code deserializers and serializers. eval is a function
by reikonomusha 8y ago
This is actually a very different piece of code.
puts and gets are string functions. read and print are code deserializers and serializers.
eval is a function that takes a data structure representing code (as deserialized by read) and computes its value as a data structure, and serializes it.
While you might get the same effect as a user, the mechanics and metacircularity are lost.