Ir al contenido

Documat


Attaining multiple dispatch in widespread object-oriented languages

    1. [1] Universidad de Oviedo

      Universidad de Oviedo

      Oviedo, España

  • Localización: DYNA: revista de la Facultad de Minas. Universidad Nacional de Colombia. Sede Medellín, ISSN 0012-7353, Vol. 81, Nº. 186, 2014, págs. 242-250
  • Idioma: inglés
  • DOI: 10.15446/dyna.v81n186.40428
  • Títulos paralelos:
    • Aproximaciones para obtener multi-métodos en los lenguajes orientados a objetos más extendidos
  • Enlaces
  • Resumen
    • español

      Los multi-métodos seleccionan una de las implementaciones de un método sobrecargado, dependiendo en el tipo dinámico de sus argumentos. Aunque existen lenguajes que soportan multi-métodos, la mayoría de los lenguajes más extendidos no ofrecen esta funcionalidad. Por ello, es común ver el uso de distintos mecanismos auxiliares para obtener su funcionalidad. En este artículo evaluamos las alternativas existentes y presentamos una nueva basada en lenguajes con tipado híbrido. Una primera evaluación cualitativa analiza factores como la mantenibilidad, legibilidad, tamaño del código fuente, generalización de los parámetros y comprobación estática de tipos. También presentamos una evaluación cuantitativa del rendimiento en tiempo de ejecución y consumo de memoria.

    • English

      Multiple dispatch allows determining the actual method to be executed, depending on the dynamic types of its arguments. Although some programming languages provide multiple dispatch, most widespread object-oriented languages lack this feature. Therefore, different implementation techniques are commonly used to obtain multiple dispatch in these languages. We evaluate the existing approaches, presenting a new one based on hybrid dynamic and static typing. A qualitative evaluation is presented, considering factors such as software maintainability and readability, code size, parameter generalization, and compile-time type checking. We also perform a quantitative assessment of runtime performance and memory consumption.

  • Referencias bibliográficas
    • Chambers, G., Object-oriented multi-methods in Cecil. European Conference on Object-Oriented Programming (ECOOP). The Netherlands, 1992, pp....
    • Erich, G., Richard, H., Ralph, J. and John, V., Design patterns: Elements of reusable object-oriented software. Addison Wesley, 1995.
    • Ortin, F., Zapico, D. and Cueva, J.M., Design patterns for teaching type checking in a compiler construction course, IEEE Transactions on...
    • Torgersen, M., The expression problem revisited. European Conference on Object-Oriented Programming (ECOOP). Oslo, Norway, 2004, pp. 123-146.
    • Ortin, F., López, B. and Pérez-Schofield, J.B.G., Separating adaptable persistence attributes through computational reflection, IEEE Software...
    • Maes, P., Computational Reflection. PhD Thesis, Laboratory for Artificial Intelligence, Vrije Universiteit, Amsterdam, The Netherlands, 1987.
    • Redondo, J.M. and Ortin, F., Efficient support of dynamic inheritance for class- and prototype-based languages, Journal of Systems and Software...
    • Meijer, E. and Drayton, P., Static typing where possible, dynamic typing when needed: The end of the cold war between programming languages....
    • Bierman, G., Meijer, E. and Torgersen, M., Adding dynamic types to C#. European Conference on Object-Oriented Programming (ECOOP). Maribor,...
    • Ortin, F., Zapico, D., Perez-Schofield, J.B.G. and Garcia, M., Including both static and dynamic typing in the same programming language,...
    • Ortin, F., Redondo, J.M. and Perez-Schofield, J.B.G., Efficient virtual machine support of runtime structural reflection, Science of computer...
    • Redondo, J.M., Ortin, F. and Cueva, J.M., Optimizing reflective primitives of dynamic languages, International Journal of Software Engineering...
    • Ortin, F., Garcia, M., Redondo, J.M. and Quiroga, J., Achieving multiple dispatch in hybrid statically and dynamically typed languages. World...
    • Georges, A., Buytaert, D. and Eeckhout, L., Statistically rigorous Java performance evaluation. Object-Oriented Programming, Systems, Languages...
    • Lilja, D.J., Measuring computer performance: A practitioner's guide. Cambridge University Press, 2005.
    • Chiles, B. and Turner, A., Dynamic Language Runtime [May 2014] Available at: http://www.codeplex.com/Download?ProjectName=dlr&DownloadId=127512.
    • Gómez-Luna, E., Fernando-Navas, D., Aponte-Mayor, G. and Betancour-Buitrago, L.A., Literature review methodology for scientific and information...
    • DeMichiel, L.G. and Gabriel, R.P., The common lisp object system: An overview. European Conference on Object-Oriented Programming (ECOOP)....
    • Hickey, R., The Clojure programming language. Symposium on Dynamic Languages (DLS). Paphos, Cyprus, 2008, pp.1-10.
    • ClojureCLR., A port of Clojure to the CLR, part of the Clojure project [May 2014]. Available at: https://github.com/clojure/clojure-clr
    • Eclipse Project, Xtend, Java 10 today! [May 2014] Available at: http://www.eclipse.org/xtend.
    • Shalit, A., The Dylan reference manual: The definitive guide to the new object-oriented dynamic language. Addison Wesley Longman Publishing,...
    • Groovy 2.0 release notes. A "static theme" for a dynamic language. [May 2014] Available at: http://groovy.codehaus.org/Groovy+2.0+release+notes
    • Grothoff, C., Walkabout revisited: The Runabout. European Conference on Object-Oriented Programming (ECOOP). Darmstadt, Germany, 2003, pp....
    • Palsberg, J. and Jay, C.B., The essence of the visitor pattern. Computer Software and Applications Conference (COMPSAC). Vienna, Austria,...
    • Büttner, F., Radfelder, O., Lindow, A. and Gogolla, M., Digging into the visitor pattern. International Conference on Software Engineering...
    • Forax, R., Duris, E. and Roussel, G., Reflection-based implementation of Java extensions: The double-dispatch use-case. Symposium on Applied...
    • Clifton, C., Leavens, G.T., Chambers, G. and Millstein, T., MultiJava: Modular open classes and symmetric multiple dispatch for Java. Object-Oriented...
    • Forax, R., Duris, E. and Roussel, G., A reflective implementation of Java multi-methods, IEEE Transactions on Software Engineering 30, pp....
    • Cunei, A. and Vitek, J., An efficient and flexible toolkit for composing customized method dispatchers, Software: Practice and Experience...
    • Ortin, F., Type inference to optimize a hybrid statically and dynamically typed language, Computer Journal 54, pp. 1901-1924, 2011.
    • Ortin, F., Conde, P., Fernandez-Lanvin, D. and Izquierdo, R., A runtime performance of invokedynamic: Evaluation with a Java library, IEEE...

Fundación Dialnet

Mi Documat

Opciones de artículo

Opciones de compartir

Opciones de entorno