Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:54
    jxnu-liguobin synchronize #9765
  • 15:50
    jxnu-liguobin commented #9765
  • 15:47
    SethTisue commented #11659
  • 15:25
    SethTisue commented #9765
  • 15:14
    SethTisue edited #9765
  • 15:12
    SethTisue milestoned #11659
  • 15:12
    SethTisue demilestoned #11659
  • 15:12
    SethTisue assigned #11659
  • 15:12
    SethTisue labeled #11659
  • 15:12
    SethTisue labeled #11659
  • 14:01
    SethTisue synchronize #1488
  • 10:07
    15DV opened #2187
  • 08:46

    dwijnand on notes-2.12.15

    (compare)

  • 06:54

    lrytz on 2.13.x

    test on JDK 18-ea it's not cle… Merge pull request #9764 from S… (compare)

  • 06:54
    lrytz closed #9764
  • 06:29
    SethTisue synchronize #1488
  • 06:29
    scala-jenkins milestoned #9765
  • 06:29
    SethTisue synchronize #1488
  • 06:26
    jxnu-liguobin opened #9765
  • 06:03

    SethTisue on 2.13.x

    add fetch (#1491) (compare)

Jose C
@jmcardon
rip that's probably the SIP that I care the most about right now
trepidacious
@trepidacious
@SystemFw Ah yeah I was thinking that since _ => Nothing is the identity of Nothing it was enough, but I guess that is only enough if the type constructor was to Nothing, rather than to Maybe?
Fabio Labella
@SystemFw
see, Nothing can't be a type constructor
Jose C
@jmcardon
because opaque types being 0-cost with no .asInstanceOf casts would be so good
Fabio Labella
@SystemFw
that's where Scala is a bit weird
because Some and None have their own types
but the Functor is for Option
Martijn Hoekstra
@martijnhoekstra
it was on the agenda for last SIP meeting, but it got postponed @jmcardon - I don't know when the next SIP meeting is scheduled. Ask Jorge if you see him about.
trepidacious
@trepidacious
@SystemFw Yes it's the fact that the type constructor is Maybe that I was missing, I was kind of assuming that everything was Nothing ;)
Fabio Labella
@SystemFw
in Haskell is a bit clearer because Just can not be a type (I'm ignoring DataKinds ofc, but even in that case it's not the same)
Jose C
@jmcardon
:(
ok
thanks @martijnhoekstra
Fabio Labella
@SystemFw
yeah, Just and Nothing aren't types in Haskell at all, just constructors whose result has type Maybe a
Jose C
@jmcardon
Benching stuff, it's pretty nutty that .asInstanceOf casts can be equally expensive or more than creating a new object in the heap, as far as runtime is concerned
trepidacious
@trepidacious
@SystemFw And Nothing isn't a type constructor because it has no type parameter, whereas Const is, even though the type parameter does nothing?
Fabio Labella
@SystemFw
no
that's not the reason
data Maybe a = Just a | Nothing
the stuff to the right of = is data constructors, not types
Jose C
@jmcardon
yeah
you can't have stuff return Just I think
only Maybe
Fabio Labella
@SystemFw
in Scala you have a hierarchy of types/classes
in Haskell you have a type with variants
Just and Nothing are two things
trepidacious
@trepidacious
@SystemFw Ah ok, that makes sense. Even in Scala though None wouldn't be a type constructor because it is just a type?
@SystemFw Whereas Some actually is?
Jose C
@jmcardon
yeah
you can see it in the signature
Fabio Labella
@SystemFw
right, the important distinction here is not between type and type constructor
that doesn't matter
Jose C
@jmcardon
object None extends Option[Nothing]
Fabio Labella
@SystemFw
it's between type constructor and data constructor
the fact that Nothing/None have no arguments is not the point I'm making
let me put it this way
trepidacious
@trepidacious
@SystemFw I get that Nothing is different to a type or type constructor (at least approximately) yup.
Fabio Labella
@SystemFw
same for Just
yeah ok
Jose C
@jmcardon
@trepidacious what do you find weird about grasping re: type constructors?
trepidacious
@trepidacious
@SystemFw Yes. But it's still the case that to have a functor you need a type constructor rather than a type? I get that Just and Nothing fail even BEFORE that by not being a type OR a type constructor :)
Fabio Labella
@SystemFw
(btw, the distinction between type and type constructor is not really useful imho except in conversational talking, they're all types afterall, and we have kinds to talk about them precisely)
a Functor needs to be over a type of kind * -> *
that's what you need
trepidacious
@trepidacious
@SystemFw Is * -> * not the same as a type constructor? I thought they were just different terms for the same thing?
Fabio Labella
@SystemFw
yeah, but type constructor is not as precise
think Either
trepidacious
@trepidacious
@jmcardon I think I'm ok on that, we just ended up talking about two things at once, I didn't know about type constructors versus data constructors though
Fabio Labella
@SystemFw
that's also a type constructor
but can't be a functor