-
Notifications
You must be signed in to change notification settings - Fork 8
fix grammar and clarity in features and tao #75
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,16 +11,16 @@ Our primary users will all be familiar with SQL. We should make their life no ha | |
For example `name is expression`, vs `expression as name`. In SQL the naming on an expression sits as a casual afterthought "oh by the way, give this really important expression a name". In Malloy, the name of a thing is important, you are building complex things from smaller pieces. When you look at a model, you will often want to scan the file looking for names, they belong on the left hand side. | ||
|
||
|
||
However, we in general try to have the "feel" of SQL. We use `()` for structuring instead of `{}` like LookML or JavaScript do, or indentation like Python does. We use `is` and `define` instead of `:` like LookML or `=` like JavaScript. We use SQL words for things (like `join`) where it makes sense. | ||
However try to keep to the "feel" of SQL while incorporating useful syntax from other languages. We use `()` for structuring instead of `{}` (LookML/JavaScript), or whitespace/indentation (Python). When a concept or function is particular to query languages we try to fall back to use SQL words (i.e. `join`, `aggregate`) but do not introduce whitespace syntax (i.e. Malloy's `group_by` vs SQL's `GROUP BY`) | ||
|
||
|
||
The intention was always that there is some context, command line or editor, which handles a single document with mixed Malloy and SQL, either because they are one merged language, or there is some JSX-like escaping between the contexts. | ||
The intention has always been to allow mixing Malloy and SQL in order to enable incremental improvement of already existing SQL; as well as better facilitate the learning process. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I felt like the reference to JSX/etc was superfluous. The main point (as I see it) is that you should be able to incrementally improve your SQL code. |
||
|
||
### … feels concise, but not cryptic | ||
This is the most common point of disagreement as we talk about how to express things. There is no one right answer to this. We have a preference for brevity, every single feature we wrestle with trying to get the most clarity from the least language surface. | ||
This is the most common point of disagreement as we talk about how to express things. There is no one right answer to this. We have a preference for brevity but require clarity. Every single feature we wrestle with trying to get the most readability from the least language surface. | ||
|
||
### … is composable | ||
If you find a piece of code that works, you should be able to select it, paste it somewhere with a name, and use it by name. | ||
If you find a piece of code that works, you should be able to (at best) import it or (at worst) copy/paste it somewhere and use it by name. | ||
|
||
### … is an algebra for computations with relational data | ||
Malloy comprehends data as a network of relationships and so computations like aggregation have a useful and mathematical meaning. Malloy gestures should read like a mathematical formula which means one clear thing. | ||
|
@@ -29,13 +29,13 @@ Malloy comprehends data as a network of relationships and so computations like a | |
Maybe AppleScript or COBOL would be at the extreme end of this. More of a kind of math, less like a natural language. | ||
|
||
### … is curated | ||
There are not four different ways to express things depending on which programming language or style you came from. There is one, and it is carefully chosen to match the task of data transformation, discovery and presentation. | ||
There are not four equal and different ways to express something. In Malloy there should be one preferred way that has been carefully chosen to match the task of data transformation, discovery and presentation. | ||
|
||
### … is helpful | ||
Malloy tries to "do the right thing" that most people want, by default, while still allowing non default expressions to be written. The treatment of `null` and booleans, and the sorting rules for "reduce" stages would be two examples of this. | ||
Malloy tries to "do the right thing" that most people want, by default, while still allowing non default expressions to be written. The treatment of `null` and booleans, and the sorting rules for "reduce" stages are two examples of this. | ||
|
||
### … is still an experiment | ||
We had some theoretical insights that there was a better way to interact with data than SQL, and Malloy is the current snapshot of that thinking, but we are not done. We have a number of features which are not yet in the language, which we expect to have an impact on the language, and maybe even on these rules. The language is still young and needs room to grow. | ||
|
||
### … is an expression of empathy towards explorers and explainers of data | ||
The Malloy user is not someone who writes one sentence in Malloy, and then never sees the language again. Malloy is an invitation into a "way" for people who are passionate about decision making based on data, and good decision making is iterative, and ongoing. | ||
The Malloy user is not someone who writes one sentence in Malloy, and then never sees the language again. Malloy is an invitation into a "way" (or "Tao") for people who are passionate about decision making based on data; and good decision making is iterative and ongoing. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "The Tao" literally translated can mean "The way" so there is a pun here that feels like a good way to end a document titled "Tao" https://en.wikipedia.org/wiki/Tao
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what
One benefit is that the queries are always accurate
means but it is neither clear nor can it possibly be accurate 😄I wish I could have a programming language who's queries are always accurate but then most Data Scientists would probably be out of a job!