Tuesday, July 09, 2013

The console.log() to printf() conudrum

"What's the difference between console.log() and printf()" is an interesting question. One which can dive into the semantics of language, the concepts of streams, functions and object methods, past design choices and object orientated design, stack vs register, the history of language, the hierarchy of languages and this is for starters ... there's a lot to choose from.

Or it could simply result in "not a lot, they generally both print to screen". The choice of where you want to take this discussion depends upon the audience, their willingness to be involved and how willing are you to make the distinctions by fighting through some of the inevitable confusion.

I'm often faced with this choice, we all are and hence we have to be mindful of the context we find ourselves in. Most recently the same issue came up with "What's the difference between Open Source and Free Software" - well, there's a lot. For me the gulf is as large as console.log() to printf() but that's because I'm interested in the history, the culture, how it formed, the ideals, the overlap, the separation and the development of both movements.

To most, they are identical. The distinctions are lost in the magnolia of modern reporting. Does it matter? Well, that's another question - I tend to think it does but I'm well aware of how we tend to paper over the fine cracks of history to produce a digestible prose. 
Post a Comment