2002-12-14 00:11:40 UTC
Looking at how Dialect's class and objects work (a lot like python's), the Frame and the Class/Object could definately be merged.
I'm not saying that Dialect was meant as a NewtonScript clone- NewtonScript differs a lot on a number of points, but I was just curious if they saw it as a smart place to start, perhaps making it a bit more like BASIC for those who might be coming from a VB world.
Interesting example you give. Given the relative dynamism of Dialect, it should be quite easy to write a little function that makes a real object out of a frame, like so:
fr = {
a: 10,
b: 20,
sum: func()
return this.a + this.b
endfunc,
cross: func()
return this.a * this.b
endfunc
}
fr = obj(fr)
print fr.cross(), cr
print fr.add(), cr