Religious Tech Wars

Richard Kenneth Eng
Morning Light
Published in
3 min readFeb 11, 2018

--

For decades, a number of religious tech wars have been waging. There is no end in sight for any of them. Both sides have been passionate and vociferous. Intellectual blood has been staining the streets red. We shall examine some of the main conflicts.

Dynamic Typing versus Static Typing

Dynamic typing supposedly makes programming more error-prone, makes code less maintainable and scalable. However, there is no scientific evidence to support this. It’s just conjecture.

Robert C. Martin shows that dynamic typing is perfectly acceptable if you use TDD or Test-Driven Development (read Type Wars and TDD Harms Architecture). There is no reason to give up the advantages of flexibility and agility.

Object-Oriented Programming versus Functional Programming

Mutation of state is supposedly a terrible evil. Functional programming promises nirvana through the elimination of side effects and the safety of referential transparency.

However, both paradigms are merely tools that should be applied where appropriate. Neither is a universal programming panacea. There are situations where it makes perfect sense to mutate state.

While FP has been gaining more attention in recent years, it is highly unlikely to displace OOP, which is well-entrenched in the IT industry. There is room for both paradigms and they can coexist nicely.

Inheritance versus Composition

Ever since the Gang of Four’s proclamation that we should favour object composition over class inheritance, the latter has been getting a bad rap. This is a ridiculous judgment because both inheritance and composition are merely tools. Tools are not inherently evil; they must be used where appropriate.

If you misuse a tool, it’s not because the tool is bad; it’s because your programming skill is bad. There are many programming situations where inheritance just makes a lot of sense. Conversely, there are situations where it makes no sense.

Has inheritance been abused and overused? Certainly. But to suggest that we should favour composition over inheritance shows a profound misunderstanding of object-oriented programming.

Small Concise Languages versus Large Baroque Languages

Small languages supposedly lack expressiveness because they don’t have all the fancy features you find in C++, C#, Scala, Swift, Kotlin, etc. Experienced programmers in Smalltalk, Elixir, Go, Python, Racket and so on know better; you can write very concise and elegant code in these languages.

The fact is: small, simple languages impose a much lower cognitive load on the programmer. They lose nothing in terms of capability. Larger languages may have features that make certain expressions more convenient but at the cost of greater cognitive demands. It’s a trade-off. And it’s a matter of individual preference.

One-based Arrays versus Zero-based Arrays

This has always been a silly debate. In a truly high-level language that encourages high-level abstractions, one-based is more natural from the human perspective than from the hardware perspective (of base addresses and offsets). Array elements are viewed positionally rather than as contiguous memory locations:

The first element of an array is at position 1.

The second element of an array is at position 2.

The third element of an array is at position 3.

The n-th (or last) element of an n-element array is at position n. There has never been a zeroth element at position 0.

All very sensible. On the other hand, zero-based arrays do simplify index arithmetic. Which one you choose is really a matter of taste and perspective.

Which is the best programming editor or IDE?

Many programmers swear by Emacs, Vim, Sublime Text, Atom, Visual Studio Code, Visual Studio, Eclipse, IntelliJ IDEA, NetBeans, etc. The choice of editor is really a matter of individual taste.

I’m going to suggest that Smalltalk’s built-in, live coding IDE is the best choice for two reasons:

  1. It’s a beautifully elegant way to do live coding and debugging. It is so convenient and easy that even children can do it!
  2. This live coding facility is the principal reason why Smalltalk is the most productive programming language in the world (not counting MUMPS).

--

--