Things That Make You Go "Hmmm..."

For general discussion related FlowStone
Post Reply
S1User
Posts: 58
Joined: Thu Sep 17, 2015 4:05 pm

Things That Make You Go "Hmmm..."

Post by S1User »

One of those random things that make you wonder why it is...

I wonder why Ruby uses a modified key character for comments? (#) It's obvious switching between multiple languages, Ruby, Lua, VB, the relative annoyance of having to use the CTL mod to get to it.

LUA: --
VB: '
Ruby: CTL+3 (#)

Was it maybe the case that when they created Ruby the # key was a standard exposed key or something?
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Things That Make You Go "Hmmm..."

Post by tulamide »

Indeed, you made me go "hmmm..." ;)
Are you aware that there is a great number of keyboard layouts? You will never find that one 'comment instruction sign' valid for all of them. US has '#' at shift+'3', vietnamese on Alt Gr + '3', canadian french on the key left to '1', italian on Alt Gr + the key far right in the third row, german on that very same key but without Alt Gr, etc.

I would experience the same as you but in VB, because that '-sign is a combination on my keyboard.

Btw, you can also comment like so in Ruby:

Code: Select all

=begin
I am a fantastic comment
(...write as many lines as you wish...)
=end
"There lies the dog buried" (German saying translated literally)
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: Things That Make You Go "Hmmm..."

Post by martinvicanek »

Code: Select all

=begin
that's about the least intuitive multiline comment coding I know
=end

<!--
but wait, HTML is equally bad
-->

/*
I really like C style
*/
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Things That Make You Go "Hmmm..."

Post by Perfect Human Interface »

martinvicanek wrote:

Code: Select all

<!-- 
but wait, HTML is equally bad
-->

The worst ever!
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Things That Make You Go "Hmmm..."

Post by tulamide »

martinvicanek wrote:/*
I really like C style
*/
[/code]

Not that I like it much, but at least it's been there for ages. Why don't just all agree on one kind of commenting like C. At least Javascript, PHP and Arduino (but maybe more) use the same syntax // and /* */

And older ones will certainly know where this comes from:

Code: Select all

REM No multiline comment support
REM but we used to comment as little as possible xD
"There lies the dog buried" (German saying translated literally)
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: Things That Make You Go "Hmmm..."

Post by RJHollins »

Commodore ?
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Things That Make You Go "Hmmm..."

Post by Spogg »

RJHollins wrote:Commodore ?

Certainly Sinclair Basic!
S1User
Posts: 58
Joined: Thu Sep 17, 2015 4:05 pm

Re: Things That Make You Go "Hmmm..."

Post by S1User »

Yeah. I kinda hate code editors that don't have shortcuts for things like that, where you can't just select a block of code and hit CTL+Whatever to comment out a block 'o code.
Post Reply