
Note: css and js file changes due to using Scribble from Racket 6.0, which has a new/improved set of CSS styles.
24 lines
6.5 KiB
HTML
24 lines
6.5 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>1 Preface</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="gh.css" title="default"/><script type="text/javascript" src="scribble-common.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--><meta name="keywords" content="Racket,macros,Scheme"><meta name="description" content="Practical Racket macros"><meta name="author" content="Greg Hendershott"><meta name="charset" content="utf-8"><link href='http://fonts.googleapis.com/css?family=Fenix' rel='stylesheet' type='text/css'><script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-29709446-1']);_gaq.push(['_setDomainName', 'greghendershott.com']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script></head><body id="scribble-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Fear of Macros</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Preface</a></td></tr><tr><td align="right">2 </td><td><a href="Our_plan_of_attack.html" class="tocviewlink" data-pltdoc="x">Our plan of attack</a></td></tr><tr><td align="right">3 </td><td><a href="Transform_.html" class="tocviewlink" data-pltdoc="x">Transform!</a></td></tr><tr><td align="right">4 </td><td><a href="pattern-matching.html" class="tocviewlink" data-pltdoc="x">Pattern matching:<span class="mywbr"> </span> syntax-<wbr></wbr>case and syntax-<wbr></wbr>rules</a></td></tr><tr><td align="right">5 </td><td><a href="Syntax_parameters.html" class="tocviewlink" data-pltdoc="x">Syntax parameters</a></td></tr><tr><td align="right">6 </td><td><a href="What_s_the_point_of_splicing-let_.html" class="tocviewlink" data-pltdoc="x">What’s the point of <span class="RktSym"><span class="RktStxLink">splicing-<wbr></wbr>let</span></span>?</a></td></tr><tr><td align="right">7 </td><td><a href="Robust_macros__syntax-parse.html" class="tocviewlink" data-pltdoc="x">Robust macros:<span class="mywbr"> </span> syntax-<wbr></wbr>parse</a></td></tr><tr><td align="right">8 </td><td><a href="References_and_Acknowledgments.html" class="tocviewlink" data-pltdoc="x">References and Acknowledgments</a></td></tr><tr><td align="right">9 </td><td><a href="Epilogue.html" class="tocviewlink" data-pltdoc="x">Epilogue</a></td></tr></table></div></div></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"> </span><span class="navright"> <a href="index.html" title="backward to "Fear of Macros"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Fear of Macros"" data-pltdoc="x">up</a> <a href="Our_plan_of_attack.html" title="forward to "2 Our plan of attack"" data-pltdoc="x">next →</a></span> </div><h3>1<tt> </tt><a name="(part._.Preface)"></a>Preface</h3><p>I learned Racket after 25 years of mostly using C and C++.</p><p>Some psychic whiplash resulted.</p><p>"All the parentheses" was actually not a big deal. Instead, the first
|
|
mind warp was functional programming. Before long I wrapped my brain
|
|
around it, and went on to become comfortable and effective with many
|
|
other aspects and features of Racket.</p><p>But two final frontiers remained: Macros and continuations.</p><p>I found that simple macros were easy and understandable, plus there
|
|
were many good tutorials available. But the moment I stepped past
|
|
routine pattern-matching, I kind of fell off a cliff into a
|
|
terminology soup. I marinaded myself in material, hoping it would
|
|
eventually sink in after enough re-readings. I even found myself using
|
|
trial and error, rather than having a clear mental model what was
|
|
going on. Gah.</p><p>I’m starting to write this at the point where the shapes are slowly
|
|
emerging from the fog.</p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>If you have any corrections, criticisms, complaints, or whatever,
|
|
<a href="https://github.com/greghendershott/fear-of-macros/issues">please
|
|
let me know</a>.</p></blockquote></blockquote></blockquote><p>My primary motive is selfish. Explaining something forces me to learn
|
|
it more thoroughly. Plus if I write something with mistakes, other
|
|
people will be eager to point them out and correct me. Is that a
|
|
social-engineering variation of meta-programming? Next question,
|
|
please. :)</p><p>Finally I do hope it may help other people who have a similar
|
|
background and/or learning style as me.</p><p>I want to show how Racket macro features have evolved as solutions to
|
|
problems or annoyances. I learn more quickly and deeply when I
|
|
discover the answer to a question I already have, or find the solution
|
|
to a problem whose pain I already feel. Therefore I’ll give you the
|
|
questions and problems first, so that you can better appreciate and
|
|
understand the answers and solutions.</p><div class="navsetbottom"><span class="navleft"> </span><span class="navright"> <a href="index.html" title="backward to "Fear of Macros"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Fear of Macros"" data-pltdoc="x">up</a> <a href="Our_plan_of_attack.html" title="forward to "2 Our plan of attack"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html> |