<mankyKitty>
so much win when that happens, apart from just general warm and fuzzies
mytrile has quit [Quit: Connection closed for inactivity]
triangle345 has joined #ponylang
pyon has joined #ponylang
jemc has joined #ponylang
montanonic has joined #ponylang
triangle345 has quit [Ping timeout: 264 seconds]
dynarr has joined #ponylang
mytrile has joined #ponylang
atk has joined #ponylang
dynarr has quit [Quit: A merry Christmas to all, and to all a good night!]
bb010g has joined #ponylang
montanonic has quit [Ping timeout: 244 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
jemc has quit [Ping timeout: 258 seconds]
_andre has joined #ponylang
srdjan_ has joined #ponylang
<srdjan_>
hi all
<srdjan_>
I have a question about a feature/bug in pony.
<srdjan_>
the following program does not compile:
<srdjan_>
actor Main new create(env: Env) => let f = lambda()(this) => None end
<srdjan_>
I get the following error message: actor Main new create(env: Env) => let f = lambda()(this) => None end
<srdjan_>
I get the following error message: Error: /home/d063142/prog/pony/print/main.pony:4:22: syntax error: expected capture after ( let f = lambda()(this) =>
<srdjan_>
Is it possible to capture 'this' in lambda?
<srdjan_>
On the other hand, the following program compiles correctly: actor Main new create(env: Env) => let t : Main = this let f = lambda()(t) => None end
<srdjan_>
So, when I assing 'this' to 't', I am able to capture 'this'?
<srdjan_>
What is expected behavior?
Foo_ has joined #ponylang
Foo_ has quit [Client Quit]
Praetonus has joined #ponylang
jemc has joined #ponylang
jeremyheiler_ has joined #ponylang
jonrh_ has joined #ponylang
SeanTAllen_ has joined #ponylang
darach_ has joined #ponylang
ericbmerritt_ has joined #ponylang
hakvroot_ has joined #ponylang
otremblay_ has joined #ponylang
Candle_ has joined #ponylang
darach has quit [Ping timeout: 260 seconds]
SeanTAllen has quit [Ping timeout: 260 seconds]
hakvroot has quit [Quit: No Ping reply in 180 seconds.]
ericbmerritt has quit [Ping timeout: 260 seconds]
jonrh has quit [Ping timeout: 260 seconds]
jeremyheiler has quit [Ping timeout: 260 seconds]
strmpnk has quit [Ping timeout: 260 seconds]
emilbayes has quit [Ping timeout: 260 seconds]
puzza007 has quit [Ping timeout: 260 seconds]
otremblay has quit [Ping timeout: 260 seconds]
Candle has quit [Remote host closed the connection]
jeremyheiler_ is now known as jeremyheiler
SeanTAllen_ is now known as SeanTAllen
jonrh_ is now known as jonrh
darach_ is now known as darach
ericbmerritt_ is now known as ericbmerritt
strmpnk has joined #ponylang
puzza007 has joined #ponylang
emilbayes has joined #ponylang
mytrile has quit [Quit: Connection closed for inactivity]
mytrile has joined #ponylang
dynarr has joined #ponylang
_whitelogger has joined #ponylang
graaff has joined #ponylang
jemc has quit [Ping timeout: 240 seconds]
psylvain has joined #ponylang
montanonic has joined #ponylang
dynarr has quit [Ping timeout: 258 seconds]
graaff has quit [Quit: Leaving]
sima has joined #ponylang
Matthias247 has joined #ponylang
jemc has joined #ponylang
mcguire has quit [Ping timeout: 244 seconds]
pyon has quit [Quit: Fix config.]
mytrile has quit [*.net *.split]
srenatus[m] has quit [*.net *.split]
mankyKitty has quit [*.net *.split]
srenatus[m] has joined #ponylang
mankyKitty has joined #ponylang
mytrile has joined #ponylang
mankyKitty has quit [Ping timeout: 258 seconds]
_andre has quit [Quit: leaving]
psylvain has quit [Quit: Leaving]
mankyKitty has joined #ponylang
sima has quit [Quit: Leaving]
jemc has quit [Ping timeout: 264 seconds]
jemc has joined #ponylang
pyon has joined #ponylang
<doublec>
srdjan_: did you resolve your problem?
<doublec>
srdjan_: I don't think you can capture 'this' that way - I've encountered it too.
<doublec>
srdjan_: this is probably a keyword
<doublec>
srdjan_: maybe try: let f = lambda()(t = this) ...
<Praetonus>
Capturing `this` as is in a lambda is probably impossible because a lambda is an object and therefore `this` doesn't refer to the parent object when defining a lambda
<Praetonus>
But this is a quite terrible error message. I think it can be improved easily
Praetonus has quit [Quit: Leaving]
montanonic has quit [Ping timeout: 250 seconds]
Matthias247 has quit [Read error: Connection reset by peer]