Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



You can build successive abstractions using meta-programming.

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


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.


Most lisp hackers would use Macros (code that writes code) because it is easier. How could this be using 'inadequate tooling'?


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.


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.


> 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.


Ever use a compiler?


A compiler is a translator, not a meta-programming system.


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.


Isn't a tool just a piece of code that writes code?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: