Arc Forumnew | comments | leaders | submitlogin
3 points by shader 29 days ago | link | parent

I saw that reddit thread recently, and was initially against the idea, but I could see why it might have some value. It may be more efficient, and can be more concise too.

Most of the time though I think that the additional nesting layer of a a let form helps make the code clearer, and probably simpler to parse too—it's obvious where the boundaries of the scope are. Also, I'm not sure there's a good reason to suddenly introduce new variables partway through an environment.

I could see restricting '= to only assign to declared variable names, if that would help with the typo vs global problem. Maybe introduce a separate 'declare or 'global form that can be used to explicitly introduce global variables, instead of accidentally making them. On the other hand, arc is the language of user power—adding complexity to prevent people from shooting themselves in the foot seems like a step in the wrong direction.

Pros and cons...