Object-oriented functional programming and type reconstruction

Author(s):  
Zhenyu Qian ◽  
Bernd Krieg-Brückner
2020 ◽  
Vol 18 (2) ◽  
pp. 15-30
Author(s):  
Sergey S. Bogolepov

Kotlin is a statically typed programming language that supports object-oriented and functional programming. It supports JVM, JS and native platforms via LLVM (Kotlin / Native). The first two targets are backed with well-developed virtual machines that can perform advanced program optimizations at runtime. However, for native platforms, all optimizations must be performed at compile time. Currently Kotlin / Native lacks many optimizations, which is why the performance of the generated code is poor in many cases. This paper describes a way to solve this problem by introducing an additional SSA-based intermediate representation and implementing escape analysis using it. Experimental results have shown that this approach can significantly improve performance.


1995 ◽  
Vol 5 (2) ◽  
pp. 201-224 ◽  
Author(s):  
Tobias Nipkow ◽  
Christian Prehofer

AbstractWe study the type inference problem for a system with type classes as in the functional programming language Haskell. Type classes are an extension of ML-style polymorphism with overloading. We generalize Milner's work on polymorphism by introducing a separate context constraining the type variables in a typing judgement. This leads to simple type inference systems and algorithms which closely resemble those for ML. In particular, we present a new unification algorithm which is an extension of syntactic unification with constraint solving. The existence of principal types follows from an analysis of this unification algorithm.


2010 ◽  
Vol 20 (3-4) ◽  
pp. 303-352 ◽  
Author(s):  
BRUNO C. D. S. OLIVEIRA ◽  
JEREMY GIBBONS

AbstractDatatype-generic programming (DGP) involves parametrization of programs by the shape of data, in the form of type constructors such as ‘list of’. Most approaches to DGP are developed in pure functional programming languages such as Haskell. We argue that the functional object-oriented language Scala is in many ways a better choice. Not only does Scala provide equivalents of all the necessary functional programming features (such as parametric polymorphism, higher-order functions, higher-kinded type operations, and type- and constructor-classes), but it also provides the most useful features of object-oriented languages (such as subtyping, overriding, traditional single inheritance, and multiple inheritance in the form of traits). Common Haskell techniques for DGP can be conveniently replicated in Scala, whereas the extra expressivity provides some important additional benefits in terms of extensibility and reuse. We illustrate this by comparing two simple approaches in Haskell, pointing out their limitations and showing how equivalent approaches in Scala address some of these limitations. Finally, we present three case studies on how to implement in Scala real DGP approaches from the literature: Hinze's ‘Generics for the Masses’, Lämmel and Peyton Jones's ‘Scrap your Boilerplate with Class’, and Gibbons's ‘Origami Programming’.


Author(s):  
Ricardo Timarán Pereira ◽  
Javier Jiménez Toledo ◽  
Anivar Chaves Torres

Resumen Para el desarrollo de software se cuenta con varios paradigmas de programación, cada uno provisto de sus metodologías, técnicas y herramientas y orientado a un determinado campo o a un conjunto de problemas, y por ende, ninguno es suficiente por sí mismo para solucionar todos los problemas que se puedan suscitar. En este artículo se presentan los resultados del proyecto de investigación que tiene como objetivo la apropiación y aplicación del modelo de programación multiparadigma con el entorno Mozart-Oz para el desarrollo de software en el programa Ingeniería de Sistemas de la Universidad de Nariño. Esta investigación se realizó en tres fases en las que se estudian y evalúan la programación estructurada y orientada a objetos, la programación funcional y la programación por restricciones, con el fin de desarrollar en los estudiantes las competencias específicas en la solución de problemas utilizando estos modelos y entorno. Palabras ClaveProgramación Multiparadigma, Entorno de Desarrollo Mozart-Oz, Aprendizaje de Lenguajes de Programación.  Abstract For software development has several programming paradigms, each equipped with their methodologies, techniques and tools aimed at a particular field or set of problems, and therefore, none is sufficient by itself to solve all problems that can inspire. This paper presents the results of the research project that aims at the appropriation and application of multiparadigm programming model with the Mozart-Oz environment for software development in the Systems Engineer program at the Universidad of Nariño. This research was conducted in three phases in which structured and object-oriented programming, functional programming and constraints programming was studied and evaluated, in order to develop in students the specific skills to solve problems using these models and environment.KeywordsMultiparadigm Programming, the Mozart-Oz Development Environment, Learning Programming Languages 


2015 ◽  
Vol 6 (2) ◽  
pp. 6
Author(s):  
Cristian González García ◽  
Jordán Pascual Espada B. ◽  
Cristina Pelayo G-Bustelo ◽  
Juan Manuel Cueva Lovelle

Hace unos meses Apple presentó un nuevo lenguaje de programación para sus plataformas: Swift. Con Swift, Apple pretende atraer a los programadores de los lenguajes de programación basados en la sintaxis de C++ y darles una mayor abstracción, que con Objective-C, para que sea más fácil programar para las plataformas de Apple. Por estas razones, se hace necesario contrastar lo pretendido por Apple y realizar un estudio del lenguaje de programación a fin de contrastar su objetivo. Para ello, se hicieron dos evaluaciones, una cualitativa y otra cuantitativa, con el propósito de verificar en qué medida Swift es un avance respecto a Objective-C.DThe Future of Apple: Swift Versus Objective-CABSTRACTFew months ago, Apple presented a new programming language: Swift. With Swift, Apple pretends to attract the programmers of the programming languages based on C++ syntax and gives them a higher abstraction than with Objective-C for being easier to programme to Apple’s platforms. For these reasons, it is necessary to contrast what is intended by Apple and do a study of the programming language to ascertain their goal. For this purpose, we did two evaluations, firstly a qualitative evaluation and after, a quantitative evaluation to verify in how much Swift is an advance with respect to Objective-C.Keywords: computer languages, computer programming, functional programming, object oriented programming, programming, software.


2019 ◽  
Author(s):  
Ronal Watrianthos

Bahasa pemrograman procedural merupakan bahasa pemerograman yang melibatkan fungsi-fungsi atau prosedur-prosedur sebagai sub program untuk membentuk solusi dari suatu permasalahan. Ada yang mengelompokanya menjadi 3 level bahasa yaitu: high level (Seperti pascaldan basic), middle Level (Seperti Bahasa C), dan low level (Seperti Bahasa Assembly). Ada juga yang mengelompokannya menjadi procedural/ functional programming, Object oriented programming, dansebagainya.Berbeda halnya dengan bahasa pemerograman yang berorientasi obyek, yang menggunakanpendekatan obyek dalam menyelesaikan suatu persoalan. Dengan memahami element-elementbahasa, kita dapat dengan cepat dan muda untuk memepelajari berbagai macam bahasapemrograman


2004 ◽  
Vol 14 (4) ◽  
pp. 365-378 ◽  
Author(s):  
MATTHIAS FELLEISEN ◽  
ROBERT BRUCE FINDLER ◽  
MATTHEW FLATT ◽  
SHRIRAM KRISHNAMURTHI

Twenty years ago Abelson and Sussman's Structure and Interpretation of Computer Programs radically changed the intellectual landscape of introductory computing courses. Instead of teaching some currently fashionable programming language, it employed Scheme and functional programming to teach important ideas. Introductory courses based on the book showed up around the world and made Scheme and functional programming popular. Unfortunately, these courses quickly disappeared again due to shortcomings of the book and the whimsies of Scheme. Worse, the experiment left people with a bad impression of Scheme and functional programming in general. In this pearl, we propose an alternative role for functional programming in the first-year curriculum. Specifically, we present a framework for discussing the first-year curriculum and, based on it, the design rationale for our book and course, dubbed How to Design Programs. The approach emphasizes the systematic design of programs. Experience shows that it works extremely well as a preparation for a course on object-oriented programming.


2019 ◽  
Author(s):  
Ronal Watrianthos

Bahasa pemrograman procedural merupakan bahasa pemerograman yang melibatkan fungsi-fungsi atau prosedur-prosedur sebagai sub program untuk membentuk solusi dari suatu permasalahan. Ada yang mengelompokanya menjadi 3 level bahasa yaitu: high level (Seperti pascaldan basic), middle Level (Seperti Bahasa C), dan low level (Seperti Bahasa Assembly). Ada juga yang mengelompokannya menjadi procedural/ functional programming, Object oriented programming, dansebagainya.Berbeda halnya dengan bahasa pemerograman yang berorientasi obyek, yang menggunakanpendekatan obyek dalam menyelesaikan suatu persoalan. Dengan memahami element-elementbahasa, kita dapat dengan cepat dan muda untuk memepelajari berbagai macam bahasapemrograman


1987 ◽  
Vol 16 (229) ◽  
Author(s):  
Bent Bruun Kristensen ◽  
Ole Lehrmann Madsen ◽  
Birger Møller-Pedersen ◽  
Kristen Nygaard

<p>The BETA programming language is a modern language in the SIMULA 67 tradition. It supports the object-oriented perspective on programming and contains comprehensive facilities for procedural and functional programming. BETA replaces classes, procedures, functions and types by a single abstraction mechanism called the <em>pattern</em>. Patterns may be organized in a classification hierarchy by means of <em>sub-patterns</em>. The notion of virtual procedure is generalized to virtual pattern. Virtual patterns combined with sub-patterns make it possible to delay the specification of an attribute in a pattern. Attributes may then have different bindings in different sub-patterns. BETA also provides a unified framework for sequential, coroutine and concurrent execution.</p><p>This paper is a tutorial introduction to BETA.</p>


Sign in / Sign up

Export Citation Format

Share Document