ruby / TryRuby

This 4th iteration of TryRuby is a website where you can learn the Ruby language.
https://try.ruby-lang.org
MIT License
226 stars 97 forks source link

Add comments to the Left Out article #27

Closed posadaj closed 6 years ago

posadaj commented 6 years ago

I thought the Try Ruby website was a good concise intro to Ruby's syntax. But I thought the additional article "What I’ve left out" was missing comments! I think this absolutely needs to be included.

easydatawarehousing commented 6 years ago

Excellent suggestion, thanks. Maybe it would be useful to mention that a # comment can be after a statement. For example:

x = 2 # Lets start with two

And maybe add that =begin / =end can't have any whitespace to the left? Personally I never use this style of commenting.

posadaj commented 6 years ago

Good idea.

Right. And neither do I. I usually work in an editor and use the feature of commenting multiple lines by using a lot of single line comments. I still think it's good to mention the syntax for multiple line comments as it's a common feature of most (all?) languages.

easydatawarehousing commented 6 years ago

Perfect, thanks.