If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Things That Make You Go "Hmmm..."
8 posts
• Page 1 of 1
Things That Make You Go "Hmmm..."
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?
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?
- S1User
- Posts: 58
- Joined: Thu Sep 17, 2015 4:05 pm
Re: Things That Make You Go "Hmmm..."
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:
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)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Things That Make You Go "Hmmm..."
- 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
*/
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Things That Make You Go "Hmmm..."
martinvicanek wrote:
- Code: Select all
<!--
but wait, HTML is equally bad
-->
The worst ever!
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Re: Things That Make You Go "Hmmm..."
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)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Things That Make You Go "Hmmm..."
Commodore ?
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Things That Make You Go "Hmmm..."
RJHollins wrote:Commodore ?
Certainly Sinclair Basic!
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Things That Make You Go "Hmmm..."
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.
- S1User
- Posts: 58
- Joined: Thu Sep 17, 2015 4:05 pm
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 61 guests