Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:54
    ivan-klass edited #344
  • 00:53
    ivan-klass edited #344
  • 00:51
    ivan-klass opened #344
  • 00:23
    ivan-klass commented #269
  • Feb 06 22:11
    Linyxus opened #16845
  • Feb 06 21:17
    ncorreia starred lampepfl/dotty
  • Feb 06 19:17
    scf37 labeled #16844
  • Feb 06 19:17
    scf37 labeled #16844
  • Feb 06 19:17
    scf37 opened #16844
  • Feb 06 17:12
    sjrd commented #16839
  • Feb 06 17:12
    sjrd synchronize #16839
  • Feb 06 16:48

    bishabosha on main

    Copy Scala 2's Spec Scala 2 Sp… Add copy of reference as TODO … Add docker for website generati… and 9 more (compare)

  • Feb 06 16:48
    bishabosha closed #16825
  • Feb 06 16:39
    mbovel unlabeled #16820
  • Feb 06 16:39
    mbovel labeled #16820
  • Feb 06 16:39
    mbovel assigned #16820
  • Feb 06 16:35
    mbovel unlabeled #16815
  • Feb 06 16:34
    nicolasstucki assigned #16815
  • Feb 06 16:34
    tgodzik commented #16816
  • Feb 06 16:34
    andrew-boyarshin starred lampepfl/dotty
Sébastien Doeraene
@sjrd
That would not be binary compat for those identifiers, but it could be bin compat for everything else while keeping the encode/decode bijective.
I wonder why that wasn't done from the start.
Guillaume Martres
@smarter
What if I want to call a Java method with a $ in it?
or override one
odersky
@odersky
Source-level $ is often written to do some interop with low-level Java code. You don’t want you $s to be encoded in this situation.
Alex Zolotko
@azolotko
Are there any plans to support package-private exports?
I mean, export clauses that restrict the visibility of the exported definition. Something like,
private[akka] export obj.something
Alex Zolotko
@azolotko
Found an answer at https://contributors.scala-lang.org/t/having-another-go-at-exports-pre-sip/2982/5
Sorry, I should've look there before asking.
Seth Tisue
@SethTisue
I was going to tweet about lampepfl/dotty#5923 but I feel like somebody from the Dotty team should do the shouting from the rooftops
Harrison Houghton
@hrhino
:tada: congrats!
Guillaume Martres
@smarter
I was thinking we'd announce it as part of the next release blog post
Oron Port
@soronpo
Wow!
Sébastien Doeraene
@sjrd
What's the protocol for bringing in partest tests from scalac into dotty? I fixed an issue that is tested by the upstream test https://github.com/scala/scala/blob/2.13.x/test/files/run/t9516.scala: how do I port/enable that test into dotty, to test my fix?
Guillaume Martres
@smarter
@sjrd If it's already in Dotty under tests/pending or tests/disabled or something like that you move it, otherwise you just copy-paste it from scalac
Sébastien Doeraene
@sjrd
It doesn't appear to be there at the moment.
So just copy the test and its checkfile into tests/run?
Guillaume Martres
@smarter
yes
Sébastien Doeraene
@sjrd
OK thanks.
Guillaume Martres
@smarter
putting a reference to the corresponding fix in scalac in the commit message is also nice
Sébastien Doeraene
@sjrd
of course
Guillaume Martres
@smarter
psst, while you're looking at primitive ops in the backend, you might also want to port https://github.com/scala/scala/pull/7435/files :)
Sébastien Doeraene
@sjrd
TBH I'm focusing on things that get me closer to implementing and testing the Scala.js backend.
For the int-shift-long I needed the fixes in the constant-folder, and I couldn't reasonably fix the constant-foler but not the backend...
Andrey
@sugakandrey
@smarter after watching a video on types in dotty, I was under the impression that something like Function1[String, Int] was encoded as a RefinedType and not AppliedType, but looking into the codebase it looks like it is AppliedType after all. Also, the docs and the comments mention that each case in match type is either an unary function or a type lambda over unary function, but now there is some synthetic MatchCase type. Is it just implementation details or were there any underlying problems with previous encodings?
Guillaume Martres
@smarter
@sugakandrey Yeah the refinement encoding for applied types was abandoned a while ago
Andrey
@sugakandrey
Also, are there plans to adapt SLS to dotty/3.0? :)
Guillaume Martres
@smarter
First, because we couldn't make it work well enough with higher-kinded types (https://infoscience.epfl.ch/record/222780/files/p51-odersky.pdf), then we tried to use it only for applying class types but it didn't seem worth it, and it made handling of wildcard applications more complicated (you want to be able to distinguish C from C[_], but if you encode application as refinement you can't really do that)
Yes, eventually the spec will be updated
Andrey
@sugakandrey
Makes sense, thanks for the clarification. Looking through the commit history, it looks like the MatchCase is a fairly recent addition.
Matthew Pocock
@drdozer
hey - I've got some higly parameterised code that's ended up building heavily left-nested tuples e.g. (((((((((((((String, Int), String), String), Char), Int), Char), String), Char), Int), Char), pdb.HelixClass), String), Int)
Is there a way to combine a new element onto the right of an existing tuple that doesn't cause this profligate nesting?
Guillaume Martres
@smarter
String *: Int *: String *: Unit should work
The last element must be Unit or a tuple
Matthew Pocock
@drdozer
thanks - is there a typeclass or whitness to that?
def f[A, B](a: A, b: B) = a *: b needs something to say that B is a type with *:
Guillaume Martres
@smarter
this is just syntactic sugar for tuples
or more precisely, in Dotty the type (A,B) is syntactic sugar for the type A *: B *: Unit
Matthew Pocock
@drdozer
thanks - adding the type bounds B <: Tuple has caused a compiler crash ...
(Compile / compileIncremental) java.nio.file.NoSuchFileException: /drone/src/github.com/lampepfl/dotty/library/src-3.x/scala/Tuple.scala
shall I open an issue?
Martin Egri
@megri
@smarter I've always thought Unit is just a type and () is its singleton instance. Is it a symbol in Dotty?
Guillaume Martres
@smarter
What ?
Unit is a type and () is the single instance of that type yes
not sure what you mean by symbol
Martin Egri
@megri
Oh I misread your earlier comment. So in Dotty tuples can be created like 1 *: 2 *: 3 *: () ? :)
Neither am I to be honest ;) I always mix up types and terms and symbols and those abstract words.
Well, Types are pretty obvious.
Jakub Kozłowski
@kubukoz
Has new type Foo = Int been considered as syntax for opaque types? It doesn't require any new keywords (unlike opaque)
Also, A *: () is totally kiss syntax