[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: web_comments.png (4 KB, 240x190)
4 KB
4 KB PNG
why can't we use the same symbols for commenting
>>
>>108483583
because fuck you thats why
>>
>>108483583
<!-- --> is objectively shit tier. fuck whoever thought that was a good idea.
// should default to multi line until the next //
>>
>>108483591
It's probably slightly easier to parse since XML end tags already use /.
>>
# I always prefer that hash comment syntax
>>
>>108483583
the fact that /* */ can't be nested is dogshit design and one of the few strikes against C i can think of
<!-- --> is just hell to type out
// is kewl, tho
>>
>>108483780
Why would you even want to nest them? It makes no sense
>>
>>108483799
Sometimes I want to comment on a comment. Get over it tranny
>>
>>108483799
if i want to comment out a block of code that already has block comments within it, i'm SOL
>>
>>108483583
Because keyboards don't want to add a new symbol we could use exclusively for comments that would free up the rest.
>>
>>108483835
Unicode has almost as many symbols as you have genders. Get gud fgt
>>
>>108483841
if it's not one key-press away on standard keyboards, it fails.
The comment symbol beside tilde would be ideal in my opinion.
>>
>>108483799
>>108483813
This. For example in Java /** */ is used for docstrings and now you can't easily comment out the whole block.
>>
>>108483853
>The comment symbol beside tilde would be ideal in my opinion.
are referring to the hash sign?
>>
>>108483583
Sure, let us name 3 languages respectively for those styles.
Now make 3 lexers, one for each language, that works with all 3.
>>
>>108483583
Best: --
Good: //, /* */
Trash: (* *)
Boomer: c, ;
ScriptSlop: #
>>
>>108483811
You would just write a comment (like this) using brackets (you nigger).
>>
>>108484746
Patrician: REM
>>
>>108483583
# and \ are good enough you don't need more.
>>
>>108483780
Cause nested brackets aren't a regular language.
Although it's somewhat of an excuse - no one is forcing your lexer to be regular - it's running on a Turing machine anyway - use it.
>>
>typing comment symbols manually
use an IDE or even a good text editor and commenting / uncommenting is just a single key combo

>>108483813
while annoying when it happens, it's a sign that the code isn't of the highest quality to begin with
but with an IDE you can still just select all the lines to be commented and hit Ctrl+/ or whatever and have all lines commented; select commented lines and hit that again to uncomment
>>
>>108483811
Are your comments so terse they require a comment explaining them? Why not just switch it to a multiline?
>>
>>108483583
It should be ;;.
>>
File: file.png (238 KB, 1920x1080)
238 KB
238 KB PNG
>>108483811
i do this
>>
>>108484953
>it's a sign that the code isn't of the highest quality to begin with
What absolute horseshit.
>>
>>108485048
Oh look, a child predator.
>>
>>108485080
meds
>>
I just let AI handle the comments, so I don't really care
>>
>>108485100
If you mean chemical castration meds, yes, highly recommended.
>>
>>108485125
>I just let AI handle the comments,
This is redundant: "so I don't really care"
>>
>>108485141
why are you seething?
>>
>>108485060
you're commenting out code rather than removing code. commented out code is not executed and it doesn't describe any live code, so it should be removed altogether.
if you're commenting code out as a way of temporary and reversible removal - again, use an IDE: you can just remove code, then revert it again from a previous version (even without Git, just local file/change history)
>>
>>108485149
>seething
Seems like you have a brain problem. How unfortunate for you.
Merriam-Webster
https://www.merriam-webster.com › dictionary › seething
The meaning of SEETHING is intensely hot : boiling.
>>
>>108485188
>so it should be removed altogether.
Absolute horseshit.
>>
>>108485203
what's your non-horseshit excuse for commenting out code, then?
>>
>>108485196
its insane how much of leftist discource is them pretending not to understand things
>>
>>108485220
>excuse
Why does it need to be excused? You are missing the point, unsurprisingly.
>>
>>108483591
>// should default to multi line until the next //
Why? That's what /* is for.
>>
>>108485188
Retardation
>>
>>108483583
You can

<!-- duh -->
>>
<!-- --> and /* */ are both retarded because you can’t nest them. The ML one is especially annoying when you’re working with XAML (yes I’m sometimes a .NETfag).

At least in C/C++/C# you have #if 0 or #if false
>>
>>108485345
only point is your code is shit and you're demanding to have it easier to shit it up further
>>
>>108483583
im commenting right now without using any of that gay hacker shit
>>
>>108485500
><!-- --> and /* */ are both retarded because you can’t nest them.
but you can make them span multiple lines (that includes splitting a long line into a few smaller ones without having to add comment symbols for each line), as well as inline them - for example:
f(int x, int y /* no z */) {
>>
>>108485597
>your code is shit
>you're demanding
More horseshit.
The point, ΨDK, was that I pointed out your horseshit statements.
>>
File: 921.png (1019 KB, 1689x835)
1019 KB
1019 KB PNG
>>108485716
>The point, ΨDK, was that I pointed out your horseshit statements.
>>
File: hnnnnnng.jpg (165 KB, 747x599)
165 KB
165 KB JPG
>>108485745
wow, beated me at me own game, m8y.
>921.png
rofl
>>
>>108485220
optional configuration parameters that you expect to enable or disable in a near future version but dont yet want to enable
it is sometimes more convenient to have it there to set/document expectations than have it magically appear

during draft/wip/review versions where you have suggestions for how to do something but the other code for it is not yet implemented but it is helpful to leave the proposed way there as commented out code
>>
File: comments.webm (593 KB, 744x562)
593 KB
593 KB WEBM
>>108485783
i don't consider configuration files as code
even if, a descriptive comment explaining the options is better than just dropping commented out lines of configuration. with the first you probably wouldn't comment/uncomment options in bulk anyway
and even then, commenting and uncommenting lines (either single or multiple) is a non-effort when using key shortcuts
>>
>>108485926
it is common in python to do configuration as code with functions and parameters
>>
>>108485926
>i don't consider configuration files as code
hurr how do configuration files work
durr I wonder if code has anything to do with
Go be stupid somewhere else. >>>/v/
>>
File: yellow_dog.png (31 KB, 180x162)
31 KB
31 KB PNG
>>108485990
wow, such intelligence and wisdom. Look at how stupid you are. You post shit opinions and then can't even comprehend
>configuration parameters
lol, and then like a clueless moran post an ESL reaction image.
>>
>>108484859
>Cause nested brackets aren't a regular language.
any language that includes parenthesis isn't a regular language (that includes C and derivatives))
>>
>>108483583
Because you're using the wrong symbols, like a retard.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.