4 ms·
Someone yell at me if I am wrong (self taught - with all the ups and downs implied), but to me these are not good names. A few points on this: * 'code-as' is a
by twelvechairs 14y ago
Someone yell at me if I am wrong (self taught - with all the ups and downs implied), but to me these are not good names. A few points on this:
* 'code-as' is a bit of a strange statement as it implies two-steps from an original object - as you are taking something encoded ('code') and translating it to something else ('as').
* 'code-as-text' should be 'code-as-representation' at least (you needn't represent anything as text if you dont want to - it could be coloured geometric shapes...)
* I don't understand what 'code-as-procedure' means either. Is this an abstract-syntax-tree or just platform-executable-code?
* 'code-as-data' is meaningless because everything is data, both the text and procedure... Does the OP mean something platform-executable? Or something within a type system?
Good topic to launch discussion on though....
- tinco 14y agoLet me try to explain it using a bit more consistent terms. Code models the behaviour of a system, let's replace all instances of 'code-as' with 'behaviour-as' to avoid confusion. So we reason about the language in which a behaviour model is expressed. 'behaviour-as-text' is the serialization of the behaviour model according to the grammar of the language. 'behaviour-as-data' is the model representation as it is viewed and modified in the model. 'behaviour-as-procedure' is the meaning of the model in the sense of execution. The semantics of the model. So this text says that the semantics of the behaviour model need to be easily expressed as data, and the textual representation of the model must clearly show both its semantics and its data representation.
- tinco 14y agoSo the freaky thing about metaprogramming is that the model changes itself right? The aphorism in three simple sentences: 1 "data must express procedure" 2 "text must express procedure" 3 "text must express data" This shows that text both directly expresses procedure by rule 2, and indirectly by rule 1 via rule 3. This indirection step allows recursion to take place (i.e. the data contains a model in the same language as it is defined in) that is used for the model to reason about itself.