Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 01:52

    SethTisue on 2.13.x

    bring dependencies.txt up to da… (compare)

  • 01:52
    SethTisue edited #1233
  • 01:49
    SethTisue milestoned #9394
  • 01:49
    SethTisue labeled #9394
  • 01:47
    SethTisue labeled #12164
  • 01:47
    SethTisue milestoned #12164
  • 01:47
    SethTisue commented #12164
  • 01:39
    SethTisue commented #10549
  • 01:38
    SethTisue labeled #9227
  • 01:37
    SethTisue commented #12073
  • 01:37
    SethTisue demilestoned #12073
  • 01:37
    SethTisue milestoned #12073
  • 01:35
    SethTisue synchronize #1233
  • 01:32

    SethTisue on master

    this is part of the readme now (compare)

  • 01:31
    SethTisue commented #12173
  • 01:31
    SethTisue commented #12173
  • 01:29
    SethTisue commented #12173
  • 01:29

    SethTisue on master

    make CONTRIBUTING.md a literal … (compare)

  • 01:26

    SethTisue on merge-into-readme

    (compare)

  • 01:26

    SethTisue on master

    merge other files into readme a… (compare)

Harrison Houghton
@hrhino
although that's not the correct spot, because that's the bit that deals with class T { var x = 1 ; x = 2 }
the "analogously..." sentence is the applicable one
I would say it should define "setter method" as "the method in the same template with the name derived from x by appending _=", or something
segeljakt
@segeljakt
What type of polymorphism is:
def func[A,B,C](a: A, b: B, c: C) = ...
func(3, "abc", 'o')
Harrison Houghton
@hrhino
then the method has a setter method...
@klassegeljakt just your bog standard parametric polymorphism.
Martijn Hoekstra
@martijnhoekstra
I'll leave you to the specese. gl;hf
Harrison Houghton
@hrhino
nah
I'd rather just fix the bug, and let others write the specese
segeljakt
@segeljakt
ok, what type of polymorphism is
def func[T](l: T*) = ...
func(3, "abc", 'o')
Harrison Houghton
@hrhino
Exact same.
Parametric polymorphism is polymorphism done with type parameters, hence the name
Fabio Labella
@SystemFw
well, that case is weird
well, not weird
but not strictly parametric polymorphism either, it's interacting with variance and sub typing there
Harrison Houghton
@hrhino
as opposed to, say, inheritance polymorphism, which is done by having an interface as a superclass of everything you want to accept
ah, true
Fabio Labella
@SystemFw
basically in a language with no sub typing, that would be an example of parametric polymorphism that doesn't compile :)
ah, you changed it
now it doesn't compile in Scala either :)
segeljakt
@segeljakt
oh
is Seq not covariant?
Fabio Labella
@SystemFw
ah, with Seq yeah, it does
Martijn Hoekstra
@martijnhoekstra
T is inferred to be Any - so the question is also "what kind of polymorphism is def func(l: Any*) = ???; func(3, "abc", 'o')" - to which the answer is "that not polymorphism, that's just making me cry"
Fabio Labella
@SystemFw
yeah pretty much
segeljakt
@segeljakt
I thought the first one was first-class monomorphic and the second one was second-class polymorphic
I don’t know the terms strictly
Fabio Labella
@SystemFw
yeah, no
that doesn't make a lot of sense :)
Harrison Houghton
@hrhino

@martijnhoekstra

        if (treeInfo.mayBeVarGetter(varsym)) {
          lhs1 match {
            case treeInfo.Applied(Select(qual, name), _, _) =>
              val sel = Select(qual, name.setterName) setPos lhs.pos
              val app = Apply(sel, List(rhs)) setPos tree.pos
              return typed(app, mode, pt)

            case _ =>
          }
        }

so yeah, it's doing a naïve name-based lookup. if you don't feel like filing a bug, lmk and I will

segeljakt
@segeljakt
Second class = upcast to common supertype?
Fabio Labella
@SystemFw
no, that terminology doesn't really exist afaict
segeljakt
@segeljakt
"So here we have the crux of the problem — we can have first-class monomorphic function values and we can have second-class polymorphic methods, but we can’t have first-class polymorphic function values … at least we can’t with the standard Scala definitions. And yet it’s first-class polymorphic function values that we need to map over an HList … what to do?"
Fabio Labella
@SystemFw
no, first class polymorphism is a different thing
segeljakt
@segeljakt
ok
Fabio Labella
@SystemFw
it's a more advanced topic
but it's got nothing to do with what you are talking about
Martijn Hoekstra
@martijnhoekstra
@hrhino don't you give me that nme pos tpe app pt qual tr gobbledygook - I run Windows and I'm pretty sure those are just part of GNU powertools
Harrison Houghton
@hrhino
watch me. you get lhs and sel too
and my favourite, mk
segeljakt
@segeljakt
Ok, I’m wondering, how would you define what an HList is
Fabio Labella
@SystemFw
in what sense?
segeljakt
@segeljakt
compared to a regular List
Martijn Hoekstra
@martijnhoekstra

No command 'sel' found, but there are 18 similar ones

oh, thanks Bash. That's helpful.

Fabio Labella
@SystemFw
@klassegeljakt a heterogenous list
segeljakt
@segeljakt
Ok, compared to a List it preserves type information of each element. Compared to a Tuple, it abstracts over arity
Justin du Coeur, AKA Mark Waks
@jducoeur
Correct.
segeljakt
@segeljakt
is it “arity polymorphic”?
or do you call it something else