Ok we can "pretty print" but having something that could auto-indent code would really be:
A. Nice
B. A differentiator (nobody else has this... at least that I have seen).
It may also help new programmers learn a proper indention style.
Ok I *KNOW* the no one would be able to agree on indention styles and people would be saying that their eyes bleed because of WHATEVER choice we made for a default indention style for a particular language... but in future upgrades you could maybe add customizations.
Add AStyle (or similar) to DIC Code box?
Page 1 of 13 Replies - 5908 Views - Last Post: 06 November 2012 - 11:37 AM
Replies To: Add AStyle (or similar) to DIC Code box?
#2
Re: Add AStyle (or similar) to DIC Code box?
Posted 13 August 2012 - 11:10 AM
I'm thinking that wouldn't work for languages like Python where indentation is significant.
#3
Re: Add AStyle (or similar) to DIC Code box?
Posted 28 August 2012 - 08:36 AM
That's why it needs to occur on a language by language level. If it doesn't make sense to indent, then there should be no correction. However, it seems like a good idea for languages like C, C++, and Java, ...
#4
Re: Add AStyle (or similar) to DIC Code box?
Posted 06 November 2012 - 11:37 AM
I have mixed feelings about this, however - it might just be worth the risk.
Things I'd see as a must in v0.1 of this thing:
- incorporated into ''code'' tag, so ''[code style=STYLE]'' where STYLE could be e.g. "k&r", "1tbs", "allman", "gnu", etc. That style would be applied client-side, obviously. It would also mean that moderators could easily add a style to OP to show them how to indent code.
- it would need to have client-side "change style" feature, including "show original".
- it might be an idea to add "force style" to personal settings, however for this to make sense code box would need to know that its contents are in specific language (C, C++, Java,...), or only work in specific boards.
I'd vote on "let's experiment!", after all if we do that and it ends up as crap, we can just get rid of it, and know better next time. Unless "we" already do know better?
And no, there would be no war over styles... I mean, come on, everybody knows the 1TBS is the best.
Things I'd see as a must in v0.1 of this thing:
- incorporated into ''code'' tag, so ''[code style=STYLE]'' where STYLE could be e.g. "k&r", "1tbs", "allman", "gnu", etc. That style would be applied client-side, obviously. It would also mean that moderators could easily add a style to OP to show them how to indent code.
- it would need to have client-side "change style" feature, including "show original".
- it might be an idea to add "force style" to personal settings, however for this to make sense code box would need to know that its contents are in specific language (C, C++, Java,...), or only work in specific boards.
I'd vote on "let's experiment!", after all if we do that and it ends up as crap, we can just get rid of it, and know better next time. Unless "we" already do know better?
And no, there would be no war over styles... I mean, come on, everybody knows the 1TBS is the best.
Page 1 of 1

New Topic/Question
This topic is locked



MultiQuote





|