Hacker News new | ask | show | jobs
by mkramlich 5694 days ago

  circle = Circle(); // default origin, radius, color, etc.
  circle.set_visible(true)
  circle.color = RED
  circle.make_smaller()
  circle.set_radius(5)
// or whatever. just saying we can do approximately this already today, in most any modern language, as long as you're willing to express it in the prog language rather than the natural language. And I'm not sure having it expressed in a natural language is better in any significant way.
2 comments

This only works if someone has added such an interface to every object in the programming language, the user is familiar with the dot-calls-method convention (and the state-is-modified convention), etc. I think to do actual programming it's probably best to use an actual programming language, as you do want all the details under control. To do what most people do with mathematica, however, (and the way most people use mathematica is more like the way they use an interpreter than the way they write in a source file, by trying out all sorts of combinations of some little pieces while they work out the actual problem they're trying to solve in their heads) it seems like a good idea, as you're just removing friction from the system (what if circle.make_smaller() was named circle.reduce_size()? Is this responsibility better offshored to an intellisense-like technology with heavy autocompletion? But in general I don't want to be told what to type, I want what I type to work)
Yes. Now make this actually render a circle after each step. And provide pronouns (anaphora) like this, it and the radius (inferred noun in some syntax). My whole point was about a) smart objects that have prepopulated fields with default values, and b) anaphora. I don't have an opinion about the natural language at this point.

And get rid of the set_visible.