
Ask HN: Why don't people talk about programming by example? - miguelrochefort
I&#x27;ve been searching for the future of programming for a while, and just recently discovered &quot;programming by example&quot;. Basically, you specify your program by giving examples of inputs and outputs, and the reasoning engine does the rest. It&#x27;s already implemented in Excel as a feature called &quot;Flash Fill&quot;.<p>Why are people still debating syntax when programming by example is clearly the future? Why don&#x27;t more people talk about this?
======
otras
> Why are people still debating syntax when programming by example is clearly
> the future?

In your opinion, why is it clearly the future?

From the abstract of a paper about this topic [0]: " _Programming by Examples
(PBE) has the potential to revolutionize enduser programming by enabling end
users, most of whom are non-programmers, to create scripts for automating
repetitive tasks._ "

Most of the professional programming I've done has been solving (relatively)
unique problems, not automating repetitive tasks. While automating repetitive
tasks is a great use-case for programming, I don't think that's enough to call
it the future of all programming.

[0]: [https://www.microsoft.com/en-us/research/wp-
content/uploads/...](https://www.microsoft.com/en-us/research/wp-
content/uploads/2016/12/pbe16.pdf)

------
rococode
I hadn't heard of it before so forgive me if I get something wrong. Two main
thoughts:

1\. It sounds like, to implement a robust program (and not just a pattern in
Excel), you'd need to provide every different combination of input/output.
This is just not feasible for any remotely large project. For example, if you
need the program to handle an obscure error in a specific way, then you'd have
to provide the series of inputs that causes the error.

2\. If programming by example is characterized by giving inputs and outputs,
then isn't it basically just supervised machine learning? In which case, we're
still many years away from not needing to write the actual ML code ourselves
in a standard programming language.

------
eesmith
I think it would be rather hard to have such a system implement something like
a sequence alignment algorithm, much less an NP hard problem like subgraph
isomorphism, much less a humanly complex problem like tax filing software.

------
sgillen
You’re basically describing function or program approximation. This is the
central problem that machine learning is trying to solve. A lot of people are
talking about this.

------
thepapanoob
another huge thing is it will be really hard to get optimized algorithms

