Forum OpenACS Development: Response to Suggested change to the API browser

Collapse
Posted by Jamie Rasmussen on
You can easily be burned by lack of coloring too - On several occasions I've opened up a big C file in notepad, not noticed that a huge chunk of code was /* commented out */ ...

Clearly, coloring nouns and verbs in a novel would be ridiculous, but I see coloring code more like using larger boldtype for a section heading. It allows you to scan for content you're interested in. For example ad_proc has lots of escaped brackets and dollar signs. With colors I can tell at a glance which parts are evaluated immediately and which are destined for the uplevel. But I'm happy to make the formatting optional, I know not everyone works the same way I do. And I do think B&W mode could be useful for preparing printable docs.

Writing / borrowing a full parser might be the "correct" way to do this formatting, but it wouldn't be very easy to implement or incorporate into people's existing setups, even with something like ParseTools as a head start. And my code is parser-ish, it does some tracking of context (are we in quotes, a comment, etc.)

On a tangent, all of this talk of code formatting makes me want to start work on dotHACKER, a vertical app for software developers. We've got some of the building blocks already - the SDM, bug trackers, version control, an API browser. If we toss in some stuff for automated builds, maybe some graphical merging tools, we really could rival SourceForge. I'm halfway serious. 😊