[ioke-user] Re: Blocks
- From: Ola Bini <ola.bini@gmail.com>
- To: ioke-language@googlegroups.com
- Cc: users@ioke.kenai.com
- Subject: [ioke-user] Re: Blocks
- Date: Fri, 30 Jan 2009 13:13:22 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=XUWVDoZpL8blFvvLDSf1sY0ljZTLCeMT1Ei6wYFgDc0B8zoZ9MwALn+J+PWMgcUdL6 yyrdNCIcxWrM+ggTuK2xi9GJmmAbSYZ0bW+jUN6Aeou9OW89xCpUQ+EOKsuZeZHACXpV nUTs3uRwQ9HmxoZ74TjdaRCfi9BpTL2r1L7As=
Martin Dobmeier wrote:
Please go ahead!
> Ok, I see. May I ask though why it doesn't make sense to you?
Because it's not a correct usage. If I do this:
x = fn(v, v+42)
y(x(123))
the second line will call x and send the result to y. If I make
lexical
blocks fully non-activatable, the above would send the x-block to y,
while throwing away the 123 parameter to x without touching the
code. So
it is dead code and you would never write code like that in Ioke. The
same is true for referring to something that is inherently not
activatable:
x = 42
y(x(25))
this is nonsensical. You can do it, but it's deliberately obscured
code,
since the 25 argument to x is actually not used. That is what I mean
that it doesn't make sense to me.
Thanks for clarifying that. Maybe that should be mentioned in the programming guide? I could try to write one or two sentences on that matter if you don't mind ...
--
Ola Bini (http://olabini.com) Ioke creator (http://ioke.org)
JRuby Core Developer (http://jruby.org)
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
Practical JRuby on Rails (http://apress.com/book/view/9781590598818)
"Yields falsehood when quined" yields falsehood when quined.
| Martin Dobmeier | 01/28/2009 | |
| Ola Bini | 01/29/2009 | |
| Martin Dobmeier | 01/29/2009 | |
| Ola Bini | 01/29/2009 | |
| Martin Dobmeier | 01/30/2009 | |
|
[ioke-user] Re: Blocks |
Ola Bini | 01/30/2009 |
| Martin Dobmeier | 01/31/2009 |





