List Info

Thread: Old bugs, or just old confusion?




Old bugs, or just old confusion?
user name
2006-02-13 17:50:17
--- In iolanguage@yahoogroups.com, Jon Kleiser <jon.kleiser...> wrote:
&gt; 1) r := (1 + 2) * 4 &nbsp; &nbsp;  // now gives Exception
That's a weird'n. Excerpt from an Io (20051017) session:

Io> foo := method(thisMessage code)
==&gt; method(thisMessage code)
Io&gt; foo(r:=(1+2)*4)
==&gt; foo(setSlot("r&quot; *(4), 1 +(2)))
Io> foo(r := (1 + 2) * 4)
==> foo(setSlot("r&quot; *(4), 1 +(2)))

At worst, I would expect setSlot(&quot;r", 1 +(2)) *(4). Why does it end up
next to "r&quot;? And as fun as writing code like `r := ("foo")
with("Blah")` is... how hard is it to fix?

&gt; 2) m := method(return (1 + 2) * 4) &nbsp; &nbsp;  // m returns 3
Yeah, I'm gonna side with John and just say "use the parens, Luke.";
Or, for that matter, don't bother calling 'return' here. (On the other
hand, yay poetry mode.)

> As Io is now supposed to reach "1.0&quot; in a few weeks or so, I think
> it's important to settle these questions. If they are bugs, they
> should be fixed. If they are not, some explanation should be given in
> the docs.
True, they should be noted somewhere in some "newbie" guide. At the
moment, however, I think a more important addition to the docs would
be a proto list for each object in the object browser. And, uh, seeing
as I'm doing neither right now, I ain't complainin'.

> Speaking of confusion: As I was looking through old Io problems, I
> gave this command a new try: Object curlyBrackets := getSlot(&quot;list&quot;)
> It still makes it possible to write {} to get a list, but the "value"
> returned when I entered that command, is not for me to explain:
>
> ==> method(call message argsEvaluatedIn(call sender))
That's the source code to the "list" method.
1)setSlot returns the value set.
2)In recent versions of Io, Block asString returns its source code.

///
Hi, all. I'm Devin. You may recognize me from such mailing lists as
"ruby-talk&quot; and "XpWdc". I'd like to experiment with writing a game in
Io. As such, I'll probably be posting questions relatively soon.
Here's a preview:

1. Is it just me, or is there a major memory leak in 20060127 (at
least as pertains to OpenGL/GLUT stuff, and at least on Darwin)?
2. Do any of the other Io windowing toolkit bindings allow me to
display an OpenGL panel? I'd like not to use GLUT, if possible. (I'd
like more control over the event loop.)

Devin





[1]

about | contact  Other archives ( Real Estate discussion Medical topics )