CPL - Chalmers Publication Library
| Utbildning | Forskning | Styrkeområden | Om Chalmers | In English In English Ej inloggad.

Type-directed language extension for effectful computations

Evgenii Kotelnikov (Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers))
SCALA 2014 - Proceedings of the 5th Annual Scala Workshop, Co-located with ECOOP 2014 p. 35-43. (2014)
[Konferensbidrag, refereegranskat]

Computation types such as functors, applicative functors and monads have become common abstractions for modeling effectful computations in functional programming languages. They are often used together with special language extensions intended to simplify the syntax of monadic expressions. We can simplify it even more by employing types rather than just mechanical syntactic transformation. In this paper we present scala-workflow, a macro-based extension to the Scala programming language that offers uniform syntax for structuring effectful computations expressed as abstract interfaces with a stackable set of combinators. Unlike similar syntactic extensions, such as F#'s computation expressions, Haskell's do-notation and Scala's own for-expressions, scala-workflow allows users to transparently blend pure and effectful functions in a bounded context, as they are separated during macro expansion based on the types of subexpressions.

Nyckelord: Effects, Functors, Macros, Monads, Scala

Denna post skapades 2014-09-01. Senast ändrad 2014-12-09.
CPL Pubid: 202162


Läs direkt!

Länk till annan sajt (kan kräva inloggning)