Get the latest tech news

Issues with object-oriented programming in Guile (2022)


Scheme is often thought of as a functional programming language, but really it is a multi-paradigm language, including object-oriented programming. My Scheme of choice for the past decade has been Guile.

To workaround this in Guile and preserve the behavior of the previous example, a new method around-greet needs to be defined, which calls before-greet, greet, and after-greet. It would be challenging to modify an API that people already depended on to accomodate these new wrappers without introducing backwards incompatible changes. This works, but it tightly couples the implementations of each type of greeting, and the technique only becomes more cumbersome in real, non-trivial programs.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Issues

Issues

Photo of Object

Object

Photo of Guile

Guile

Related news:

News photo

Nasa probe successfully completes closest-ever approach to sun | Parker solar spacecraft got the closest any human-made object has ever come to the star

News photo

Using Guile for Emacs

News photo

Instagram, Threads, Whatsapp and more are still experiencing issues