Re: Eu's good design (sequences in other languages)
- Posted by Ken Rhodes <ken_rhodes30436 at yahoo.com> Aug 20, 2003
- 423 views
Does anyone here have any knowledge of the programming language GLEE? I know it has sequences. Can't remember how I came across the sight a few years ago. It struck me that "GLEE" sounded a bit like "Euphoria" and I wondered if it had been created by someone who had been exposed to Euphoria. http://withglee.com/Frames/GFMain.htm --- David Cuny <dcuny at LANSET.COM> wrote: > > > Andy Serpa wrote: > > > I think Lua may have something like sequences as > well... > > No, it's uses hash tables. It a lot of respects, it > *looks* like a sequence. > For example, you can write: > > s = { "cat", "dog", "pig" } > > and it's the same as writing: > > s = { [1]:"cat", [2]:"dog", [3]:"pig" } > > which is exactly the same as writing: > > s = {} > s[1] = "cat" > s[2] = "dog" > s[3] = "pig" > > Table keys are non-positional, which is entirely > different from Euphoria. For > example: > > - When you iterate through a Lua table, you have no > guarantee that the > elements will come back in any paticular order > > - You can't return slices from a Lua table > > - You can't insert an element between two elements > in a Lua table. > > Despite the differences, Lua shares a lot in common > with Euphoria: > > - It's very structured > - It's built around a single, highly flexible > datatype (the hash table) > - Details like garbage collection are hidden from > the user > - It aims to keep the core small and fast > > There are a striking differences, however: > > - Lua allows variables to be declared on the fly > - Major versions are often incompatible with prior > versions > - Lua is primarily intended as an embedded scripting > language > - Lua generates bytecodes instead of shrouded code > > I think Lua is the language Euphoria is most akin > to, and It's interesting to > compare the two. > > -- David Cuny > > > > > TOPICA - Start your own email discussion group. > FREE! > > >