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
"let's change the language because diff sucks" is an awful argument
Ichoran
@Ichoran
Anyway, I have a train to catch. And the compiler is a tool, @soc, so the question is in which tool the fix belongs, which is a question both of difficulty and appropriateness of domain.
soc
@soc
I have already seen the damage to code style caused by that. I want to have less of that, not more.
Dale Wijnand
@dwijnand
btw, there's a whole list of explanations, examples and justifications in the "Motivation" part of the document: https://github.com/scala/scala.github.com/pull/533/files#diff-f9e653a64fed5a100070a5f4df282048R23
soc
@soc
@Ichoran what I meant is that people need to fix the tools that are broken, not change a completely unrelated tool as a workaround.
Dale Wijnand
@dwijnand
then let's take out inferred semicolons?
not scalac's fault there either
soc
@soc
I'd be perfectly happy to remove semicola from the language
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