Many projects combine languages, for example on the web with the ubiquitous SQL + server-side language + markup du jour + JavaScript + CSS mix (often in a single function). Bash and other shell code is mixed with Perl and Python on the server side, eval
ed and sometimes even passed through sed
before execution. Many languages support runtime execution of arbitrary code strings, and in some it seems to be fairly common practice. In addition to advice about security and separation of concerns,
- what other issues are there with this type of programming,
- what can be done to minimize it, and
- is it ever defensible (except in the "PHB on the shoulder" situation)?
Edit: To clarify, this is not about using more than one language for the job - That's a good thing for any but the simplest projects. The issue is mixing languages in the same file, such as magic strings for SQL, Bash & Perl eval
, and the like.