salesforce/runway-compiler

Remove the keyword "distribution" (for now)

joelburget opened this issue · 3 comments

Is there a semantic difference? There's just a mention that distribution is a reserved word in the language guide.

Hey @joelburget, there's not a distinction right now.

Long term, I was thinking distribution could be used to represent non-uniform random numbers, where the distinction would be that distribution is a default, and the user could plug something else in its place. For example, let's say we used a distribution to represent how many bananas you get back from the store in the too many bananas model, defaulting to the current uniform random 0..8. The UI could present a draggable PDF/CDF graph to the user, and they could reshape the distribution that way.

But short term, none of this exists, and distribution is just an alias for function.

I see how it's presently confusing; sorry about that. To address the issue, should we just remove distribution entirely for now?

  • Rename distribution.js to function.js for now.
  • Remove all mentions of distribution, even from the reserved words list.

I see how that makes for powerful tooling -- it's a cool idea. I guess my question is how core is that to the language? If it's soon going to be added and used then by all means keep it in, but my impression is that it's a little further off, in which case the easiest route is probably to remove it for now?

Yep, I think we're in agreement to remove it for now.