by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 09:22
    Sciss commented #5712
  • 08:36
    lrytz labeled #721
  • 08:27
    som-snytt commented #9217
  • 08:13

    lrytz on 2.12.x

    use a class and a val to avoid … Merge pull request #9216 from m… (compare)

  • 08:13
    lrytz closed #9216
  • 07:20
    lrytz milestoned #722
  • 07:20
    lrytz labeled #722
  • 07:20
    lrytz opened #722
  • 07:14
    lrytz labeled #12137
  • 07:14
    lrytz commented #12137
  • 06:12

    lrytz on 2.13.x

    patmat: Refactor away 4 asInsta… patmat: Refactor away Test's "r… patmat: commented out a debug.p… and 1 more (compare)

  • 06:12
    lrytz closed #9217
  • 06:09

    lrytz on 2.12.x

    ListMap is reverse oriented, so… Merge pull request #9218 from m… (compare)

  • 06:09
    lrytz closed #9218
  • 05:54
    kanishka-azimi closed #12157
  • 05:37

    lrytz on 2.13.x

    Update Predef doc referencing L… Merge pull request #9219 from k… (compare)

  • 05:37
    lrytz closed #9219
  • 05:30
    NthPortal synchronize #9174
  • 02:58
    som-snytt commented #9219
  • 02:24
    kanishka-azimi commented #9219
Nth/April
@NthPortal
right. so ought it not to go from the left?
Jasper Moeys
@Jasper-M
It compiles if you change + to *
"foo" -- "bar" + "baz" parses as ("foo" -- "bar") + "baz"
"foo" -- "bar" * "baz" parses as "foo" -- ("bar" * "baz")
Nth/April
@NthPortal
oh. oh I see
that... makes sense, but is not necessarily intuitive
at least to me, my brain essentially translated case "foo" -- "bar" + "baz" into being equivalent to case --("foo", +("bar", "baz"))
thanks
Hanns Holger Rutz
@Sciss
how do I add dotty to crossScalaVersions in a "scala module" project (scala-swing) that uses the "sbt-scala-module" plug-in?
looking at scala-xml but don't see an obvious point where dotty is added to the mix
should I just write crossScalaVersions += "0.27.0-RC1" ?
Guillaume Martres
@smarter
Yes
Seth Tisue
@SethTisue
@Sciss Scala modules use sbt-travisci, which sets crossScalaVersions for you, based on .travis.yml. (yes, even when running locally and not on Travis-CI)
so just add a line to .travis.yml
Hanns Holger Rutz
@Sciss
ah... great, thanks
Guillaume Martres
@smarter
ah, that's how it works!
Miles Sabin
@milessabin
Am I right in remembering that once, a very very long time ago Scala's primitive types were spelled in lowercase, ie. Int was int?
Guillaume Martres
@smarter
I have scala-1.1 here and the doc has examples with Int
som-snytt
@som-snytt
@milessabin examples using int, boolean, unit https://www.scala-lang.org/old/sites/default/files/odersky/ScalableComponent.pdf but it includes the std lib class diagram with uppercase.
Odd Möller
@odd
Seth Tisue
@SethTisue
Eric K Richardson
@ekrich
Archeologist you are.
nafg
@nafg
Were they ever the primary name, like in java and C#?
Eric K Richardson
@ekrich
In Java from the first version they always had primitives and object versions.
som-snytt
@som-snytt
A daring experiment, updating the quicksort example in PIS previously linked scala/legacy-svn-scala@10a5ae8
"Seth and the Temple of Doom"
nafg
@nafg
@ekrich but they aren't the same thing. Apparently at the point of the commit in 2008 the lowercase was a type alias for the scala stdlib AnyVal classes
I'm not sure exactly the story in C# but I believe string is lowercase and a reference type
Jasper Moeys
@Jasper-M
Martijn Hoekstra
@martijnhoekstra
In C# string is an alias for System.String
Nth/April
@NthPortal
is extending a final class a linkage error? (e.g. if you change a class to be non-final, extend it, but then link (i.e. run) against an earlier version of the class)
Harrison Houghton
@hrhino
IIRC the JVM will complain if you look like you're extending a final class, so yes
Nth/April
@NthPortal
yup, just tested and it's a java.lang.VerifyError
that's going to make a lot of things in scala-library-next more complicated
Seth Tisue
@SethTisue
@NthPortal may I suggest that you open a ticket in the scala-library-next repo for us to start hashing out what kinds of changes/additions are possible and what aren't?
Ichoran
@Ichoran
Check out how Splitters work. There are some hooks that you might be able to access if you need to get at internals.
(Though I think by now it's mostly cooperative, so the hooks are mostly the collections passing in lambdas rather than exposing semi-hidden methods.)
Nth/April
@NthPortal
kerr
@hepin1989
Proposal: Change @ to as
lampepfl/dotty#9829
som-snytt
@som-snytt
I don't think my joke about spelling it @$ got enough smileys, after Odersky said those are the two worst characters of all. Probably I'm fascinated by the worst characters. My other question is whether the debate about what goes in the scala package vs Predef has resulted in a crystalline explanation. I suppose it is the difference between "hard core" and "mere conveniences", but why are Map and Set conveniences? or Function?
Ichoran
@Ichoran
Haha. I didn't notice that you said that.
som-snytt
@som-snytt
I would be remiss if I didn't advertise at-less shrugged for the monumental PR.
Martijn Hoekstra
@martijnhoekstra
I think I heard it said that people heard it said that the choice between scala and predef is that one is somehow more foundational than the other. Maybe it'll get cleared up when we start thinking about concrete proposals for binary compatibility in 3.1+, and maybe decoupling the release schedule of (parts of) the stdlib from the compiler
som-snytt
@som-snytt
Someone asked is it pattern as p or p as pattern? which I thought apt, but given uses the order of definitions that introduce a symbol. The question is, ought we to say, def f as 42?
@martijnhoekstra I think I heard that too. Actually, I kind of wondered if it was a problem with bootstrapping at some point.
Martijn Hoekstra
@martijnhoekstra
the spec refers to scala.Seq and maybe others too at some points. I've seen that brought up as the reason for it to be impossible to have scala.collection.Seq as the varargs type, because the spec is taken to be immuable. It has a nice ring to it, scala.immutable.Spec
som-snytt
@som-snytt
I may have to add an emoji to at-less shrugged. Martin O. just like ¯\_(ツ)_/¯ let's use as.
@martijnhoekstra I agree, but there's also list and range and stuff. Is everything justified? Or is it justification in the sense of divine dispensation?
Martijn Hoekstra
@martijnhoekstra
I think it's the latter, but ¯\_(ツ)_/¯
Nth/April
@NthPortal
I would like to argue that the trimToSize() methods on ArrayDeque/ArrayBuffer/similar ought to actually do that, rather than trimming to the nearest power of 2. it's wasteful if you know you're not changing the size of the collection anymore, and it also violates the principle of least astonishment - that is, I was quite surprised to learn that trimToSize() actually behaves like trimToSomethingMaybeButHopefullyNotTooMuchLargerThanSize()
if you then append to it after trimming, by all means it goes back to a power of 2