Skip to main content
Strict Types Won't Fix Your  Lack of Understanding

Strict Types Won't Fix Your Lack of Understanding

#fundamental

#types

In development circle I am what would be considered a mid/senior developer. I have been in the trenches, seen the rise and fall of technologies. Seen the prophecies of doom and gloom with new things that showed up. Been a part of the ebb and flow of it all. My training, my initial training came in C, C++ and Java. So I would like to think I know what I am talking about when I am sceptical about things.

An interesting thing I have come across over the years, is this need to enforce types on languages that are dynamic and pride themselves on that. While this wasn’t an issue prior, it has become an increasingly worrying trend with current day developers. You come from a strictly typed language to a dynamic one and upon encountering something you don’t understand, you assume adding types would fix the problems you have.


Learn The Language

As a developer it should be within you to want to learn, to strive for it. The need for improvement should be on of your core tenets - to want to be better. You wanting a language to have strict typing because that is what you are used to is a failure on your part.

The Offenders

JavaScript/Typescript

Arguably the worst of the offenders. This has been going on for as long as I can remember.

I recall somewhere saying, “The war is over, typescript won”. And I laughed, audibly, out loud. How does a super-set of another language win anything. It also wasn’t a win, more a pushing hard for it to the point that the people against simply stopped arguing and moved on to building in.

Honeestly, you can’t tell me this is better:

import { BaseRecord, DataProvider, GetListParams, GetListResponse } from "@refine/core";

import BaseRecord. DataProvider. GetListParams. GetListResponsel from
"arefinedev/core";

export const dataProvider: DataProvider = {
	getList: async <TData extends BaseRecord = BaseRecord>(f resource ):
	 GetListParams): Promise<GetListResponse<TData>> => {
		if(resource !== 'subjects') return [ data: [] as TData[], total:

		return {
			data: [],
			total:
		}
	}
}

Python

In all my years of development, I never thought Python would join this conversation. But here we are. For all intents and purposes, type hints in Python were meant to be optional. But it seems to me these hints are now becoming mandated.

Python is smart enough to infer the type of your variable and return type of your functions. What are we doing here people?

The AI Argument

“I don’t need to understand the language, the AI will do it for me”

Sure, that might be true, but what happens when something breaks and you have no clue why? What happens to your AI generated strongly typed code that you can’t parse? You’ll feed it to another AI as well?

Also, I am sure you have noticed that these companies have jacked up their prices. This is going to continue, and because you have offloaded your thinking to some model you are going to pay.


My Stance

Now, I am not saying no to types, far from it. What I am saying is learn the language and its nuances. Learn what makes it special, before you instantly decide this isn’t working and types are needed. What I constantly here is “types will help”. Help what? - When you don’t understand the underlying language?

There is a time and place for types, and that time and place is when you have learned and understood the language. Only then will what you are enforcing types on matter and make sense.

I understand the necessity of types and I also understand when they are being used a crutch.

A Small Shout out

In my fatigue of all the frameworks and all the gospel of types, I was fortunate to come across Angela Holden, who built a site for her 30 days of Vanilla JavaScript series - a commitment she undertook to improve her JavaScript, a stream everyday for 30 days. She has been a developer for over 13 years and she has chosen to work on the language, to practice, to get better at it. To understand its nuances.

Here is the site she was working on during the 30 days. Quite impressive if I do say so myself.


Wrapping Up

I am concerned, not for myself but for the ones that come after. The ones that will not have that sense of curiosity and wanting to understand because they have been spoon-fed everything.

I haven’t been writing as much as I have been navigating this new landscape we find ourselves in, as well as other pressing mattters in my private life. I can’t say when next I’ll publish something, but be assured I am watching and paying attention to it all.

A lot of you now think fundamentals don’t matter anymore, I would argue they are more important than ever.


Thank you for reading, let’s connect!

Thank you for visiting this little corner of mine. My email and DMs are always open; if you want to chat or collaborate on something, shoot me a email

Where you can also get hold of me:

Back to articles