From: Curtis Dyer on
On 02 Mar 2010, Julienne Walker <happyfrosty(a)hotmail.com> wrote:

> On Mar 2, 7:04�am, Curtis Dyer <dye...(a)gmail.com> wrote:
>> On 24 Feb 2010, James Harris <james.harri...(a)googlemail.com>
>> wrote:

<snip>

>> > - i.e. "char*" can be misleading.
>>
>> I think mainly to newcomers, but I can't imagine it being too
>> misleading for most C programmers.
>
> I fail to see how char* x; is any more misleading than char *x;.
> Either way the gotcha of char *x, y; still exists.

Right, but visually, "char *x, y" more clearly demonstrates what
the declaration actually means. Realistically though, I doubt it
would be an issue for anyone, say, past their first week of
learning C.

<snip>

> Alternatively you could sidestep the issue with typedef:
>
> typedef char* pchar;
>
> pchar x, y;
>
> Personally I'm not a fan of hiding levels of indirection behind
> a typedef, but whatever floats your boat.

Nor am I, but Microsoft sure seems to be found of that style.

> Ah, much ado about a trivial matter. Such is the way of clc. ^_^

But discussions about good style is Serious Business. :-)

--
"Don't worry about efficiency until you've attained correctness."
~ Eric Sosman, comp.lang.c
From: Lorenzo Villari on
On Tue, 02 Mar 2010 17:27:13 -0500
Joe Wright <joewwright(a)comcast.net> wrote:

> It's WordStar for Unix. It's well written and functional. Why would
> you be revolted by it? What's wrong with a DOS editor? 1980 was a
> really great year. Get a grip.
>
> My most used editor on Windows is EDIT.COM and on Unix of course, vi.
> I do use the GUI IDE from Visual FoxPro but normally write C and
> xBASE from the command line with EDIT.
>

I have to ask: what's the point nowadays of using a text mode only
editor, apart from hardware restrictions and years of use? I guess
that's "Masochistic answers to Stylistic questions on UNIX C coding"...
From: Julienne Walker on
On Mar 3, 6:56 am, Curtis Dyer <dye...(a)gmail.com> wrote:
> On 02 Mar 2010, Julienne Walker <happyfro...(a)hotmail.com> wrote:
> > On Mar 2, 7:04 am, Curtis Dyer <dye...(a)gmail.com> wrote:
> >> On 24 Feb 2010, James Harris <james.harri...(a)googlemail.com>
> >> wrote:
>
> >> > - i.e. "char*" can be misleading.
>
> >> I think mainly to newcomers, but I can't imagine it being too
> >> misleading for most C programmers.
>
> > I fail to see how char* x; is any more misleading than char *x;.
> > Either way the gotcha of char *x, y; still exists.
>
> Right, but visually, "char *x, y" more clearly demonstrates what
> the declaration actually means.  Realistically though, I doubt it
> would be an issue for anyone, say, past their first week of
> learning C.

That's my opinion as well. I've helped a *lot* of beginners over the
years, and at the moment I can't recall a single instance where there
was a problem due to the "misleading" placement of an asterisk. Common
problems tend to be independently discovered by virtually every
beginner, so I'm inclined to say that it's not really the big problem
that some paint it out to be.

> > Ah, much ado about a trivial matter. Such is the way of clc. ^_^
>
> But discussions about good style is Serious Business. :-)

Not serious enough to warrant endless debate. Bracing styles, tabs vs.
spaces, indentation amount, it's all subjective. As long as a
reasonable style is used, it's not going to seriously impede one's
ability to read code using that style.
From: Ersek, Laszlo on
In article <20100303140159.04b04a3e(a)kubuntu>, Lorenzo Villari <vlllnz(a)tiscali.it> writes:
> On Tue, 02 Mar 2010 17:27:13 -0500
> Joe Wright <joewwright(a)comcast.net> wrote:
>
>> It's WordStar for Unix. It's well written and functional. Why would
>> you be revolted by it? What's wrong with a DOS editor? 1980 was a
>> really great year. Get a grip.
>>
>> My most used editor on Windows is EDIT.COM and on Unix of course, vi.
>> I do use the GUI IDE from Visual FoxPro but normally write C and
>> xBASE from the command line with EDIT.
>>
>
> I have to ask: what's the point nowadays of using a text mode only
> editor, apart from hardware restrictions and years of use? I guess
> that's "Masochistic answers to Stylistic questions on UNIX C coding"...

One point might be "screen real estate"

http://www.usabilityfirst.com/glossary/term_573.txl

aka "no clutter".

I use NEdit and joe. Both are very frugal. NEdit for higher-profile
editing sessions, joe for the smaller stuff (commit messages, quick
script edits when I'm anyway in the command line, or when editing
remotely and forwarding X over ssh would be inconvenient for some
reason).

pico (pine's editor) for e-mails (I use pine) with occasional forks to
joe (for pasting / editing code in e-mails). I used Icedove
(Thunderbird), but it choked on my IMAP account. webmail is
catastrophic.

LSEDIT on OpenVMS -- I'm writing this message in it. ^Z enters command
mode, "fill" reformats the paragraph, "exit" saves and exits.

Cheers,
lacos
From: Malcolm McLean on
On Mar 3, 3:01 pm, Lorenzo Villari <vll...(a)tiscali.it> wrote:
>
> I have to ask: what's the point nowadays of using a text mode only
> editor, apart from hardware restrictions and years of use? I guess
> that's "Masochistic answers to Stylistic questions on UNIX C coding"...
>
A lot of big computers still don't have windowing systems. Their
cycles are too expensive to be used on updating GUIs.
Someone somewhere will one day produce a client that lets you edit a
text file, stored on a mainframe, on a PC or workstation GUI. However
I haven't yet seen such a system. Uploading files by ftp manually is
too much of a nuisance.

First  |  Prev  |  Next  |  Last
Pages: 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
Prev: integer
Next: shared memory question