Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept leading semi for line comment #10105

Open
scabug opened this Issue Dec 13, 2016 · 11 comments

Comments

Projects
None yet
2 participants
@scabug
Copy link

scabug commented Dec 13, 2016

Weary of endless github wars over comment formatting? Wouldn't it be nice if Scala recovered the semicolon, which is on the brink of extinction, for line comments? Only if it is the leading non-whitespace.

  // boring
  val x = 42

  /** Annoying sparkles in my eyes.
    * With the weird indentation.
    */
  val y = 17

  ; exciting! punctuated equilibrium in language evolution
  ; I could go on and on about how it doesn't look like Java.
  def z = ???

  ; I space them qua separators
  for (v <- vs ; w <- ws if v < w) yield (v, w)
@scabug

This comment has been minimized.

Copy link
Author

scabug commented Dec 13, 2016

Imported From: https://issues.scala-lang.org/browse/SI-10105?orig=1
Reporter: @som-snytt
Affected Versions: 2.12.1

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Dec 13, 2016

@milessabin said:
Shouldn't we have "-- " to be fully Haskellator compliant?

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Dec 14, 2016

@SethTisue said:
when's the next Scala Comment Syntax Improvement Process meeting...?

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Dec 14, 2016

@milessabin said:
Around the time Hell next freezes over I think.

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Dec 14, 2016

@som-snytt said:
San Francisco just had a frost.

Also, Scala Center issued a Request for Comments.

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Dec 15, 2016

@lrytz said:
I would also love to see

REM my commet

That would really help with the context switching on those days where you go back and forth between batch scripts and Scala.

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Dec 15, 2016

@SethTisue said:
I'm all for REM, but only if it's the Applesoft BASIC REM, not the DOS batch file REM.

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Jan 24, 2017

@som-snytt said:
Double semi is especially useless, pace the original reporter.

;; looks like a walrus in certain fonts, I think
;; two eyes and cute little tusks
;; or possibly that weird spider with the beady eyes
def iam = "walrus"

That works if Scala doesn't adopt forever syntax, for (;; ). Extra space to avoid winky emoji.

I often accidentally insert // in my shell scripts, so it would be great if double hash were also supported. It could resolve to this.## if that typechecks and a line comment otherwise.

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Feb 8, 2017

@som-snytt said:
Twitter found the previous convo. How long must the people suffer?

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Feb 8, 2017

@dwijnand said:
The recovering bashistas are formally requesting # for single-line comments.

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Feb 8, 2017

@som-snytt said:
Deprecating ## for hashCode to enable more comment styles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.