Why is scheme called homoiconic
Actually it didn't. Javascript is not homoiconic. JSON just happens to be almost like a homoiconic version of the Javascript array and dict data types, but that stops there.
And then there are functions etc, which are not in JSON. And the idea that JS is somehow related to Scheme isn't really true despite being repeated even by Eich. Scheme is homo-iconic because its programs have an interpretation as data structures.
Fred Foo Fred Foo k 71 71 gold badges silver badges bronze badges. Very interesting. In school we learned that the quote mark is just another way of defining a list in scheme, but looking at it the way you just described - which is that it tells scheme not to interpret it and leave it as a list - explains more or less evertyhing now regarding homoiconicity in scheme for me.
Originally, it was defined in the context of the language TRAC , as such: Because TRAC procedures and text have the same representation inside and outside the processor, the term homo-iconic is applicable, from homo meaning the same, and icon meaning representation.
More info here: Exploration of the original definition of homo-iconic Definition of homo-iconic as in current use. Klaas van Schelven Klaas van Schelven 1, 16 16 silver badges 34 34 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Does ES6 make JavaScript frameworks obsolete? Podcast Do polyglots have an edge when it comes to mastering programming Every thing including the arguments to functions, the bodies of functions, and other data types can be converted back and forth from list to their representation.
The biggest idea in Tcl is that you do not need to provide the parsing of any kind of data with in the language, and can instead delegate it to the individual commands that receive the strings as the arguments. Thus all control structures are implemented in Tcl the same way, and it allows for a very consistent syntax. SmallTalk 80 is possibly the purest object oriented language that you can find in the planet. All things happen in SmallTalk by way of messages passed back and forth between objects.
While the SmallTalk does not have a defined physical representation for the code for creating classes, It does allow access to the classes as objects directly Which is the fundamental datatype. This makes it eligible to be called a Homoiconic language. The purest one is ofcourse the lambda calculus the only datatype is a function that takes one argument. I will treat each of the homoiconic languages in detail in later enties. This property is interesting because it immediately implies some wonderful properties in the language, notably: Ability to Generate programs during runtime allowing for a higher level of abstraction.
Scheme is homo-iconic because its programs have an interpretation as data structures. Related Shorter alternative for 'lambda' keyword? C Programming - comma operator within while loop Does a programming language with the following features exist? Prolog: a compiled or interpreted language or both?
0コメント