Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #9382
| From | Daniel Pitts <newsgroup.nospam@virtualinfinity.net> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Source code representation |
| References | (2 earlier) <j8ehuu$e58$1@dont-email.me> <2011110101533290344-angrybaldguy@gmailcom> <fhsva7tt9pavvjscl41a30ciq9s6rhuieb@4ax.com> <wiVrq.6094$am1.2643@newsfe05.iad> <g431b7pdhfid7gqojcvr39boa16ngpscgb@4ax.com> |
| Message-ID | <Axfsq.7221$Fl6.1693@newsfe06.iad> (permalink) |
| Date | 2011-11-02 10:58 -0700 |
On 11/1/11 5:33 PM, Gene Wirchenko wrote:
> On Tue, 01 Nov 2011 09:41:00 -0700, Daniel Pitts
> <newsgroup.nospam@virtualinfinity.net> wrote:
>
> [snip]
>
>> I've often thought about a "new" way of representing code, where the
>> logical structure is stored in not-necessarily-human-editable format,
>> but the tools for managing the code allow it to be presented in a format
>> chosen by the particular maintainer.
>
> 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.
Of course. The idea is that the view would be formatted to the
individual contributors taste. Including folding of constructs you don't
want to default visible, and potentially flowchart views or dependency
graphs, etc... With an model that is more than an AST, much is possible.
>
> Other people feel the same way about their formats. Miss very
> many possibilities, and you will have bad will from [|potential]
> users.
>
> 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.
>
> I was just looking through the editor settings for Dreamweaver.
> It does not do what I want.<sigh>
This is getting a little off topic, but I would like to say the IntelliJ
IDEA has a very flexible configuration for formatting that can do most
of what you want. At the same time, being personally inflexible in what
style you're willing to work in will limit your ability to work on many
teams. I recently have started working on an open-source project which
has different style than I am used to, or even prefer. Luckily, IntelliJ
IDEA can be set up to switch between styles for different projects.
>
>> In other words, you have the language constructs (classes, methods,
>> fields, statements, aspects, loops, etc...) modeled, and then have view
>> in front of that model which make them "look" like something that can be
>> manipulated easily by the programmer.
>
> A loop already can be manipulated easily by a competent
> programmer.
A single loop, yes, but aspects (joins and advice) can be more difficult
to navigate. My idea was to make *everything* easier (or no more
difficult) than it already is.
>
>> I would imagine such a system has a bit of ramp-up time, but it would
>> eventually allow you to be much more productive. The "concrete" manor
> ^^^^^^^^^^ ^^^^^
> Or it would be a straitjacket.
Some programmers I know should be in a straitjacket :-)
>
> I do not understand the captioned words as used. Should "manor"
> be "manner"?
Yes, consider that a typo :-)
>
>> that the object model stores things would allow you to refactor very easily.
>
> How would you deal with the case of syntax errors? I sometimes
> have a placeholder. A simple example would be:
> i=0;
> while (i<SomeValue*****)
> {
> <various looping statements>
> }
> The point is that I might not know exactly what the looping condition
> has to be. (In this case, I might be wondering if I will need a flag
> for early exit.) I want to able to enter a placeholder should I need
> it.
I think a good solution to that particular problem is to have an
unimplemented predicate method:
while (thisLoopShouldContinue(i) {...}
@ToImplement boolean thisLoopShouldContinue();
In general, "uncompilable fragments" would probably have to be supported
at some levels. Since the tool would maintain a structured model, the
fragments couldn't accidentally interfere with other parts of the code.
For example, and extra ")" or "}" would be localized to the context it
was entered in.
>
> VB 6 had a switch for compiling each line as entered. I did not
> like it and disabled it as part of my configuration. Sometimes, in
> mid-line, I would note that I had to change something else. When the
> option was enabled, I would move off the line and often get a syntax
> error. I knew that. I prefer to be told about compilation errors
> when I ask, not to be interrupted by an overeager compiler.
You're talking a lot about old-tech editors. Would you disable
spell-checking on a document editor? Modern IDEs will highlight errors
and warnings, without a lot of fuss. Yes, I sometimes leave a line
half-finished too, and I'm grateful that my IDE will remind me to go
back to that line when I get distracted on something else.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
code generation for the ternary operator Roedy Green <see_website@mindprod.com.invalid> - 2011-10-28 06:46 -0700
Re: code generation for the ternary operator Jaap Droogers <JaapDroogers@unusable.meel.homelinux.net> - 2011-10-28 16:07 +0200
Re: code generation for the ternary operator markspace <-@.> - 2011-10-28 08:32 -0700
Re: code generation for the ternary operator Owen Jacobson <angrybaldguy@gmail.com> - 2011-11-01 01:53 -0400
Re: code generation for the ternary operator Roedy Green <see_website@mindprod.com.invalid> - 2011-11-01 06:25 -0700
Source code representation (was: code generation for the ternary operator). Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-01 09:41 -0700
Re: Source code representation Patricia Shanahan <pats@acm.org> - 2011-11-01 13:46 -0700
Re: Source code representation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-01 16:09 -0700
Re: Source code representation Roedy Green <see_website@mindprod.com.invalid> - 2011-11-01 23:54 -0700
Re: Source code representation (was: code generation for the ternary operator). Gene Wirchenko <genew@ocis.net> - 2011-11-01 17:33 -0700
Re: Source code representation (was: code generation for the ternary operator). Roedy Green <see_website@mindprod.com.invalid> - 2011-11-02 01:19 -0700
Re: Source code representation (was: code generation for the ternary operator). Gene Wirchenko <genew@ocis.net> - 2011-11-02 09:42 -0700
Re: Source code representation (was: code generation for the ternary operator). Lew <lewbloch@gmail.com> - 2011-11-02 07:45 -0700
Re: Source code representation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-02 10:58 -0700
Re: Source code representation Gene Wirchenko <genew@ocis.net> - 2011-11-02 14:11 -0700
Re: Source code representation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-02 15:21 -0700
Re: Source code representation Gene Wirchenko <genew@ocis.net> - 2011-11-02 16:07 -0700
Re: Source code representation (was: code generation for the ternary operator). Roedy Green <see_website@mindprod.com.invalid> - 2011-11-01 23:52 -0700
Re: Source code representation (was: code generation for the ternary operator). Gene Wirchenko <genew@ocis.net> - 2011-11-02 09:47 -0700
Re: Source code representation (was: code generation for the ternary operator). Martin Gregorie <martin@address-in-sig.invalid> - 2011-11-02 20:58 +0000
Re: Source code representation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-02 15:27 -0700
Re: Source code representation Martin Gregorie <martin@address-in-sig.invalid> - 2011-11-02 23:18 +0000
Re: Source code representation Lew <lewbloch@gmail.com> - 2011-11-02 17:30 -0700
Re: Source code representation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-02 15:30 -0700
Re: Source code representation Gene Wirchenko <genew@ocis.net> - 2011-11-02 21:30 -0700
Re: Source code representation Lew <lewbloch@gmail.com> - 2011-11-02 22:07 -0700
Re: Source code representation Arne Vajhøj <arne@vajhoej.dk> - 2011-11-05 21:01 -0400
Re: code generation for the ternary operator Arne Vajhøj <arne@vajhoej.dk> - 2011-11-05 20:56 -0400
Re: code generation for the ternary operator rossum <rossum48@coldmail.com> - 2011-10-29 13:01 +0100
Re: code generation for the ternary operator Lew <lewbloch@gmail.com> - 2011-10-29 10:46 -0700
Re: code generation for the ternary operator Henk van Voorthuijsen <voorth@xs4all.nl> - 2011-10-28 08:05 -0700
Re: code generation for the ternary operator Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-10-28 15:41 +0000
Re: code generation for the ternary operator Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-10-28 10:31 -0700
Re: code generation for the ternary operator Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-10-29 03:24 +0200
Re: code generation for the ternary operator Wanja Gayk <brixomatic@yahoo.com> - 2011-10-29 00:23 +0200
Re: code generation for the ternary operator Lew <lewbloch@gmail.com> - 2011-10-29 10:50 -0700
Re: code generation for the ternary operator Wanja Gayk <brixomatic@yahoo.com> - 2011-11-01 13:36 +0100
Re: code generation for the ternary operator Michal Kleczek <kleku@poczta.onet.pl> - 2011-10-31 17:38 +0100
csiph-web