![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible wrote:
> (Again, I can't comment on Python, but in Haskell you *can* in fact
> still put multiple statements on a line, or spread one statement over
> several lines. It's really not stopping you from doing that.)
Python too. I don't think you could put the whole program on one line,
because I don't think you can dedent except at the end of a line.
> I have never seen any text editor ever that converts spaces to tabs -
You can ask for it in most editors.
> Becuase no editor in existence can syntax hilight Haskell?
What's the extention for Haskell source files? Can you post a snippit of
Haskell here?
> (Besides, Emacs isn't a text editor, it's an operating system! :-P )
Out of curiousity, does elisp run outside of emacs? Can emacs run without a
window open? I.e., could you write a web server in elisp?
> That does actually sound quite nice. I've never seen an editor which can
> actually do that.
Uh, visual studio?
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> I don't think that's true. http://www.haskell.org/haskell-mode/
http://projects.haskell.org/haskellmode-vim/
> Indenting is easier when the editor does it for you.
You should try an IDE that indents Python for you. It's really actually
fewer keystrokes than C-like languages, because the start-of-indent is part
of the syntax. There's an indent key and a dedent key, and you use them
*instead* of { and }.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
scott wrote:
> AutoComplete in Visual Studio Express usually gives you a line or two of
> explanation underneath the function name and parameter list - see
> attached image. After you have chosen the function, you can scroll
> through the various overloads if they exist to get more details.
Plus, as you're typing the arguments, it gives you help for each argument.
image.Draw(screen, []
and the drop-down list will say something like
float rotation
Amount to rotate the image in radians
I.e., so you know whether it's radians or degrees expected.
And this works for your own code. Even before you save the file.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> wrote:
> Python too. I don't think you could put the whole program on one line,
> because I don't think you can dedent except at the end of a line.
Even though the C and C++ languages don't require any newlines to be
used, the C preprocessor does (you can't put two #-directives in one line).
If you avoid using preprocessor directives completely (which is completely
possible, although inconvenient) you could write any C or C++ program in one
single line (or at least I can't think of any exception right now).
Not that this is a good thing per se and all in itself. Just commenting.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> (Again, I can't comment on Python, but in Haskell you *can* in fact
>> still put multiple statements on a line, or spread one statement over
>> several lines. It's really not stopping you from doing that.)
>
> Python too. I don't think you could put the whole program on one line,
> because I don't think you can dedent except at the end of a line.
Haskell really will allow you to put the entire program on line (really
long) line.
But then, in Haskell, whitespace is *optional*. You can use semicolons
and curly braces instead if you prefer. It's just that nobody ever does
(except for sticking several items on one line).
>> I have never seen any text editor ever that converts spaces to tabs -
>
> You can ask for it in most editors.
Really? Why on earth would you want to? Tabs are evil and should never
have existed in the first place! o_O
>> Becuase no editor in existence can syntax hilight Haskell?
>
> What's the extention for Haskell source files?
Plain source is *.hs, "literate Haskell" is *.lhs (That's where all text
is comments be default, and source is quoted, rather than the usual way
around.)
> Can you post a snippit of Haskell here?
What, the other groups don't have enough Haskell source in them already?
qsort xs =
case xs of
[] -> []
[x] -> [x]
x:xs ->
let
ys1 = filter (x <) xs
ys2 = filter (x >) xs
in qsort ys1 ++ [x] ++ qsort ys2
>> (Besides, Emacs isn't a text editor, it's an operating system! :-P )
>
> Out of curiousity, does elisp run outside of emacs? Can emacs run
> without a window open? I.e., could you write a web server in elisp?
No idea mate, no idea. :-)
>> That does actually sound quite nice. I've never seen an editor which
>> can actually do that.
>
> Uh, visual studio?
As documented, VS doesn't indent things the way *I* like. ;-)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New wrote:
> Plus, as you're typing the arguments, it gives you help for each argument.
>
> I.e., so you know whether it's radians or degrees expected.
Or find out what the hell the order of the argument is...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> Warp wrote:
>>> Also autoindentation of Python code is a physical impossibility.
>
>> No it's not.
>
> Clearly your definition of "autoindentation" is not the same as mine.
I guess not. I figured you meant "indenting as you type" or something. Not
"strip all indicators of block structure, followed by trying to replace
them." The editors one uses for python all indent when you start a block
automatically and keep that indent until you type the dedent character.
> No, it's not. Why not? Because whitespaces at the beginning of lines are
> a lot easier to lose than braces.
Only if the software you're using strips them out on purpose.
What you're saying is "Python using whitespace is stupid because a lot of
web sites don't treat whitespace as significant." Sure, OK, that's an opinion.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> There are many situations where you need to re-indent code, either deeper
> or shallower (and not always every line the same amount).
Your cut and paste has to be smart about reindenting the code, yes. But
that's no harder than indenting code based on { } markers.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> wrote:
> > Indenting is easier when the editor does it for you.
> You should try an IDE that indents Python for you. It's really actually
> fewer keystrokes than C-like languages, because the start-of-indent is part
> of the syntax. There's an indent key and a dedent key
In emacs there's one single key for indenting, which will indent new lines
or existing lines, regardless of where in the line the cursor is at the
moment and whether the line is currently over-indented or under-indented.
How is that "fewer keystrokes".
> and you use them *instead* of { and }.
{ and } have nothing to do with indentation. They aren't even necessary
for all code blocks.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> wrote:
> Warp wrote:
> > Darren New <dne### [at] san rr com> wrote:
> >> Warp wrote:
> >>> Also autoindentation of Python code is a physical impossibility.
> >
> >> No it's not.
> >
> > Clearly your definition of "autoindentation" is not the same as mine.
> I guess not. I figured you meant "indenting as you type" or something.
That's only *part* of it. Autoindentation works on existing lines too.
> What you're saying is "Python using whitespace is stupid because a lot of
> web sites don't treat whitespace as significant." Sure, OK, that's an opinion.
I think it's a very valid opinion taking into account the amount of
programming forums and blogs out there.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |