Re: Source code representation (was: code generation for the ternary operator).



On Tue, 01 Nov 2011 09:41:00 -0700, Daniel Pitts
<newsgroup.nospam@xxxxxxxxxxxxxxxxxxx> 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.

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>

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.

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.

I do not understand the captioned words as used. Should "manor"
be "manner"?

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.

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.

Sincerely,

Gene Wirchenko
.



Relevant Pages

  • Re: Strange error in CLISP
    ... There are not enough arguments left for this format ... After compiling, the error is somehow lost and I get this strange ... because I'm losing the useful error message. ... Remember that Common Lisp allows implementations to open code all the ...
    (comp.lang.lisp)
  • Re: Idiom to call function from string
    ... DEF-FOO-FUNCTION redefinitions to get automatically compiled, ... (format t "Hello, world!~%")) ... ; compiling ... ; compiling (DEFUN FOO-DISPATCH ...) ...
    (comp.lang.lisp)
  • Re: [BUG] 2.6.30-rc4: compile fail with CONFIG_DRM_I915=y
    ... literal and no format arguments ... Compiling the kernel with both options as module or both options ... Subject: ACPI, i915: build fix ...
    (Linux-Kernel)
  • Re: Native Code vs PCode
    ... compile your code either in standard Visual Basic p-code format or in native ... and debugging that aren't available with p-code. ... Among the services provided by this DLL are ... Compiling a project with the Native Code option means that the code you ...
    (microsoft.public.vb.general.discussion)
  • Re: Strange error in CLISP
    ... There are not enough arguments left for this format ... After compiling, the error is somehow lost and I get this strange ... local function, using the FORMATTER macro or something that ... The concept of format directives is compiled away. ...
    (comp.lang.lisp)