News for hackers. Stuff that matters.
Re:Automatic programming: write code that writes code by gouranga on Saturday May 12, 2012 @05:03PM (#3965103)
I'm a firm believer that if you write code that writes code, you are using inadequate tooling.

The primary concern of a problem should always be possible to solve without metaprogramming.

Metaprogramming is one of those things which sounds good but rapidly increases complexity beyond what is humanly manageable (even if you do it right i.e. LISP macros etc).

Building successive abstractions is the right way of doing things. I think even SICP tries to nail that into people's heads

Re:Automatic programming: write code that writes code by jwilliams on Saturday May 12, 2012 @07:12PM (#3965482)
You can build successive abstractions using meta-programming.

All you're talking about is taking your abstraction and calling it a "tool".

Re:Automatic programming: write code that writes code by gouranga on Sunday May 13, 2012 @06:59AM (#3966677)
You can but you introduce a "forward-only" semantic translation prior to compilation which changes the meaning of the code irreversably.

A basic abstraction remains untouched in the underlying implementation. It's just a call away.

There are semantic and technical differences between abstraction and meta-programming.

Re:Automatic programming: write code that writes code by derrida on Saturday May 12, 2012 @05:56PM (#3965278)
Most lisp hackers would use Macros (code that writes code) because it is easier. How could this be using 'inadequate tooling'?
Re:Automatic programming: write code that writes code by gouranga on Sunday May 13, 2012 @07:07AM (#3966685)
Easier doesn't imply correctness, ease of maintenance and preservation of semantics.

Macros are the least desirable "quality" of various LISPs if you ask me.

A suitable abstraction can always be built cleanly and efficiently without relying on the macro system.

Re:Automatic programming: write code that writes code by swannodette on Saturday May 12, 2012 @07:39PM (#3965537)
I guess you haven't been following Alan Kay's latest research very closely - http://www.vpri.org/pdf/tr2011004_steps11.pdf

We are so very far away from understanding the best approaches for writing software that solves problems.

Re:Automatic programming: write code that writes code by anamax on Sunday May 13, 2012 @10:16AM (#3967046)
> I'm a firm believer that if you write code that writes code, you are using inadequate tooling.

> Building successive abstractions is the right way of doing things.

You seem to think that "code that writes code" only addresses problems that are solvable by building successive abstractions.

Most "code that writes code" that I've seen had nothing to do with implementing abstractions. Most were implementing code based on data, database-driven-code generation if you will.

Re:Automatic programming: write code that writes code by ams6110 on Saturday May 12, 2012 @09:13PM (#3965696)
Ever use a compiler?
Re:Automatic programming: write code that writes code by gouranga on Sunday May 13, 2012 @06:59AM (#3966678)
A compiler is a translator, not a meta-programming system.
Re:Automatic programming: write code that writes code by webnrrd2k on Tuesday May 15, 2012 @12:39AM (#3974922)
When it comes down to it, isn't "translating" and "meta-programming" the same thing? It's an honest question -- how do you make the distinction?

To add some context, I'm in the "interpreters all the way down" camp. On other words, it seems to me that hardware vs software is an arbitrary distinction. After all, someone had to decide how the hardware would respond to code, in other words, someone had to physically program the hardware to behave a certain way. In that sense, isn't the code we write (in lisp, C, C++, etc...) just a way to meta-program the hardware?

I'm not sure if that was very clear... Another way of saying it is that simply declaring "software should never modify software" or "software should never be treated as data" is an arbitrary and almost meaningless declaration.

Re:Automatic programming: write code that writes code by gcr on Sunday May 13, 2012 @01:54AM (#3966178)
Isn't a tool just a piece of code that writes code?