On Thu, 26 Oct 2006, Tim Chase wrote:
> > those with static typing, and while I don't want to get into the
> > debate on which is better, sometimes it makes sense to use a dynamic
> > language to generate code in a statically typed language.
>
> It's like asking whether a hammer or a screwdriver is better. Both are suited
> well to particular tasks.
Precisely my point. Doesn't stop acres of blog space being devoted
to the issue :-)
>
> > So, we run into a problem: how does one syntax highlight mixed
> > language code? I don't know how others do this. Maybe they don't
>
> While an arbitrary pairing of language N with embedded language M may not be a
> trivial task, you can look at the symbiosis between the existing HTML, PHP,
> and JavaScript syntax files which have something like what you describe. That
Yes, I've looked at those and got a few feet forwards, but no great
distance. I find that I have to understand too much of the
internals of syntax highlighting to make sufficient progress. I'd
like to be fluent in syntax file language, but I don't get in there
often enough to make it worth the effort at the moment, so I'm
wondering if there's another layer of abstraction that I can get at.
> way, one might at least be able to do something like create a tweaked Lisp
> syntax file that recognizes embedded Assembler code, or some other such unholy
:-)
> matrimony. :) (okay, I'm guilty of writing programs that write code to ensure
> that all combinations of N items were correctly accounted for in a massively
> ugly IF branch...so I know there are times one would want to do such a thing)
I've written code to embed decision tables in C programs, and then
expand them into 'ugly' if 'stacks' before now.
>
> -tim
>
Hugh