资源描述:
《Some History of Functional Programming Languages - Springer》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、SomeHistoryofFunctionalProgrammingLanguages(InvitedTalk)D.A.TurnerUniversityofKent&MiddlesexUniversityAbstract.Westudyaseriesofmilestonesleadingtotheemergenceoflazy,higherorder,polymorphicallytyped,purelyfunctionalprogram-minglanguages.AninvitedlecturegivenatTFP12,StAndrewsUniver-sity
2、,12June2012.IntroductionAcomprehensivehistoryoffunctionalprogramminglanguagescoveringallthemajorstreamsofdevelopmentwouldrequireamuchlongertreatmentthanfallswithinthescopeofatalkatTFP,itwouldprobablyneedtobebooklength.InwhatfollowsIhave,firstly,focussedonthedevelopmentsleadingtolazy,hi
3、gherorder,polymorphicallytyped,purelyfunctionalprogramminglanguagesofwhichHaskellisthebestknowncurrentexample.Secondly,ratherthantryingtoincludeeveryimportantcontributionwithinthisstreamIfocusonaseriesofsnapshotsatsignificantstages.Wewillexamineaseriesofmilestones:1.LambdaCalculus(Chur
4、ch&Rosser1936)2.LISP(McCarthy1960)3.Algol60(Nauretal.1963)4.ISWIM(Landin1966)5.PAL(Evans1968)6.SASL(1973–83)7.Edinburgh(1969–80)—NPL,earlyML,HOPE8.Miranda(1986)9.Haskell(1992...)1TheLambdaCalculusThelambdacalculus(Church&Rosser1936;Church1941)isatypelesstheoryoffunctions.Inthebriefacc
5、ounthereweuselowercaselettersforvariables:a,b,c···anduppercaselettersforterms:A,B,C···.Atermofthecalculusisavariable,e.g.x,oranapplicationAB,oranabstractionλx.Aforsomevariablex.Inthelastcaseλx.isabinderandfreeH.-W.LoidlandR.Pe˜na(Eds.):TFP2012,LNCS7829,pp.1–20,2013.cSpringer-VerlagBe
6、rlinHeidelberg20132D.A.TurneroccurrencesofxinAbecomebound.Aterminwhichallvariablesareboundissaidtobeclosedotherwiseitisopen.Themotivatingideaisthatclosedtermsrepresentfunctions.Inwritingtermswefreelyuseparenthesestoremoveambiguity.Thecalculushasthreerules(α)λx.A→αλy.[y/x]A(β)(λx.A)B→β
7、[B/x]A(η)λx.Ax→ηAifxnotfreeinAHere[B/x]AmeanssubstituteBforfreeoccurrencesofxinA1.Ruleαpermitschangeofboundvariable.Termswhicharethesameuptoα-conversion,e.g.λx.xandλy.y,arenotusuallydistinguished.Thesmallestreflexive,symmetric,transitive,substitutiverelationontermsincluding→α,→βand→η,w
8、ritte