Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly does homoiconicity mean?

I was trying to understand the Wikipedia article on homoiconity, but it's too verbose and does not explain the main theory behind the word concisely. I should add that I'm not a native English speaker so I prefer simple English over academic white paper quotes.

So, what exactly does it mean if a language is homoiconic? What makes C#, Java or JavaScript non-homoiconic?

like image 835
Tower Avatar asked Jun 27 '11 12:06

Tower


People also ask

Is Lisp homoiconic?

Languages such as Lisp and its dialects, such as Scheme, Clojure, and Racket employ S-expressions to achieve homoiconicity.

Is c homoiconic?

C is not homoiconic, whether the compiler is implemented in C or in Pascal, and C cannot be made homoiconic without adding fundamentally new and different constructs to the language definition.

What is meta coding?

HTML defines meta as structural coding elements that are used extensively to provide detailed Web page information, like breaking down the structure of a Web page for understanding and clarity. The Greek meta prefix translates as "hidden" in the English language.

Are rackets homoiconic?

Racket is a homoiconic language which means that everything in the language is represented the same way. All code and data are represented with S-expressions.


1 Answers

It means "code as data" which is a general characteristic of Lisp family.

(add 2 3) 

Just like above string, which is both a list and also a function call. The "Homo" prefix stands for this characteristic.

like image 73
Mike Yang Avatar answered Nov 10 '22 05:11

Mike Yang