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

Closed
scabug opened this issue Dec 13, 2016 · 12 comments
Closed

Accept leading semi for line comment #10105

scabug opened this issue Dec 13, 2016 · 12 comments

Comments

@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
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
Copy link
Author

scabug commented Dec 13, 2016

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

@scabug
Copy link
Author

scabug commented Dec 14, 2016

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

@scabug
Copy link
Author

scabug commented Dec 14, 2016

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

@scabug
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
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
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
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
Copy link
Author

scabug commented Feb 8, 2017

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

@scabug
Copy link
Author

scabug commented Feb 8, 2017

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

@scabug
Copy link
Author

scabug commented Feb 8, 2017

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

@som-snytt
Copy link

This effort has been superseded by Commentless Scala, which removes support for all comments, in favor of the commentator interpolator. SIP # is TBD, but the feature is tentatively scheduled for 2.14.

@som-snytt som-snytt closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants