• Refine Query
  • Source
  • Publication year
  • to
  • Language
  • 1
  • Tagged with
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • About
  • The Global ETD Search service is a free service for researchers to find electronic theses and dissertations. This service is provided by the Networked Digital Library of Theses and Dissertations.
    Our metadata is collected from universities around the world. If you manage a university/consortium/country archive and want to be added, details can be found on the NDLTD website.
1

A modular approach to object initialization for Pharo / Une approche modulaire de l'initialisation d'objets pour Pharo

Naddeo, Marco 24 November 2017 (has links)
La modularité du code favorise la réutilisation. Les concepteurs de langages de programmation se sont principalement consacrés à la modularité des méthodes. À l’inverse, la modularité du code d’initialisation a souvent été négligé. Le code d’initialisation de beaucoup de langages orientés objets à classe est laborieux dans plusieurs cas: par exemple, quand quelques champs (i.e., variables d’instances) ont plusieurs options d’initialisation (e.g., un rectangle peut être initialisé avec des coordonnées Cartésiennes ou polaires), ont une initialisation optionnelle (e.g., un rectangle peut être positionné à une coordonnée fournie ou à l’origine (0,0) si aucune coordonnée n’est fournie) ou héritent d’une initialisation de la super classe (e.g., un rectangle coloré doit redéfinir tous les constructeurs de sa super classe pour ajouter la notion de couleur). Dans de telles circonstances, le nombre de constructeurs augmente exponentiellement avec les options d’initialisation car l’approche d’initialisation manque de modularité.Nous proposons une approche d’initialisation novatrice s’inspirant du langage prototypique Magda. Cette approche est basée sur des modules d’initialisation composables plus petits que les constructeurs classiques. De plus, le nombre de ces modules augmente linéairement avec les options d’initialisation. Nous appliquons cette approche à Pharo, un langage orienté objets dynamiquement typé inspiré de Smalltalk. L’adaptation à Pharo de l’approche d’initialisation de Magda implique la résolution de nouveaux défis issus du passage d’un contexte statiquement typé à un contexte dynamique. / Code modularity is important for code reuse. Language designers mainly focused on method code modularity. On the contrary, initialization code modularity has usually been neglected. The initialization code of many class-based object-oriented languages becomes cumbersome in different situations: for example, when some fields have multiple initialization options (e.g., a rectangle can be positioned by providing Cartesian or polar coordinates), have optional initialization (e.g., a rectangle can be positioned in the origin (0,0) if no other coordinates are provided), or have superclass initialization (e.g., a colored rectangle must redefine all the constructors of its rectangle superclass to add the notion of color). In such cases, the number of constructors increases exponentially in the size of the initialization options, since the initialization approach lacks modularity.We propose a novel approach to field initialization, inspired by the prototypical language Magda. This approach is based on easy-to-compose initialization modules, which result to be smaller compared to classical constructors. Moreover, their number grows linearly in the size of the initialization options. We apply such approach to Pharo, a dynamically-typed object-oriented programming language inspired by Smalltalk. The adaptation to Pharo of Magda’s initialization approach implies solving some new challenges related to moving from a statically typed context to a dynamically typed one.

Page generated in 0.0808 seconds