Should Multi-line Comments Be Depreciated ?

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Correct me if I'm wrong, but weren't things like multi-line comments put into widespread use before the proliferation of HTTP servers and web pages ?
It seems to me that cluttering up code files with long comments should be depreciated in favor of 2-3 line comments with a link to an actual documentation page and perhaps that documentation pages title. Whether you're using "/**/" or "//", you'ld still be using 4 characters to pop in a comment with a page title and URL. I'd argue that the single line form is even easier to type.
  • PolishHurricane
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1585

Post 3+ Months Ago

I think multi-lined comments are more useful for saving blocks of code that you need but don't want to be parsed and want to keep in the same file. Otherwise, yeah, they shouldn't be used. However, they're also used for documentation engines already, so I can't complain really. I also hate gigantic multi-lined comments ...AND visual studios multi-lined comment correction.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Yep, sounds like commenting out blocks of code could be a deal breaker.
  • Nucleo
  • SausagePorkPie
  • Mastermind
  • User avatar
  • Posts: 2297
  • Loc: UK - England

Post 3+ Months Ago

Often use multi-lined comments for an intro to a file, purpose, author,date etc. Sometimes it just helps when determining what the files does.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

I must be one of the few people who almost never reads the comments in code files. I read the short comments that say things like "It's done this way because of bug #12345". That's about it though.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8415
  • Loc: USA

Post 3+ Months Ago

I like to document every line of my code to tell me what each line is doing... not because I have short term memory loss but because if I give that code to someone, I don't have to spend an hour explaining why I did something that way and it's easier to notice a logical error.

I use multiple line comments before every function telling what the function does and at the beginning of every file with my notices and other fun stuff.

You could see some of my work Here. You need to be registered and logged in to view the files there though. If you get to see those files, you would be able to see what I mean by commenting on each line of PHP code.

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 99 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.