The latest rage in programming is types. Everything needs to be typed.

Let's Type All the Things

If it wasn’t built that way, then they’ll graft something on to the language to confuse newbies and help some users pretend like they’re typing their language. In reality, they’re just making Visual Studio Code happy.

Or they’ll create a new language that compiles down or transpiles to the original language, which leads to the creation of new build processes and increased waits and more annoyances.

Hello, TypeScript, whose users really just want better autocomplete.

At the same time, Perl is a reviled language that nailed types from the offset. A scalar variable is preceded by an s-looking “$”, an array is preceded by an a-looking “@”, and a hash gets the “%” which is a slight reach, but is still H-looking enough. If you’re looking at one item in that array, you refer to it as a scalar with an “$”.

You don’t need Visual Studio Code to help you figure out what “@items” is, because it’s right there in the name.

It’s basic typing in the language. If you use the wrong sigil, you get the wrong results or an error message.

And everyone called it unreadable and laughed at it.

You hypocrites.

In reality, it was just thirty years ahead of its time.

Javascript is scrambling to figure out how best to add all of Typescript into the core language. Ruby bolted something on a couple of years ago. Elixir just announced that it’s starting to add types.

Even the amazing and nigh-perfect Python skipped that typing step and is now scrambling to add one in somewhere, somehow. I should submit a Pep suggesting a “$” prefix for string types, but that leaves Sets without the obvious prefix. Lists can have the “£” character, which means it’ll be easier for British programmers to type. I’ll let someone else figure out Dictionary and Tuple types.

TLDR

Types are mostly important to make Visual Studio Code handier. Perl continues to set the standard other languages strive for, even while being the subject of all the barbs. Welcome to my blog.