Tuesday, May 11, 2010

"Stringly Typed" Code

One of several programming slang terms posted on Global Nerdy:

A riff on strongly-typed. Used to describe an implementation that needlessly relies on strings when programmer- and refactor-friendly options are available.


I really hate stringly typed code. It's convenient for a while, but it grows all kinds of weird bugs over time. Almost every conceivable corner case in the format [sic] tends to be broken, because they have to be reimplemented in every bit of code that processes the string.

I usually call it out as Alan Perlis's "stark data structure", but "stringly typed code" has a much better ring to it.

2 comments:

Unknown said...

Love it. I'm absolutely going to start using that term!

Bram said...

I like char* based APIs in C. They make the caller and callee very loosely coupled. No struct/enum/typedefs/defines that need sharing, just pass character pointers to each other.
It makes forward declarations easier, shortens header dependency chains.