Monday, August 03, 2015

programs as data: Less is more ("Maybe" :-)

podcast interview Less is More in Languages with Mark Seemann @ .NET Rocks!

ploeh blog by Mark Seemann

Less is more: language features
The set of all valid programs, inside the much larger set of all possible instructions, with the overlay of all possible instructions in a high-level language.

Null pointers
Nulls are one of the most misunderstood language constructs. There's nothing wrong with the concept of a value that may or may not be present. Many great programming languages have this concept. In Haskell, it's called Maybe; in F#, it's called option

c# - Maybe class and optional parameters - Stack Overflow


podcast: Analyzing Source Code using Moose with Tudor GĂ®rba @ .NET Rocks!

Homoiconicity - Wikipedia, the free encyclopedia
"In computer programming, homoiconicity (from the Greek words homo meaning the same and icon meaningrepresentation) 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 areisomorphic). This allows all code in the language to be accessed and transformed as data, using the same representation.

In a homoiconic language the primary representation of programs is also a data structure in a primitive type of the language itself. This makes metaprogramming easier than in a language without this property, since code can be treated as data: reflection in the language (examining the program's entities at runtime) depends on a single, homogeneous structure, and it does not have to handle several different structures that would appear in a complex syntax. To put that another way, homoiconicity is where a program's source code is written as a basic data structure that the programming language knows how to access."


Lisp is example of one such language. Curl is another

MIT Book online: Structure and Interpretation of Computer Programs


PDF from Web: web.mit.edu/alexmv/6.037/sicp.pdf

PDF from LaTeX: sarabander/sicp-pdf · GitHub (nice)

HTML5 & ePub3?: sarabander/sicp · GitHub