Comment

Comment by noelwelsh

I disagree. You make two claims: familiarity, and beginner friendliness.

For the first, I think it's a mistake to perpetuate the mistakes of the past. I don't think JS developers have had problems adjusting to the lack of return in arrow functions.

Beginners have no preconceived notions of how a programming language should operate, and return makes the language model more complex.

1 + 1 evaluates to 2, but (in a language that requires return)

def foo = 1 + 1

foo

doesn't for no good reason. This breaks the simple substitution model of evaluation.

These claims could be addressed emperically, but I guess neither of us are going to do the research. :-)

parent noelwelsh 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton