{"id":82,"date":"2007-11-14T21:11:42","date_gmt":"2007-11-15T02:11:42","guid":{"rendered":"http:\/\/alarmingdevelopment.org\/?p=82"},"modified":"2007-11-14T21:16:43","modified_gmt":"2007-11-15T02:16:43","slug":"why-syntax-must-die","status":"publish","type":"post","link":"https:\/\/alarmingdevelopment.org\/?p=82","title":{"rendered":"Why Syntax Must Die"},"content":{"rendered":"<p>Roly Perera offers a critique of Subtext: <a href=\"http:\/\/dynamicaspects.com\/blog\/2006\/09\/why-syntax-wont-go-away.html\">Why syntax won\u00e2\u20ac\u2122t go away<\/a>. It\u00e2\u20ac\u2122s great to get this kind of feedback. I like Roly\u00e2\u20ac\u2122s visionary thinking \u00e2\u20ac\u201c I hope grad school doesn\u00e2\u20ac\u2122t pound it out of him. Overall, we are in violent agreement on many issues.<br \/>\n<!--more--><\/p>\n<p>All I am saying is, let\u00e2\u20ac\u2122s give programs the same respect we give all our other information artifacts. Let\u00e2\u20ac\u2122s say you are designing a system to automate a video rental store. You will analyze what information needs to be recorded, like videos and customers. You will analyze what operations need to be performed, like renting and returning. You will then design data structures that encode the information state while making it easy to specify the necessary operations. You might choose to use a relational model or an object-oriented one, but you would never decide to encode everything into text strings with embedded keywords, and use repeated occurrences of unique names to represent all pointers and relationships. Why is it that programs, the most complex information artifacts known to man, are restricted to one of the weakest of all data models? One reason is that when programming languages were first invented we didn\u00e2\u20ac\u2122t know very much about data structures, and the only UI was a keypunch.<\/p>\n<p>Roly and I agree that metaprogramming is central to the future of programming, and that our current adhoc refactoring techniques offer a clue to that future. That is exactly why syntax must die. Syntax makes machine manipulation of programs terribly difficult, often impossible. If we do a classical data analysis of programming as an application domain, we must surely treat refactorings as primary operations that should be straightforward to represent in the data model of a program. I think that is what Roly means when he says that refactorings should be as \u00e2\u20ac\u0153formally reliable as the kind of batch-mode transformations that a &#8230; optimising compiler might implement\u00e2\u20ac\u009d. The mother of all refactorings, Rename, is undecidable in a language with dynamic binding or reflection. Reductio ad absurdum. If Rename is undecidable, you are using the wrong model of programs. Subtext makes Rename trivial.<\/p>\n<p>Roly rightly objects to the lack of a concise formal definition of most Visual Programming Languages, which impedes metaprogramming. Subtext does have a formal model of programs underlying it, and making that model as simple and as clean as possible has been a major goal. Unfortunately the model is still in a formative state, rapidly shifting with each iteration. My first attempt to present the key ideas of the model was rejected by OOPSLA last year, so I published it as a <a href=\"http:\/\/dspace.mit.edu\/handle\/1721.1\/32980\">tech report<\/a>.<\/p>\n<p>Roly suggests that the textual comments attached to explicit linkages within Subtext might emerge as names in disguise, through the use of textual conventions to encode structure outside the program. I hope that Subtext will have sufficiently expressive annotation and reflection features to make that unnecessary.<\/p>\n<p>Roly and I are largely in agreement if you take his use of the word \u00e2\u20ac\u02dcsyntax\u00e2\u20ac\u2122 to mean any constructive mathematical structure. I take syntax to mean only the use of a grammar to specify a formal language. Syntax is fundamentally about <em>parsing strings<\/em>. Syntax is a great way to represent trees. When you need a more complex topology you fall back on the universal hack of names. We invent subtle and mysterious name-binding semantics in order to encode structure beyond the parse tree. I hate names because they are semantic black holes that hide  much of the interesting structure of our programs from human sight, and sometimes even from automated analysis because of undecidable run-time semantics. Roly objects to my ruling out names \u00e2\u20ac\u0153a priori\u00e2\u20ac\u009d. I am indeed taking an extreme position, but I justify it as a form of intellectual self-discipline. We are so well trained in the habitual syntactic tricks that it is sometimes difficult to see the alternatives. I find I need to banish syntax utterly in order to think clearly about what a program really is. I am just starting to feel confident enough to consider reintroducing textual representations for Subtext programs. But they would only be partial renderings, not a source artifact that can be parsed by a grammar into a program. Syntax must die!<\/p>\n<p>I firmly believe that within 30 years the practice of encoding programs into text strings will be seen as a barbaric relic of the stone age of programming. My ambition is to hasten that day.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Roly Perera offers a critique of Subtext: Why syntax won\u00e2\u20ac\u2122t go away. It\u00e2\u20ac\u2122s great to get this kind of feedback. I like Roly\u00e2\u20ac\u2122s visionary thinking \u00e2\u20ac\u201c I hope grad school doesn\u00e2\u20ac\u2122t pound it out of him. Overall, we are in violent agreement on many issues.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-82","post","type-post","status-publish","format-standard","hentry","category-general"],"jetpack_shortlink":"https:\/\/wp.me\/pfEnU-1k","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=82"}],"version-history":[{"count":0,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts\/82\/revisions"}],"wp:attachment":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}