jemc changed the topic of #ponylang to: Welcome! Please check out our Code of Conduct => https://github.com/ponylang/ponyc/blob/master/CODE_OF_CONDUCT.md | Public IRC logs are available => http://irclog.whitequark.org/ponylang | Please consider participating in our mailing lists => https://pony.groups.io/g/pony
erip has joined #ponylang
<erip> Hey, all. Is it possible to use a generic within a lambda?
<SeanTAllen> not sure what you mean ericp
<SeanTAllen> i cant see the error because that doesn't compile, could be kind of hard to debug.
<erip> I've tried to make it easy mode by including the error in the comment
<SeanTAllen> where's the lambda?
<SeanTAllen> o i c it
<erip> L14
<SeanTAllen> hmm, its an object literal. i'm not sure. i'm guessing no. i don't use object literals a lot, but i'm the wrong person to ask.
<SeanTAllen> i'm not going to be able to help.
<erip> Yeah, this is an interesting problem
<erip> I don't think the object literal will be constructed until a T is provided -- might be a bug
<erip> If I replace the T with an A that satisfies the constraints imposed by ponytest's assert_eq, I find something more interesting, but it seems tractable.
erip has quit [Ping timeout: 256 seconds]
mollymorphic has left #ponylang [#ponylang]
mollymorphic has joined #ponylang
_whitelogger has joined #ponylang
acarrico has joined #ponylang
mollymorphic has quit [Ping timeout: 250 seconds]
Nawab has quit [Read error: Connection reset by peer]
Nawab has joined #ponylang
_whitelogger has joined #ponylang
Foaly has joined #ponylang
endformationage has quit [Ping timeout: 240 seconds]
<vaninwagen> erip you cannot have a lambda/object literal with type parameters as those translate to an anonymous class definition and an immediate instantiation where the literal was defined. There is just one instance of that anonymous class, so type params dont make sense here :/
<vaninwagen> You can thus do sth like:
<vaninwagen> object is MyInterface[String]
<vaninwagen> end
<vaninwagen> ...
Foaly has quit [Quit: Now 'mid shadows deep falls blessed sleep.]
<vaninwagen> But you can have methods with type params on object literals
_whitelogger has joined #ponylang
Foaly has joined #ponylang
Foaly has quit [Quit: Now 'mid shadows deep falls blessed sleep.]
Nawab has quit [Remote host closed the connection]
Nawab has joined #ponylang
_whitelogger has joined #ponylang
erip has joined #ponylang
<erip> That's too bad about the generic parameter.
erip has quit [Client Quit]
Foaly has joined #ponylang
<vaninwagen> Hmmm... Actually looking at your code example, this could work. Maybe you could create an issue. Seems worth a discussion
<vaninwagen> Merry christmas btw
Nawab has quit [Ping timeout: 240 seconds]
Foaly has quit [Quit: Now 'mid shadows deep falls blessed sleep.]
endformationage has joined #ponylang
endformationage has quit [Ping timeout: 240 seconds]
Nawab has joined #ponylang
endformationage has joined #ponylang
nisanharamati has joined #ponylang
endformationage has quit [Ping timeout: 240 seconds]