[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: (not) handling new programming idioms with grace
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 18 Jul 2018 11:20:38 -0300
> I think it's a fair argument. Users will forget to put the proper
> qualifier on the variable, which will result in subtly wrong runtime
> behavior. It reminds me of the async/await implementation in Python.
> Apparently if you forget to qualify your async function call with the await
> keyword, Python will just happily do nothing (since async functions simply
> return a coroutine).
>
> In my old post, I actually argue for "with .. as" over a new type of
> local. That control structure seems well-proven at this point, there are
> so many use cases. I don't know if there's some collective ego here about
> "doing something like Python", but it would be a shame to not consider it
> seriously.
I did not get your point here. Why a user that would forget to properly
qualify its 'local' would not forget to use 'with'? What are the
differences between 'local scoped' vs 'with' except the syntax?
-- Roberto