[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How about removing the underscores from metatables?
- From: Axel Kittenberger <axkibe@...>
- Date: Thu, 27 Jan 2011 15:52:56 +0100
The similarity been drawn here to __python__ __magic__ should sound
just as well a warning bell, as to the win32 api (the most horrible
api I've ever worked with).
On Thu, Jan 27, 2011 at 3:41 PM, KHMan <keinhong@gmail.com> wrote:
> On 1/27/2011 10:24 PM, Mateusz Czaplinski wrote:
>>
>> On Thu, Jan 27, 2011 at 11:20 AM, steve donovan wrote:
>>>
>>> On Thu, Jan 27, 2011 at 12:13 PM, Axel Kittenberger wrote:
>>>>
>>>> any content of metatables? My guess that newbies are so freightened
>>>> from metas is just exactly the __syntax.
>>>
>>> Hm, I don't think newbies should worry themselves about metatables.
>>> They are a subtle concept and the underscores are the least part.
>>
>> Personally, I do agree with that view.
>
> The anxiety is likely because the first document newbies get hold of is the
> reference manual in the sources. Trouble is, these things become really
> clear when there are a lot of samples or recipes to examine. The ref man
> does not really help with that; the PIL book is the one to read. Or the
> wiki. Same with weak tables...
>
>> I'd also like to note, that AFAI remember, Python does also give some
>> sematic meaning to a double-underscore prefix (I think that's for
>> private fields in a class, and their names are internally suffixed
>> with something special in such a case). So there are at least two
>> members in this club.
>
> But they are just conventions right? I don't think that's really an issue.
> Looking at code samples is the way to banish all those anxieties. Remember
> how we start to learn the Win32 API? We run a program to create a basic
> window and we have no idea what all those parameters really do, but
> eventually we muddle along fine helped by a ton of code snippets...
>
> --
> Cheers,
> Kein-Hong Man (esq.)
> Kuala Lumpur, Malaysia
>
>