The Magik programming language is imperative and leans heavily toward the Object Oriented Programming (OOP) paradigm. It relies on mutation, hidden state, side-effects and tight coupling between data and behavior. Code-reuse is achieved primarily through inheritance. The Functional Programming (FP) paradigm, on the other hand, is declarative and relies on immutable objects, minimizes side-effects and […]
Smallworld
The Value of Logging
Logs. I know. Logs are boring. The mere thought of scanning through hundreds or thousands of lines of a log is enough to bring even the most diligent among us to tears. Yet logs are one of the most valuable sources of information when we need to determine why something isn’t working in an application. […]
Observables
It’s common knowledge that loose coupling within an application leads to lower- maintenance systems and fewer bugs. To that end there have been numerous techniques and paradigms developed to achieve the loosely-coupled goal. The Observer Pattern One such design pattern is the Observer, also called Publish-Subscribe in some circles (let’s break into a small sidebar […]
Magik Closures
Most Magik developers have never heard of a Closure, yet Functional Programming languages frequently use it to do powerful and useful things. And Magik supports Closures. However, practically all Magik developers are taught to use the Object Oriented Programming (OOP) paradigm when they first learn Magik. Then as they start working on existing code, it’s […]
Magik Curry
If you came here anticipating some supernatural spicy Indian cuisine, I’m afraid you’re going to be disappointed. However, if your goal is to learn to use functional programming (FP) techniques with Smallworld Magik, then prepare to feast on new knowledge and add another tool to your growing arsenal of skills. Currying, a subset of partial […]