Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: George Neuner Newsgroups: comp.compilers Subject: Re: Best language for implementing compilers? Date: Fri, 08 Feb 2019 18:36:42 -0500 Organization: A noiseless patient Spider Lines: 25 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <19-02-004@comp.compilers> References: <19-02-002@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="50423"; mail-complaints-to="abuse@iecc.com" Keywords: ML Posted-Date: 10 Feb 2019 14:53:53 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:2156 On Fri, 8 Feb 2019 12:20:18 +0000, "Costello, Roger L." wrote: >What is it about ML that makes it such a good language for implementing >compilers? Compiling involves a lot of pattern matching, and pattern matching is a native feature of ML. I can recall papers from that same era advocating writing compilers in Prolog, or similar declarative languages, in which essentially all programming is done with pattern matching. Lisp and Lisp-like languages - Scheme, Racket, etc. - are also nice to work with for compiler writing. These languages don't natively include pattern matching, but they are extensible [using metaprogramming] and there are good pattern match libaries available for most popular implementations. Racket, in particular, is a "batteries included" Scheme derivative that includes ML-like pattern matching in its basic distribution. George