Re: Blocks with shared variable scopes?

2020-05-28 Thread sup
"It is a feature not a bug". Having to declare local variables in the scope that contains all the code that’s going to use them allows you to control what the variables are exposed to, it prevents you from writing or reading someone else’s variable, and it serves as documentation. Agus On May

Re: Proposal: Property Accessor Function Shorthand

2019-12-07 Thread sup
> > > I do find it surprising that property access isn't addressed there, > > > but it seems like it was likely just overlooked - it has no mention in > > > the repo, in the open issues, or even in the closed issues or any of > > > the open or closed pull requests. Actually, they do seem to

Re: Proposal: Property Accessor Function Shorthand

2019-11-25 Thread sup
To be clear, the `. * 2` example is an exaggeration. It’d be logical to restrict it to (Optional)MemberExpressions but my point is that I think what you’re allowed to do with it is not obvious. I think this is why Elm doesn’t support it. -- Agustín Zubiaga On Nov 25, 2019, 12:54 PM -0500,

Re: Proposal: Property Accessor Function Shorthand

2019-11-25 Thread sup
Hi Bob! I’m glad you like the proposal! > Using `.a` to denote a function to retrieve the value of the property named > `a` was actually part of an earlier proposal for a number of ways to extend > dot notation. I won't link to that proposal since it's obsolete now, but it > also allowed > >

Proposal: Property Accessor Function Shorthand

2019-11-24 Thread sup
Hi folks! I'd like to hear your feedback on a proposal idea I have and that I couldn't find anything on. Here is what I have so far. With the rising popularity of functional programming patterns in JavaScript, functions that take an object and return the value of a property are ubiquitous.