Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Root825994yStill annoys me about Ruby.
It actually does have multiline comments, but they are stupid.
=begin
Look at this shit!
It’s hideous.
And why does it begin with a freaking equals?
=end
__END__
and here is another one.
Everything after this, unto infinity, is ignored
It’s alright, I guess.
But seriously, why can’t we have the standard // and /* ... */ comments? Or maybe ### ... ### if it really really needs to be a hash? -
I for one like to know if a line is a comment by looking at that line alone, so when I grep, I don't need to look around for context. So I do
/**
* a comment
**/
This is probably one of the reason against multilines. -
@Root
We need # because of compatibility with unix hash bang (#!/usr/bin/env ruby). -
Root825994y@metamourge that could always be a special rule for the first line, as much as I hate one-off exceptions. Or the interpreter could implement both comment styles. 🤷🏻♀️
-
eo287540014y@Wisecrack
That's true, specially if you wanna comment inside of function calls:
func(
arg1,
# inline comments are fine
""" but triple-quotes would be considered a string """
)
I also hate that HTML does not allow comments inside tags
<img <!-- I can't comment here --> src="my_butt.svg"> -
eo287540014y@theabbie
Well, not in HTML, but I'm using Vue and Android's XML layout resources which use a heck lot of attributes and I just wanna document why I set some of those arguments the way they are -
Not having multiline comments is fine - it is the lack of single line comments wich keeps annoying me in CSS.
Also, comments should start with a single glyph (# prefered because it already is the standard for shell scripts).
Every language that doesn't have multi-line comments:
# Of course CodeLang supports multi-line comments!
# This is a multi-line comment!
# How dare you say otherwise!
rant