Re: wishlist : structures

new topic     » goto parent     » topic index » view thread      » older message » newer message

©koda wrote:

> Two good reasons why structures are needed:
>
> - More stable code (acessing sequence members 
>   that don't exist causes error now) 

Following Robert's argument that 'quietly initializing variables to zero' is
a bad thing, I would expect an error if I tried to access sequence members
that don't exist.

> - More easy and organized programming 
> (my[3] turns to my.width)

Currently, one of the biggest problems with named indexes is namespace
collisions. I don't see adding namespaces as making this a lot nicer; with
namespaces, you would write:

   my[rect.width]

This isn't compellingly better than:

   my[RECT_WIDTH]

Personally, I'm leaning toward implementing them as associative lists (like
JavaScript or Python).

Another feature that people want is for structures to map into C structures.
This would make it easier to interface to the 'outside world' via DLLs.

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu