Archivi categoria: Functional Programming

APL Problem Solving Competition : sei pronto?

p

E’ rimasto tempo fino al 6 agosto per proporre il tuo codice alla APSC,  la competizione aperta a studenti (e non studenti) con un premio di 8500$ (riservato agli studenti).

Registrati sul sito della DYALOG APL Problem Solving Competition e metti alla prova la tua conoscenza di questo splendido linguaggio di programmazione, creato da Kenneth Eugene Iverson nel 1962.

f

Ricordiamo che Iverson, scomparso 10 anni fa, è stato insignito del prestigioso Turing Award per il suo contributo alla teoria dei linguaggi di programmazione e per la notazione matematica che porta il suo nome.

p

Erlang : released Neotoma 1.7.0

E’ stata rilasciata una nuova versione di Neotoma il packrat parser generator per PEG (Parsing Expression Grammars), realizzato ispirandosi a treetop per Ruby e parsec per Haskell.

Il packrat parsing è una tecnica che garantisce un tempo lineare di elaborazione attraverso l’uso della memoization (tecnica di ottimizzazione che evita ad una funzione di rielaborare valori già trattati). Per chi sia interessato ad approfondire questa tecnica di parsing consiglio la lettura della The Packrat Parsing and Parsing Expression Grammars Page.

Functional Programming

From Wikipedia, the free encyclopedia:

In computer science, functional programming is a programming paradigm, a style of building the structure and elements of computer programs, that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming emphasizes functions that produce results that depend only on their inputs and not on the program state – i.e. pure mathematical functions. It is a declarative programming paradigm, which means programming is done with expressions. In functional code, the output value of a function depends only on the arguments that are input to the function, so calling a function f twice with the same value for an argument x will produce the same result f(x) both times. Eliminating side effects, i.e. changes in state that do not depend on the function inputs, can make it much easier to understand and predict the behavior of a program, which is one of the key motivations for the development of functional programming.

Functional programming has its roots in lambda calculus, a formal system developed in the 1930s to investigate computability, the Entscheidungsproblem, function definition, function application, and recursion. Many functional programming languages can be viewed as elaborations on the lambda calculus, where computation is treated as the evaluation of mathematical functions and avoids state and mutable data. In the other well known declarative programming paradigm, logic programming, relations are at the base of respective languages.[1]

In contrast, imperative programming changes state with commands in the source language, the most simple example is the assignment. Functions do exist, not in the mathematical sense, but the sense of subroutine. They can have side effects that may change the value of program state. Functions without return value therefore make sense. Because of this, they lack referential transparency, i.e. the same language expression can result in different values at different times depending on the state of the executing program.[1]

Functional programming languages, especially purely functional ones such as Hope and Rex, have largely been emphasized in academia rather than in commercial software development. However, prominent functional programming languages such as Common Lisp, Scheme,[2][3][4][5] Clojure, Racket,[6] Erlang,[7][8][9] OCaml,[10][11] Haskell,[12][13] Scala[14] and F#[15][16] have been used in industrial and commercial applications by a wide variety of organizations. Functional programming is also supported in some domain-specific programming languages like R (statistics),[17][18] Mathematica (symbolic and numeric math),[19] J, K and Q from Kx Systems (financial analysis), XQuery/XSLT (XML),[20][21] and Opal.[22] Widespread domain-specific declarative languages like SQL and Lex/Yacc use some elements of functional programming, especially in eschewing mutable values.[23]

Programming in a functional style can also be accomplished in languages that aren’t specifically designed for functional programming. For example, the imperative Perl programming language has been the subject of a book describing how to apply functional programming concepts.[24] C# 3.0 and Java 8 added constructs to facilitate the functional style.