March 15, 2006 Re: Interesting language comparison article [OT] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | Ah, yes, that's a good point as well. I'm very careful to only use reasonable-quality editors, such as Visual Studio (which actually auto-corrects this issue and clears lines that are just whitespace if you don't type anything on them.)
And, another point about tabs is that it makes it a lot easier to navigate code with the carrot. I always assume people who hate hard tabs must not like arrow keys or something....
-[Unknown]
> Unknown W. Brackets wrote:
>> That's only because they are used inconsistently. The general rule is that tabs should never be used after a non-tab character on a line. Bam, instant portability and everyone gets their own tab size.
>
> That's a good rule, but you also need to make sure that lines with tab indentation aren't being mixed with lines with space indentation. Most editors don't enforce this, but it ought to be solvable. The problem with tabs might simply be that so many text editors don't handle them correctly.
|
March 15, 2006 Re: Interesting language comparison article [OT] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley skrev: > "Hasan Aljudy" <hasan.aljudy@gmail.com> wrote in message news:dv84il$1q3l$1@digitaldaemon.com... >> Stick to the tab key all you want. I want to kill the ascii code for the "so called" tab character!! > > I never understood this whole hard-tab-hating stuff. Everything lines up on nice neat columns, they can be set to whatever width you want, and it's much quicker to move through them using the arrow keys. What's so great about spaces? I think Emacs is to blame for many of the problems with hard tabs. Emacs doesn't use tabs for indentation. It uses spaces. Tabs are used to optimize the number of spaces needed. The problem with this is that the tab width isn't standardized. (8 used to be more or less the standard, but not anymore) This has some implications. If you use emacs with 3 character indentation, (and the default 8 character tab width) you get: (. is space, - is tabbed space) ...if (1) { ......if (1) { --------.if (1) { --------....if (1) { --------.......if (1) { ----------------..if (1) { etc... (The Phobos and DMD front end sources are an example of using 4 character indentation and width 8 tabs: ....for (i = 0; i < global.params.objfiles->dim; i++) ....{ --------if (i) --------....cmdbuf.writeByte('+'); Even when you use the same tab width as indentation width, you get problems when lining up lists, like: void myfunc(int firstArgument, --------....int secondArgument, --------....int thirdArgument) IMO, the best strategy would be to use tabs for indentation and spaces for alignment. That way, the code would look good at any tab-size setting (adjustable by user preference) and arguments would still line up properly. /Oskar |
March 15, 2006 Re: Interesting language comparison article [OT] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Unknown W. Brackets | Unknown W. Brackets wrote: > Ah, yes, that's a good point as well. I'm very careful to only use reasonable-quality editors, such as Visual Studio (which actually auto-corrects this issue and clears lines that are just whitespace if you don't type anything on them.) This is why I said it's kind of a high level concept. Too many complicated tasks to take care of. The low cohesion principle says that hard-wired tab character should be removed because putting it in ascii code makes things way too complicated, when they should be very simple! Tabs are not elementary; spaces are. > > And, another point about tabs is that it makes it a lot easier to navigate code with the carrot. I always assume people who hate hard tabs must not like arrow keys or something.... You know .. I wasn't there (where "there" refers to the whole computer scene) before mice & guis. I generally think that arrow keys are not the way to go for browsing text. Just use a mouse! > > -[Unknown] > > >> Unknown W. Brackets wrote: >> >>> That's only because they are used inconsistently. The general rule is that tabs should never be used after a non-tab character on a line. Bam, instant portability and everyone gets their own tab size. >> >> >> That's a good rule, but you also need to make sure that lines with tab indentation aren't being mixed with lines with space indentation. Most editors don't enforce this, but it ought to be solvable. The problem with tabs might simply be that so many text editors don't handle them correctly. |
March 15, 2006 Re: Interesting language comparison article | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kyle Furlong | Kyle Furlong wrote:
> Sean Kelly wrote:
>
>> It's an interesting article with some quotable tidbits, but that the author ended by praising Ruby with such enthusiasm made me skeptical of his earlier claims. I also thought it was a bit odd that his section on Lisp was really a section on Emacs. About the only conclusion I could draw is that "Emacs is awesome and the tool of uber gurus, and Emacs is tightly integrated with Lisp, therefore Lisp is uber cool but also only for uber-gurus." And even that's a stretch.
>>
>>
>> Sean
>
>
> Emacs is extremely difficult to grok for someone brought up in the RAD era.
>
> It gives me a headache trying to use it "like a guru"
>
> :-P
Real "gurus" don't need computers; they carry everything in their head!!! /sarcasm
Seriously, why does relying on old technology makes a person a "guru"?
|
March 15, 2006 Re: Interesting language comparison article | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hasan Aljudy | Hasan Aljudy wrote:
> Kyle Furlong wrote:
>> Sean Kelly wrote:
>>
>>> It's an interesting article with some quotable tidbits, but that the author ended by praising Ruby with such enthusiasm made me skeptical of his earlier claims. I also thought it was a bit odd that his section on Lisp was really a section on Emacs. About the only conclusion I could draw is that "Emacs is awesome and the tool of uber gurus, and Emacs is tightly integrated with Lisp, therefore Lisp is uber cool but also only for uber-gurus." And even that's a stretch.
>>>
>>>
>>> Sean
>>
>>
>> Emacs is extremely difficult to grok for someone brought up in the RAD era.
>>
>> It gives me a headache trying to use it "like a guru"
>>
>> :-P
>
> Real "gurus" don't need computers; they carry everything in their head!!! /sarcasm
>
> Seriously, why does relying on old technology makes a person a "guru"?
Actually, that wasn't my point at all. Editing text in Emacs is, once learned, many times faster than "normal" text editing. My point was that this method of editing takes much practice and latent skill to master. Yes Emacs is old, but old does not mean outdated or less useful, in this case it means (almost) bug free.
|
March 15, 2006 Re: Interesting language comparison article | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hasan Aljudy | > The "Tab" keyboard button should just be a `macro` for 4 spaces, not a
> separate character!!
If you were using emacs you could change to that in 1/2 a second :P.
Charlie
Hasan Aljudy wrote:
> J C Calvarese wrote:
>
>> In article <dv4uo9$1337$1@digitaldaemon.com>, Hasan Aljudy says...
>>
>>> Charles wrote:
>>>
>>>> > IMHO that article is more making fun of languages with which
>>>> > the author doesn't like than anything else.
>>>>
>>>> Yes, but alot of his rants ring true for me. Like whitespace and python , any language that makes whitespace meaningful is hard to take seriously.
>>>
>>>
>>> That's a completely irrational argument.
>>
>>
>>
>> I disagree. Python will complain about invisible errors due to its reverence for
>> whitespace.
>>
>> I wasted a ridiculous amount of time before I figured out that Python wouldn't
>> compile my program because it saw a difference between a tab and the equivalent
>> number of spaces. Now I know what I did was wrong, but a tab and several spaces
>> still look identical on my screen. IMHO Python would be better if it used
>> something visible (such of {}, begin/end, etc.).
>>
>> jcc7
>
>
> Good point.
> I say the clurpit is the evil tab character, it should be removed from all computer systems in the world!! :P
> The "Tab" keyboard button should just be a `macro` for 4 spaces, not a separate character!!
|
March 15, 2006 Re: Interesting language comparison article [OT] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hasan Aljudy | How in the world can you write code efficiently with a mouse? If I had to use my mouse with any sort of frequency, it would probably halve my efficiency right there. Then again, I've gotten comments about my speed before.
I did a lot of programming in DOS. It's all about knowing your keyboard. I don't even have to worry about saving anymore, it's a knee-jerk reaction - I just hit Alt-F-S every then and again like some people breathe. Do you use your mouse for that too?
And even back then, there were editors that handled tabs well - but none that handled italics. It's not that hard to get right, some people just don't try anymore these days.
-[Unknown]
> Unknown W. Brackets wrote:
>> Ah, yes, that's a good point as well. I'm very careful to only use reasonable-quality editors, such as Visual Studio (which actually auto-corrects this issue and clears lines that are just whitespace if you don't type anything on them.)
>
> This is why I said it's kind of a high level concept. Too many complicated tasks to take care of.
> The low cohesion principle says that hard-wired tab character should be removed because putting it in ascii code makes things way too complicated, when they should be very simple!
>
> Tabs are not elementary; spaces are.
>
>>
>> And, another point about tabs is that it makes it a lot easier to navigate code with the carrot. I always assume people who hate hard tabs must not like arrow keys or something....
>
> You know .. I wasn't there (where "there" refers to the whole computer scene) before mice & guis.
> I generally think that arrow keys are not the way to go for browsing text. Just use a mouse!
>
>>
>> -[Unknown]
>>
>>
>>> Unknown W. Brackets wrote:
>>>
>>>> That's only because they are used inconsistently. The general rule is that tabs should never be used after a non-tab character on a line. Bam, instant portability and everyone gets their own tab size.
>>>
>>>
>>> That's a good rule, but you also need to make sure that lines with tab indentation aren't being mixed with lines with space indentation. Most editors don't enforce this, but it ought to be solvable. The problem with tabs might simply be that so many text editors don't handle them correctly.
|
March 15, 2006 Re: Interesting language comparison article [OT] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Unknown W. Brackets | Unknown W. Brackets wrote:
> How in the world can you write code efficiently with a mouse? If I had to use my mouse with any sort of frequency, it would probably halve my efficiency right there. Then again, I've gotten comments about my speed before.
>
> I did a lot of programming in DOS. It's all about knowing your keyboard. I don't even have to worry about saving anymore, it's a knee-jerk reaction - I just hit Alt-F-S every then and again like some people breathe. Do you use your mouse for that too?
>
> And even back then, there were editors that handled tabs well - but none that handled italics. It's not that hard to get right, some people just don't try anymore these days.
>
> -[Unknown]
I wasn't talking about coding, but about browing.
I always hit ctrl-s subcounciously, even more, I always hit ctrl-a ctrl-c when I post anything on the net.
I was talking about "browsing" code.
If you know your shortcuts, you should also know that ctrl-arrow takes you to the next word aotumatically, no matter how many spaces/tabs there are. I've seen work in DOS too.
|
March 15, 2006 Re: Interesting language comparison article | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charles | Charles wrote:
> > The "Tab" keyboard button should just be a `macro` for 4 spaces, not a
> > separate character!!
>
> If you were using emacs you could change to that in 1/2 a second :P.
>
> Charlie
>
I know, alot of edtiros have that option, but not all of them, hence the inconsistency.
It should be that way *everywhere*.
|
March 15, 2006 Re: Interesting language comparison article [OT] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Unknown W. Brackets | Unknown W. Brackets skrev:
> How in the world can you write code efficiently with a mouse? If I had to use my mouse with any sort of frequency, it would probably halve my efficiency right there. Then again, I've gotten comments about my speed before.
I would agree with you totally had I not watched one particular professor coding using only his mouse. Copy-paste, copy-paste,... He was incredibly fast. Unbelievable. He only resorted to using his keyboard when really necessary, like typing in a new identifier or similar. So, you can code efficiently with a mouse. I've seen it. :)
/Oskar
|
Copyright © 1999-2021 by the D Language Foundation