Category Archives: Scala

From “Hello, world!” to “Hello, monad!” (Part II/III)

In the first part of this series, we set forth the essence of functional programming, namely, being declarative. This was illustrated with the ubiquitous “Hello, world!” example, a ridiculously simple program which, nonetheless, allowed us to introduce the major concepts … Continue reading

Posted in Embedded DSLs, functional programming, Scala | Leave a comment

Yo Dawg, We Put an Algebra in Your Coalgebra

As Dan Piponi suggested in Cofree Meets Free, we may think of coalgebraic things as machines with buttons. In this post, we take this metaphor seriously and show how we can use algebras to model the Input/Output interface of the … Continue reading

Posted in algebra, coalgebra, Embedded DSLs, machine, Scala, Type Class | 2 Comments

From “Hello, world!” to “Hello, monad!” (Part I)

This is the first instalment of a series of posts about the essence of functional programming. The only purpose of this series is to illustrate the defining features of this style of programming using different examples of increasing complexity. We will start with the ubiquitous “Hello, world!” … Continue reading

Posted in functional programming, Scala | Tagged , | 2 Comments

Macros and Reflective Calls to eliminate boilerplate

In our previous post, we told you about updatable, a library that empowers programmers to build and update immutable objects in generic contexts. We saw the builder macro as a main element in the library, but we did not explain … Continue reading

Posted in case classes, Embedded DSLs, immutability, Macros, Scala | Leave a comment

Updating immutable objects in generic contexts

Immutability is one of the hallmarks of functional design, and writing idiomatic programs in Scala highly relies on manipulating immutable objects. Now, if we don’t have mutable fields (aka vars) … how can we update objects in a convenient way? … Continue reading

Posted in case classes, immutability, Macros, Scala, Speech, Type Class, Updatable | 1 Comment

Welcome message

Think of information systems, Web 2.0 apps, games, e-learning, e-commerce, and the rest of e-* applications. Certainly, these application domains differ significantly in several respects, but can we find some commonalities? We do think so: they deal directly with people; … Continue reading

Posted in Embedded DSLs, Habla Computing, Scala, Speech | Leave a comment