The Magik programming language is imperative and leans heavily toward the Object Oriented Programming (OOP) paradigm. It relies on mutable, 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 andrelies on immutable objects, minimizes side-effects and achieves […]
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. […]
The Observer Pattern
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. One such design pattern is the Observer (also called Publish-Subscribe in some circles). In its usual case, it defines a one-to-many dependency […]
Magik Closures
Magik supports Closures. Most Magik developers don’t understand or use Closures. Closures are useful. At this point you might be asking, “What’s a Closure?” If you don’t know, that’s not surprising because practically all Magik developers are taught to use the Object Oriented Programming (OOP) paradigm when they first learn Magik. Then as they start […]
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 […]