Semantic patching with Coccinelle
Posted Jan 22, 2009 16:18 UTC (Thu) by
rwmj (subscriber, #5474)
In reply to:
Semantic patching with Coccinelle by hppnq
Parent article:
Semantic patching with Coccinelle
To prove your point, maybe you should write patches for Coccinelle so that it can produce semantic patches for OCaml?
OCaml actually supports the principle of semantic patching
natively. You can perform almost arbitrary transformations
of the abstract syntax tree at compile time, and this feature
is used to implement interesting new features like
Erlang-style bitstrings,
type-safe access
to databases, type-safe
regular expressions, and
much more.
Of course this is "strange" to many. (LISP programmers might
recognise them as a very much more powerful version of LISP
macros). But this is just one of the several ways that OCaml
(and Haskell) are far beyond common programming languages.
Rich.
(
Log in to post comments)