Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rochester.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!rochester!sher From: sher@rochester.UUCP Newsgroups: net.lang Subject: Modula 2 an insufficient language (mild flame) Message-ID: <5839@rochester.UUCP> Date: Mon, 28-Jan-85 04:09:22 EST Article-I.D.: rocheste.5839 Posted: Mon Jan 28 04:09:22 1985 Date-Received: Tue, 29-Jan-85 07:08:07 EST Sender: sher@rochester.UUCP Organization: U. of Rochester, CS Dept. Lines: 34 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