Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: What do you know about source filters?

by stefp (Vicar)
on Jul 16, 2002 at 05:20 UTC ( #182003=note: print w/replies, xml ) Need Help??

in reply to What do you know about source filters?

I hate source filters, it reeks preprocessing. Preprocessors usually don't know much of the language they generates and that leads to defensive programing:

#define ADD(a,b) a+b /* I should have writen (a+b) */ ADD(1,2)*3 /* gives 7 instead of 9 */

If you are not convinced of preprocessor horrors, looks at the source of perl5. Yes, the C preprocessor gets us around the limitation of the language and it is one of the reason why C is still well alive. See the GNU macros that allows the same include files to be both K&R and ANSI-C. It works but it is not pretty. Parrot is indded written in C.

But, I like TheDamian source filters because it gets me the perl6 flavor. So, I can get over my dislike of source filters. But they are still a hack.

But really with perl6, I hope we will be able to deal with any input without pipelining processors.

But there is more indeed to source filters than filters that translate a language in a lesser language. Your examples show that source filters can be useful _and_ lovable.

-- stefp -- check out TeXmacs wiki

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://182003]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2021-03-01 09:14 GMT
Find Nodes?
    Voting Booth?

    No recent polls found