Brandon Konkle
Brandon Konkle

Freelance full-stack Node & React developer, supporter of intersectional social justice, enthusiastic nerd, loving husband, and father. Hire me for your next project!

I'm a Node & React developer with more than 8 years of experience creating high performance web applications and architectures. If you're looking for help with your next project, hire me today!

My Newsletter


Subscribe to my newsletter for a weekly look at the latest news, tools, and techniques from the React community.

Tags


Share


Twitter


Why I Backed Away From Whitespace Sensitivity

Brandon KonkleBrandon Konkle

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 Node & React developer with more than 8 years of experience creating high performance web applications and architectures. If you're looking for help with your next project, hire me today!

Comments