Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Source code representation (was: code generation for the ternary operator). Date: Wed, 2 Nov 2011 07:45:40 -0700 (PDT) Organization: http://groups.google.com Lines: 48 Message-ID: <18617042.625.1320245140423.JavaMail.geo-discussion-forums@prgt10> References: <29cla79dh934epr5n27cghvupjk77mpuqr@4ax.com> <4eaab738$0$5147$e4fe514c@dreader17.news.xs4all.nl> <2011110101533290344-angrybaldguy@gmailcom> Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 216.239.45.130 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1320245525 22653 127.0.0.1 (2 Nov 2011 14:52:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 2 Nov 2011 14:52:05 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=216.239.45.130; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9373 Gene Wirchenko wrote: > Daniel Pitts wrote: >=20 > [snip] >=20 > >I've often thought about a "new" way of representing code, where the=20 > >logical structure is stored in not-necessarily-human-editable format,=20 > >but the tools for managing the code allow it to be presented in a format= =20 > >chosen by the particular maintainer. >=20 > One problem is whether you can replicate my way. I like my code > formatted a certain way. If your tool can not do this, I will not > like using it. I will avoid it if at all possible. >=20 > Other people feel the same way about their formats. Miss very > many possibilities, and you will have bad will from [|potential] > users. >=20 > I was wading through the editor settings for Visual Studio and > ended up having to shut off a lot of the formatting, because the > formatting done was not to my taste. >=20 > I was just looking through the editor settings for Dreamweaver. > It does not do what I want. For workaday programmers, house style is also an issue. Whatever your part= icular preference, at work you have to put the braces and indentation where= the boss says to. (Ah, I see Roedy made the same point.) But prettifiers exist and are quite common and highly customizable. Some s= hops take advantage of this, letting programmers goof up on style a little = and cleaning it up on the way in to the VCS. Regardless, I don't know that there is an intermediate format to store sour= ce code that improves upon, well, source code. The usual intermediate form= at is object code. Decompilers certainly exist and work well. As for your particular predilection to store invalid code in source, well, = that's just bad practice. Oh, not while it's sitting in your editor or IDE= , but that use case doesn't call for an intermediate format. The one that = could, were it not for the aforementioned superiority of simply storing the= damn source, what's the big effing deal?, is when you share the code, at w= hich point you certainly won't want non-syntactic code going forth. DBTB - = Don't Break The Build! --=20 Lew