Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dot notation / Support all Mavo functions as methods #1009

Open
LeaVerou opened this issue Jan 7, 2024 · 1 comment
Open

Dot notation / Support all Mavo functions as methods #1009

LeaVerou opened this issue Jan 7, 2024 · 1 comment
Labels
enhancement Status: 3. Architecting We’ve designed this. Now how do we implement it? Topic: Formulas

Comments

@LeaVerou
Copy link
Member

LeaVerou commented Jan 7, 2024

Early on in Mavo, we made the decision not to have methods, as we worried that dot notation may be too difficult for novices, whereas functions were already proven to be understood via spreadsheets.
However, nested functions come with a lot of usability issues. The higher the nesting, the more novices struggle to balance parentheses or grok the expression tree.

An interesting design decision in Coda is that they support both, so users can use whichever syntax they’re comfortable with. They call it "dot operator": https://coda.io/resources/courses/formulas-101/tip-dot-operator

I quite like this, and I think it would be fairly easy to implement once vastly is integrated. The methods don't need to actually be available on the objects, we'd just rewrite methods to function calls if the name matches one of the functions in Mavo.Functions. @adamjanicki2 please keep track of this use case. Can we decompose any of it into more general primitives that would make sense to implement in vastly?

@adamjanicki2
Copy link
Collaborator

Will keep an eye out for this and start thinking about what could have a place in vastly

@LeaVerou LeaVerou changed the title Support all Mavo functions as methods Dot notation / Support all Mavo functions as methods Jan 12, 2024
@LeaVerou LeaVerou added Status: 3. Architecting We’ve designed this. Now how do we implement it? Topic: Formulas labels Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Status: 3. Architecting We’ve designed this. Now how do we implement it? Topic: Formulas
Projects
None yet
Development

No branches or pull requests

2 participants