Tool for braceless, whitespace sensitive C syntax

后端 未结 8 2434
灰色年华
灰色年华 2021-01-04 17:57

I\'m writing some C at the moment and because I like whitespace sensitive syntax, I\'d like to write it like this:

#include 

int main(void)
          


        
8条回答
  •  时光说笑
    2021-01-04 18:15

    Even if there was such a tool, I would strongly encourage you to reconsider this idea. Here are just a few problems I think you'll find with doing this:

    1. Your code will no longer be standard C.
    2. That means that you'll have a problem with other programmers reading your code.
    3. You'll also be unable to use any code-analysis tools, since they won't understand your syntax.
    4. If you've got some kind of tool that will convert on, say, every compile, that still means you'll be writing different code than you'll be reading. I would hate to use a tool that changes my code for me all the time.

    This really seems to be a case where fitting your habits to everybody else is the smarter approach.

    Hope this causes you to reconsider.

提交回复
热议问题