Rob Richardson wrote: > Greetings! > > My biggest complaint about Perl is the non-intuitive data structures. > The train schedule program I've been using this list as a resource for > features a Schedule class that has a collection of ScheduleDay objects, > each of which has a collection of Train objects, each of which has a > couple of attributes and an array of crew members. In C++ and Visual > Basic, both of which I am employed to write programs in, this is very > easy to write, and perhaps more important, it is very easy for somebody > else to come along and read and understand what I did. I have managed > to build these structures in Perl, but it's hard for anybody else to > understand because the code is so aggressively un-self-documenting. > Does PHP have data structures that are defined in a manner similar to > C++ or VB? If so, it would probably be worth my while to learn it. > > RobR
Hi Rob, >From my reading of PHP documentation: PHP does define classes explicitly, if that is what you mean by data structures. Once declared, also, these classes become types. PHP does not have any private variables, does have coding conventions that say you should not try to address variables beginning with a single underscore. As for other data structures--PHP use a hash fo for its array type. If you It can be used as either array or hash. Since the key is required to be unique, numerical indexing will work. You could just as easily declare a string as the index, though. Neither language is strongly typed, as C, Java, or VB are. Although both are type-sensitive, they still restrict identifiers only by contaiment class. I'd suggest that you look at Jenda's advice also. Take Perl for what it is. It works. Once you get over the difference in paradigm from C-type languages, you will find that P-OOP has it's own internal logic. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]