ME FIRST GAMES
Menu
games for me and you
![]() Yes, this is a thing. Hold onto your butts and welcome to Tabs vs Spaces. The contrived but important argument. 📌 The thing to stress here is consistency and you should adhere to the standard for whatever project you're working on. 📌 For new projects, you should define a clear standard of whether tabs or spaces will be used. Alignment issues can be caused when you mix the two, just ask Python. 📌 Tabs can easily be customized by programmers, setting them to two, four, or please don't, eight space width. If you're not careful with your coding style, changing this setting may break text alignment in your codebase. e.g. function parameters being aligned with tabs and spaces. 📌 A programmer with poor eyesight may use larger font sizes and a smaller tab width to save screen space. This kind of adjustment can't be done using spaces. 📌 Spaces set a visual standard that will be consistent among all editors and external tools. You don't have to worry about 8 space tabs in your diff tool or Github. 📌 Tabs saving disk-space is negligible in 2020. 📌 Smart tabs can be used in may IDE's, allowing you to hit tab and automatically insert x amount of spaces for you. ⭐️ I've used both in different projects for many years and didn't find any real productivity boost from either. ⭐️ I've grown to really dislike alignment coding styles that you can use with spaces. I prefer indentation. ⭐️Many legacy projects and third party libraries have text alignment and use spaces. Dive into external code and it may appear incorrectly if you a different tab-width. ⭐️ Headaches come from people using different tab space width. Even with a style guide, alignment issues and spaces will slip through the cracks with many devs working on the same project over time. ⭐️ After 15 years of programming, my preference is smart tabs, tab-width 2. However, I'm flexible on the matter. Use the best tool for the job.
0 Comments
Leave a Reply. |
Me First Games is an independent game studio dedicated to creating unique and bizarre video games.
Red MatterStar Impact is an upcoming adventure platformer coming to PC, Mac, and Linux.
Archives
April 2021
Categories |
Copyright (c) 2020 Me First LLC
|