Brandon Konkle
Brandon Konkle

Engineering Manager, type system nerd, Rust enthusiast, supporter of social justice, loving husband & father, avid comic & manga reader, 日本語を勉強してる。

I’m a Software Architect with more than 15 years of experience creating high performance server and front-end applications targeting web and mobile platforms, & today I lead a team at Formidable Labs.

Share


Tags


Why I Backed Away From Whitespace Sensitivity

Lately I've been experimenting with whitespace sensitivity in my template language (Jade) and precompilers (CoffeeScript, Sass, etc.). My initial reaction is that I love whitespace sensitivity! You don't have to type nearly as much, and you don't have to worry as much about the coding style of your collaborators because a lot of the style is enforced as part of the syntax. After giving it a lot of thought, however, I've decided to back away from it.

My biggest concern is maintainability. If someone wants to collaborate with me, they now have to learn a whole new set of domain-specific languages if they aren't already familiar with them. Most of the time, it's a bad idea to put up hurdles that your collaborators have to jump through. When looking for a collaborator I'd rather be concerned about their experience, skill, and creativity rather than their familiarity with my toolkit. I'd like them to be able to smoothly get up and running and be productive quickly, and they are much more likely to be familiar with the classic HTML, CSS, and JavaScript syntaxes.

That's not the only reason, though. Even though some of the style considerations are enforced by the syntax, everyone's style is still going to be somewhat different and you often end up worrying about it anyway despite what the syntax gives you. Even in the world of Python, which is famously whitespace sensitive, there is still a lot of variation when it comes to style. You'll often see rather large commits devoted entirely to fixing PEP8 style violations, or reworking portions of the code stlye that PEP8 leaves up to the author. Style is likely always going to be a concern, so the benefit that whitespace sensitivity adds to things like HTML or JavaScript is often negligible.

So, despite my love for it, I'm giving up whitespace sensitivity in my frontend coding. I think it's the right choice if I want to easily collaborate with others.

I’m a Software Architect with more than 15 years of experience creating high performance server and front-end applications targeting web and mobile platforms, & today I lead a team at Formidable Labs.

View Comments