<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<br>
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
On 08/21/2010 11:22 PM, Bill Atkins wrote:<br>
<span style="white-space: pre;">> I don't think Template
Haskell will be essential for this - you <br>
> will probably need a parser (probably written with Parsec),
an<br>
> eval function, and a state monad to represent imperative
changes<br>
> made by the language you're evaluating. Template Haskell
is more<br>
> for the elimination of boilerplate code or turning specs
into<br>
> compile-time constraints.<br>
> <br>
> On Thursday Aug 19, 2010, at 11:05 PM, Michael Litchard
wrote:<br>
>> I'd like the community to give me feedback on the
difficulty <br>
>> level of implementing an awk interpreter. What language
features <br>
>> would be required? Specifically I'm hoping that TH is
not <br>
>> necessary because I'm nowhere near that skill level.</span><br>
<br>
Something that might not be clear to a beginning Haskell
programmer is<br>
that laziness subsumes many of the things you would use macros for
in<br>
another language. In particular, you can trivially create new<br>
"control structures" because the code you control with them only<br>
executes when needed. This is why Haskell is popular for EDSLs<br>
(embedded domain-specific languages). Template Haskell can
usually be<br>
ignored until you're programming in the type system or other
advanced<br>
usages.<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a class="moz-txt-link-freetext" href="http://enigmail.mozdev.org/">http://enigmail.mozdev.org/</a><br>
<br>
iEYEARECAAYFAkxwm14ACgkQIn7hlCsL25X+DwCfdsb+UABmQw1y9489F973EpC1<br>
oKAAn1a2OKqrJpAzpZzUenHaP8gG6zPo<br>
=eWBI<br>
-----END PGP SIGNATURE-----<br>
<br>
</body>
</html>