sher@rochester.UUCP (01/28/85)
From: sher Sometime in the recent past I had read on the net how modula 2 was a strongly typed language but flexible enough for system programming and one which had data encapsulation built into the language. I thought "How neat! just the language to do image hacking in!" This did not work. I ran immeadiately into this problem. I needed to store images in a data structure. This data structure should be able to store any image whose elements were of the right type. Thus I started to write: TYPE Image = RECORD number_cols : CARDINAL; number_rows : CARDINAL; image : ??? There is no way to have a streach array in MODULA 2! The only variable size data structure is a linked list! (Only a lisp hacker would store an image in a linked list). Don't tell me about extensions to the language in various implementations. If I have to extend the language to do something trivial like this then that language is worthless! Note I have just speant 8 hours trying to get some code working that trys to allocate arrays whose size is only known at runtime. I tried to use the supplied loopholes and even tried using a C allocation routine. I am now giving up on this worthless language and will code from now on in C happy in the knowledge that there still is not another supported (at least here) language that is usable. (Another hole in Modula 2 that have been commented on are that one can not have constants whose values are hidden (not from the code but from the code writer). -David Sher