classes and mixins(类和混合).pdfVIP

  • 19
  • 0
  • 约12.64万字
  • 约 13页
  • 2017-07-25 发布于浙江
  • 举报
classes and mixins(类和混合)

Classes and Mixins Matthew Flatt Shriram Krishnamurthi Matthias Felleisen Department of Computer Science Rice University Houston Texas Abstract consume a large numb er of arguments the approach quickly b ecomes unwieldy esp ecially if many of the arguments are While classbased ob jectoriented programming languages the same for most of the functions uses 1 provide a exible mechanism for reusing and managing re Class systems provide a simple and exible mechanism lated pieces of co de they typically lack linguistic facilities for managing collections of highly parameterized program for sp ecifying a uniform extension of many classes with one pieces Using class extension inheritance and overriding set of elds and metho ds As a result programmers are a programmer derives a new class by sp ecifying only the unable to express certain abstractions over classes elements that change in the derived class Nevertheless In this pap er we develop a mo del of classtoclass func a pure classbased approach suers from a lack of abstrac tions that we refer to as mixins A mixin function maps tions that sp ecify uniform extensions and mo dications of a class to an extended class by adding or overriding elds classes For example the construction of a programming and metho ds Programming with mixins is similar to pro environment may require many kinds of text editor frames gramming

文档评论(0)

1亿VIP精品文档

相关文档