[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Another nil/false proposal
- From: nop@...
- Date: Thu, 17 Jan 2002 11:01:25 -0600 (CST)
On Mon, 14 Jan 2002, David Jeske wrote:
> <sarcastic jibe>
> Then, if we can just add exceptions and build a module system, we'll
> be 1/2 way to Python! (where I write most of my code these days)
> </sarcastic jibe>
I think we're already most of the way there.
Lexical scoping can be a really good foundation for modules, in that
it's a simple mechanism with wide applicability.
Exceptions, well, I'm annoyed by current Lua behavior, but I don't
have a proposal off the top of my head. I'll post my observations on
call() later.
So why not use python? What's Lua's niche?
For starters, there's size.
nop@slothrop:~/python1.5-1.5.2.orig$ size python ~/lua/bin/lua
text data bss dec hex filename
315675 34448 7680 357803 575ab python
102175 2716 32 104923 199db /home/nop/lua/bin/lua
That python executable has everything but pcre compiled out of it. In
terms of features, it should be comparable.
Executable size itself is important to some people, but it's also an
indicator of the complexity of the language.
The huge performance wins of Lua over Python in the shootout are
certainly suggestive of efficiency.
Features like sockets and posix bindings are clearly outside of the
core language in Lua.
You don't need to teach people about indentation in order for them to
use Lua.
I don't use enough Python to enumerate the positive ways Python is
different from Lua, aside from the obvious (attribute/indexing
distinction, more "tag methods", official object system).
Jay