[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

why dosn't ruby support // to comment?

bin liu

1/11/2005 6:38:00 AM

i think use keyboard type "//" is fast than "#" to comment one line code.

:-)

_______________________________________________
programming is my life
my blog:http://blog.itpub....
http://www.ru...



27 Answers

Alexey Verkhovsky

1/11/2005 7:12:00 AM

0

Because // is an empty regular expression.

Alex


Antonio Cangiano

1/11/2005 10:37:00 AM

0

> i think use keyboard type "//" is fast than "#" to comment one line
> code.

Alex already answered.
Furthermore Bin Liu, typing '#' is faster than '//' on my UK keyboard: it
requires only one key to be pressed rather than two. In different keyboard
layouts this may not be the case, but honestly I don't see the problem.

Cheers,
Antonio
--
My programming blog: http://antonioca...

nobu.nokada

1/11/2005 1:16:00 PM

0

Hi,

At Tue, 11 Jan 2005 15:38:21 +0900,
bin liu wrote in [ruby-talk:125995]:
> i think use keyboard type "//" is fast than "#" to comment one line code.

And also, # is necessary for shebang line.

--
Nobu Nakada


Stefan Lang

1/11/2005 3:11:00 PM

0

Antonio Cangiano wrote:

>> i think use keyboard type "//" is fast than "#" to comment one line
>> code.
>
> Alex already answered.
> Furthermore Bin Liu, typing '#' is faster than '//' on my UK keyboard: it
> requires only one key to be pressed rather than two. In different keyboard
> layouts this may not be the case, but honestly I don't see the problem.
>

On a German keyboard: Shift+7 Shift+7 to get '//' but only
one keystroke to get a '#'.

--
Stefan

Archit Baweja

1/11/2005 9:11:00 PM

0

On Tue, 2005-01-11 at 19:37 +0900, Antonio Cangiano wrote:
> Alex already answered.
> Furthermore Bin Liu, typing '#' is faster than '//' on my UK keyboard: it
> requires only one key to be pressed rather than two.

Really? Must see UK keyboard then.
Didn't know that?!

Archit




Douglas Livingstone

1/11/2005 10:15:00 PM

0

> Really? Must see UK keyboard then.
> Didn't know that?!

After a quick google:

http://rjbs.manxome.org/images/2002/exile/matts/ke...

It is just to the left of the enter key. My # is above my three, which
is easy to hit - shift on the right hand, 3 on the left.

Douglas


Josef 'Jupp' Schugt

1/12/2005 10:53:00 PM

0

bin liu wrote:
> i think use keyboard type "//" is fast than "#" to comment one line
> code.

What is faster depends on the keyboard layout. With a german keyboard
layout '#' is a single key, while '/' requires pressing two keys
simultanously. With a dutch keyboard layout (essentially NL) it is the
other way round.

If you want something that is fast and easy on almost any keyboard you
use '--'.

Josef 'Jupp' Schugt
--
Where on the ringworld does that 'Lord of the Rings' guy live?



Christian Neukirchen

1/13/2005 1:38:00 PM

0

Josef 'Jupp' Schugt <jupp@gmx.de> writes:

> bin liu wrote:
>> i think use keyboard type "//" is fast than "#" to comment one line
>> code.
>
> What is faster depends on the keyboard layout. With a german keyboard
> layout '#' is a single key, while '/' requires pressing two keys
> simultanously. With a dutch keyboard layout (essentially NL) it is the
> other way round.
>
> If you want something that is fast and easy on almost any keyboard you
> use '--'.

Too bad it has the icky taste of SQL. :)

> Josef 'Jupp' Schugt
> --
> Where on the ringworld does that 'Lord of the Rings' guy live?
>
>

--
Christian Neukirchen <chneukirchen@gmail.com> http://kronavita...


Edgardo Hames

1/13/2005 2:32:00 PM

0

On Thu, 13 Jan 2005 22:38:03 +0900, Christian Neukirchen
<chneukirchen@gmail.com> wrote:
> Josef 'Jupp' Schugt <jupp@gmx.de> writes:
> > If you want something that is fast and easy on almost any keyboard you
> > use '--'.
>
> Too bad it has the icky taste of SQL. :)
>

But, that's also a comment in Haskell ;)

Ed
--
Alcohol is the anesthesia by which we endure the operation of life.
-- George Bernard Shaw


Christian Neukirchen

1/13/2005 3:39:00 PM

0

Edgardo Hames <ehames@gmail.com> writes:

> On Thu, 13 Jan 2005 22:38:03 +0900, Christian Neukirchen
> <chneukirchen@gmail.com> wrote:
>> Josef 'Jupp' Schugt <jupp@gmx.de> writes:
>> > If you want something that is fast and easy on almost any keyboard you
>> > use '--'.
>>
>> Too bad it has the icky taste of SQL. :)
>>
>
> But, that's also a comment in Haskell ;)

Now you just made me wonder if I ever saw commented Haskell source. :P
(Not that it would be bad if I didn't...)

Bah, simply do literate Haskell. ;-)

> Ed

--
Christian Neukirchen <chneukirchen@gmail.com> http://kronavita...