Kartik Agaram
for
loop is not more expressive than a while
loop, because it can be rewritten with a local transform (Lisp macro). I consider it more expressive because it creates a new structure for loops that allows us to reason about updates separately from the body. Lisp macros are powerful because they allow my program to get progressively more expressive. Isn't this the normal meaning of the term? A more expressive language helps you express intent more tersely.
The paper is cool. But they need to get off my lawn and find a new term for themselves. See also https://en.wikipedia.org/wiki/Expressive_power_%28computer_science%29#Information_description
[1] https://willcrichton.net/expressiveness-benchmarkEmmanuel Oga
11/18/2020, 6:39 AMEmmanuel Oga
11/18/2020, 6:40 AMKartik Agaram
Emmanuel Oga
11/18/2020, 6:52 AMEmmanuel Oga
11/18/2020, 7:02 AMEmmanuel Oga
11/18/2020, 7:03 AMKartik Agaram
Philipp Krüger
11/18/2020, 8:44 AMPhilipp Krüger
11/18/2020, 8:45 AMKartik Agaram
while
and for
are of equal power because you can locally rewrite one into the other. The paper is really discussing power. "Local rewrites" is a finer gradation of power than the leap from context-sensitive to Turing-complete languages. But it feels like it belongs on that spectrum.wtaysom
11/19/2020, 1:22 AMPhilipp Krüger
11/19/2020, 9:44 AMIt's the other way around?Well. Yeah. I agree that they're the same power. However, I wouldn't say they're the other way around. In terms of power, I was comparingandwhile
are of equal power because you can locally rewrite one into the other.for
while
and if
before. In terms of expressiveness I was comparing while
and for
. Can you re-read my message to see whether we actually disagree or whether this was a misunderstanding?Kartik Agaram