Thursday, January 01, 2015

Is Clojure the New C? Functional Homoiconicity Programming

interesting presentation:

Clojure Is the New C @ InfoQ
Robert Martin  (Uncle Bob) argues that Clojure is a replacement for C with its simple syntax and minimal semantics.

He is using demo program for calculating positions of space objects based on gravity,
and reflecting on differences of theories of Gravity (General Relativity vs Quantum Mechanics)
Quantum gravity - Wikipedia, the free encyclopedia

The Clean Coder: Why Clojure?
To be effective in making software for highly parallel hardware.

"The last few decades have seen us migrate from procedures to objects. Now the physical constraints of our hardware is driving us to make a similar kind of paradigm shift towards functional languages."

Clojure - home

Clojure - Wikipedia, the free encyclopedia

Homoiconicity - Wikipedia, the free encyclopedia
"In computer programming, homoiconicity (from the Greek words homo meaning the same and icon meaning representation) is a property of some programming languages in which the program structure is similar to its syntax, and therefore the program's internal representation can be inferred by reading the text's layout.[1] If a language is homoiconic, it means that the language text has the same structure as its abstract syntax tree (i.e. the AST and the syntax are isomorphic). This allows all code in the language to be accessed and transformed as data, using the same representation."

In a strange twist of technology, while Clojure is based on Java VM that is forbidden on iOS,
it could still run on iOS and any other platform that has web browser, since it can be converted to JavaScript (via ClojureScript). I is just Lisp-like syntax that is a challenge...

Modern concurrency: Erlang, Scala, Go, Clojure
nice slides with

Mark Seemann: Faking Homoiconicity in C# with graphs on Vimeo @ NDC
"Some languages (most notably LISPs) exhibit a characteristic called Homoiconicity, which means that code is data and data is code. This makes a language very powerful because a program can inspect and manipulate itself.

C# isn't a homoiconic language, but using formalized object graphs, it's often possible to formulate a problem in such a way that the program opens itself up for inspection and manipulation - essentially faking Homoiconicity in parts of the code base.
This opens up many powerful options, including easier unit testing, self-documenting systems, run-time changes to program structure, and more."

No comments: