Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 06 2018 15:12
    @scalabot banned @fommil
  • Apr 19 2016 20:35
    @SethTisue banned @urmila007
soc
@soc
there are some places which require semicola which makes this troubling
Dale Wijnand
@dwijnand
No, I said remove inferred semicolons, ie. put semi-colons back into the language, like Java, because that's also your tools fault, not scalac's.
soc
@soc
I like to see the semicola, that's why I have cofigured my IDE to show them
why?
eugene yokota
@eed3si9n
so there's only one way to write Scala
soc
@soc
that doesn't mean I want to have them in the source code everywhere. same for commas.
hopefully. we are getting there.
Dale Wijnand
@dwijnand
what's wrong with having them in the source code?
get your tool to not show them to you
actually, all your tools
soc
@soc
see? because they are only relevant when I'm actually editing my code. just like trailing commas. let the IDE show them if you want.
eugene yokota
@eed3si9n
to dangle or not could be up to each project/company using style enforces, no?
soc
@soc
that's exactly why I don't want this additional variation.
this language will be the laughing stock for all detractors. Scala's marketing is bad enough already. I'd at least have one month in a year where we didn't produce embarrassing news.
Dale Wijnand
@dwijnand
it shouldn't be scalac's responsibility to infer semicolons for you, you should fix your tools to deal with them.
and while we're at it, write your types, scalac's done with inferring those too, fix your tools.
soc
@soc
this is nonsense
Dale Wijnand
@dwijnand
it's your argument
soc
@soc
no, it's not.
Dale Wijnand
@dwijnand
taken to the extreme you don't want
eugene yokota
@eed3si9n
LISP has very regular syntax, but ppl laugh exactly about that. can't control ppl
Dale Wijnand
@dwijnand
You don't want to fix all your tools to deal with semi-colons and types, you want scalac to infer those for you, well I'm done with micro-managing commas all the time in comma-separated elements, and I would like scalac to deal with it instead of me. You know, it's the computer..
soc
@soc
Scala infers line endings. that it signifies those infered line endings with semicola is a legacy artifact.
computers don't read code, humans do.
I'd have no issues with starting to disallow semicola in places where they are not needed.
but frankly, it's not an issue because people are not eager to add semicola all over the place
so we have one style for semicola, and I want to keep having one style for commas too
Dale Wijnand
@dwijnand
who's eager to add trailing commas on same-line lists?
Ichoran
@Ichoran
If you're refactoring from one line to multiple lines, it has some logic to it.
I'd really really prefer a serious attempt at comma inference. I can infer the commas to the point that I don't even notice them on multiple lines. Why can't the compiler?
Dale Wijnand
@dwijnand
I like it better too, but I don't think it would be accepted because it would make Scala too unlike Java.
My gut feeling is we have a very small "unlike-Java" budget
Ichoran
@Ichoran
Wellll we already have point free notation, which is way more unlike Java than comma inference is.
Dale Wijnand
@dwijnand
yeah, but that's last years budget :P
I'm talking about our current budget.
Ichoran
@Ichoran
Especially since, as I said, it's the newlines not the commas which I cue off of, and I think most people do given that forgetting commas in lists is a common compiler error.
Dale Wijnand
@dwijnand
Also there's talk of dropping infix notation
soc
@soc
language complexity budget doesn't magically replenish every year. when it's gone, it's gone.
that's why some people are working on removing stuff from the language, so that we get some breathing room for new worthwhile improvements.
Ichoran
@Ichoran
Chained infix notation is kind of monstrous, but I would say "don't do that" is a style decision. The "put anything infix not just symbols" rule is really nice, once you get your head around it.
It's easier and cleaner to read. Fewer distracting symbols that you never needed anyway.
But xs take k filter select map myMap dropRight drops
Dale Wijnand
@dwijnand
You're talking to the choir to me, I like infix a lot.
Ichoran
@Ichoran
is just...
Well, then we need to make a good case for why infix notation enhances the language enough to be worth the difference, if the talk of removing it is serious.
Dale Wijnand
@dwijnand
yep, see you at that SIP :P
Ichoran
@Ichoran
And I don't think it's all that hard. I mean, even x dot y for vectors is a pretty big win.
Anyway, now I have to uncatch my train :P
Seth Tisue
@SethTisue
to be clear, I think the talk is only about removing infix syntax unless something was explicitly declared @infix?
Ghost
@ghost~54f4b69115522ed4b3dcb16d
The sbt example has me commenting lines in my "scratch" project. I remember putting junit at the bottom so it would always be last. I edit build.sbt with vi, not an IDE. I insert // or occasionally delete a line dd. Why is it unreasonable to expect sbt/scalac to understand trailing comma? OK, maybe for the use case, it is sbt's burden, who knows. I agree that it's tools all the way down. But if scalac can handle it without further ado, why not do so? Because I remember having to edit foo.sbt twice because of trailing comma, just because scalac is dumb. I want those thirty seconds of my life back, plus the time to switch contexts mentally.
libraryDependencies ++= Seq(
    "com.github.alexarchambault" %% "argonaut-shapeless_6.1" % "1.0.0-RC1",
  //"com.github.maqicode" %% "regextractor" % "0.1",
  //"com.typesafe" % "config" % "1.3.0",
  //"com.typesafe.akka" %% "akka-actor" % "2.3.11",
  //"org.testng" % "testng" % "6.1.1",
  "org.scala-lang" % "scala-compiler" % scalaVersion.value,
  "org.scala-lang" % "scala-reflect" % scalaVersion.value,
  "com.chuusai" %% "shapeless" % "2.3.0",
  //"org.scalaz" %% "scalaz-core" % "7.2.0",
  //"org.scalaz" %% "scalaz-core" % "7.0.3"
  //"com.github.som-snytt" %% "expecty" % "0.9" % "test",
  //"org.scalatest" % "scalatest_2.10" % "2.0" % "test",
  //"org.scalatest" %% "scalatest" % "2.0.1-SNAP4",
  "com.novocode" % "junit-interface" % "0.10" % "test",
  "junit" % "junit" % "4.10" % "test"
)