[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [proposal] Libary changes
- From: Sebastien Lai <237482@...>
- Date: Wed, 12 Oct 2011 10:25:29 +0200
On Tue, Oct 11, 2011 at 7:40 PM, Tim Caswell <tim@creationix.com> wrote:
> Sebastien, there is no need to take offense. It's hard to gauge what
> you know based solely email conversations. (Heck it's even hard after
> having a one hour job interview in person).
>
You're right, I slightly overreacted.
> FWIW, I agree that lua dumps way too much in the global space. It's a
> bad practice and usually when I bring it up to people, the response
> is. "Hmm, I haven't thought about, you're right we probably shouldn't
> do that"
>
The PHP devs are going through the same right now. For the longest
time, PHP dumped virtually *everything* into the global namespace. Now
they've got namespaces, and it's still bad:-)
> As far as my experiment, here is what I've got so far:
> https://github.com/creationix/luvit/blob/master/lib/luvit.lua#L1-12
>
> It breaks a lot of third-party code, but to me it's worth it to have a
> cleaner global. That's my personal taste, but I'm putting my "code
> where my mouth is".
>
If I'd ever have to do something as radical as that (for example, when
implementing a buildsystem based on Lua), I'd just stick to getfenv.
But that's what I'd do - it always depends on the context, of course.
> We're all going to be in this field for many years to come. Let's
> remember that there are real people on all sides of an email thread.
Yes.
- References:
- [proposal] Libary changes, Sebastien Lai
- Re: [proposal] Libary changes, Sam Roberts
- Re: [proposal] Libary changes, Sebastien Lai
- Re: [proposal] Libary changes, Petite Abeille
- Re: [proposal] Libary changes, Sebastien Lai
- Re: [proposal] Libary changes, Dirk Laurie
- Re: [proposal] Libary changes, Sebastien Lai
- Re: [proposal] Libary changes, Dirk Laurie
- Re: [proposal] Libary changes, Sebastien Lai
- Re: [proposal] Libary changes, Dirk Laurie
- Re: [proposal] Libary changes, Sebastien Lai
- Re: [proposal] Libary changes, Michal Kottman
- Re: [proposal] Libary changes, Sebastien Lai
- Re: [proposal] Libary changes, Tim Caswell