Re: Proposal: Allow "\=" for field update in record update syntax
"S. Alexander Jacobson" <[email protected]> Mon, 28 Feb 2005 05:33:36 -0500 (Eastern Standard Time)
| Newsgroups | gmane.comp.lang.haskell.template |
|---|---|
| Message-ID | <Pine.WNT.4.62.0502280532440.760@philo> |
Since this didn't get a response on the Haskell list, I thought I would forward it here.... On Sat, 19 Feb 2005, Andre Pang wrote: > On 19/02/2005, at 5:20 AM, Keean Schupke wrote: > >> Yes, your idea is much nicer... I was just suggesting TH as a way to >> implement custom syntax... It would be nice if come sort of standard >> existed for template-haskell so that other compilers/interpreters could >> adopt it. A portable template would be a cool thing. > > The $(...) syntax that you need at the splice site greatly diminishes the > potential for Template Haskell to be used as syntax, unfortunately. The > interesting (or frustrating?) thing is that Template Haskell implements the > majority of the hard work needed for a proper hygienic macro system, but > unfortunately doesn't go quite the extra mile to enable you to actually > define new syntax. I suspect all you'd need is a way to annotate the > function you wanted to use as a macro, so that the compiler knows that the > function should always be spliced in, rather than be explicitly spliced in at > the call site. (People who know better, shoot me down if I'm wrong ...) > > I'd actually go so far blame the lack of macro support in TH on the Haskell > community as a whole, since the general consensus I get from e.g. the mailing > lists is that "syntactic sugar is bad". > > > -- > % Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/> > ______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com