Structures

Paulo J. Matos pocmatos at gmail.com
Tue Nov 4 00:38:54 CET 2008


On Mon, Nov 3, 2008 at 10:19 PM, Aaron Brady <castironpi at gmail.com> wrote:
> On Nov 3, 3:45 pm, Ben Finney <bignose+hates-s... at benfinney.id.au>
> wrote:
>> "Paulo J. Matos" <pocma... at gmail.com> writes:
>>
>> > On Mon, Nov 3, 2008 at 12:32 PM, Ben Finney
>> > <bignose+hates-s... at benfinney.id.au> wrote:
>> > > I'm wondering a more fundamental question: What are structures?
>> > > That is, what do *you* mean by that term; without knowing that, an
>> > > answer isn't likely to be meaningful.
>>
>> > Well, I guess that everyone pretty much gets since it exists in
>> > every other language as struct, or define-structure, or whatever is
>> > the syntax.
>>
>> Take care with broad sweeping statements about "every other language",
>> or even "most other languages". They are usually flat-out wrong:
>> there is a stunning variety of different approaches and concepts in
>> programming languages, with very little common to even a majority of
>> them.
>
> Yea, verily.  How many languages do you think that is?  Feel free to
> count C and C++ as different ones.
>
> "Four shalt thou not count, neither count thou two...."
> http://en.wikipedia.org/wiki/Holy_Hand_Grenade_of_Antioch#Usage_instructions
>

Well, I wouldn't dare to say I know a lot of languages but the ones I
do provide mechanisms to define structures / records: C, C++, Scheme,
Common Lisp, Haskell, SML, Ocaml.
This is obviously a minority if you count all available programming
languages in the world, but I would dare to say these cover a lot of
ground.

However, I wouldn't dare to say Python needs structures to be a good
language, or anything similar. My question was more directed to : if
there aren't structures in Python, what do Pythonists use instead?
(I have seen dicts might be an alternative, but as I said in previous
post, they seem to flexible [making them a canon to shoot a fly, and
they probably lack constant-time access, right?]


-- 
Paulo Jorge Matos - pocmatos at gmail.com
Webpage: http://www.personal.soton.ac.uk/pocm



More information about the Python-list mailing list