[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: More on environments and objects
- From: Mike Pall <mikelu-0508@...>
- Date: Sat, 27 Aug 2005 16:36:35 +0200
> I have to admit that after 6 months of cogitation I have learned to
> love the colon as well. Smooth sealing since then :)
Interesting. Looks like many programmers (when new to Lua or
to its ancestor languages) experience the same learning curve.
Usually the discussions go along this path:
1. implicit local vs. explicit local.
2. static typing vs. dynamic typing.
3. specialized types vs. limited type diversity.
4. automatic type coercion vs. explicit type coercion.
5. dot-only vs. dot and colon.
6. implicit self vs. explicit self.
7. exception dispatch vs. pcall().
8. object equality vs. object identity.
9. OO vs. closures.
10. complexity vs. simplicity.
Lua is different. The familiar syntax is deceptive.
> Note how I need to pass the effective super class to the method. This
> is the crux of the problem as it requires the entire inheritance chain
> to be spelled out explicitly instead of simply using something like
5a. implicit super vs. explicit super.
My personal there's-got-to-be-a-better-way list for Lua
is pretty short nowadays (thanks to Lua 5.1):
- Yield from everywhere.
- Explicit finalization.
- Standardized module installation.
- Userdata type checks.
- Better Lua/C API (something for 6.x).
And a few minor issues with out-of-the-box behaviour:
- Hex numbers (parser + luaO_str2d with strtol fallback for non-C99)
- Missing bit operations (math.*)
- package.cpath (as of 51w6)
- Makefile (OS detection, -ldl or not, creating module dirs etc.)
- lua_Number (support for types other than double)