[M3devel] Modula-3 questions
Rodney M. Bates
rodney_bates at lcwb.coop
Thu Apr 19 16:45:53 CEST 2012
On 04/18/2012 05:10 PM, penn43 at gmx.com wrote:
> Dear Modula-3 developers,
>
> I am not a Modula-3 user, but I am considering becoming one. I have already had a look at the language, and it certainly looks interesting. However, I still have some misgivings about starting learning Modula-3, since it would be a considerable time investment and I am not even sure if Modula-3 is the right tool for me.
> I hope you can help me clarify some points and dispel some doubts.
>
> The first point is that I would neither be working on large projects, nor doing systems programming. I understand these were the two major strengths of Modula-3, but neither would be useful in my case, as I would be programming mostly small- and medium-sized applications, not even industrial-level. What I need is simply a tool that can be used instead of C++ and Java. Modula-3 looks fine, because it promises to be simple. However, having read that Modula-3 was designed especially for industrial-strength and advanced uses, I am afraid that adopting Modula-3 as my development tool might be an overkill. Could you advise me in this regard?
>
C++ is 6 times more complicated than Modula-3, by reference manual page count, which is
usually a reasonable, simple way to estimate complexity. Java is 8 times, though its
reference manual is significantly less dense than most. Ada is 10 times. With room
for some minor quibbles, Modula-3 has more useful programming features than any of these,
thus the best "economy of concept", or ratio of real power to complexity.
Java is especially low on this scale, since it is quite feeble, yet has an enormous
reference manual. Particularly, all array- and record-like constructs are forcibly heap
allocated whether you need it or not, with resulting coding overhead. You always have
to allocate and either constantly NIL-check or create an argument in your head/comments
that they are always non-NIL. This is usually scattered around your code. Unnecessary
heap-allocation has execution space and time overhead too, but this would probably not
be of concern to you.
Modula-3 is also particularly good at minimizing interactions among language features.
This makes it easier to learn/use a subset of the language, with less risk of tripping
over something you haven't studied. That happens a _lot_ in C++ and Ada. If you ever
eventually want to use more features, they are there, without having to relearn the
superficial syntax, etc., of the basic stuff.
> Secondly, could you please help me understand what are the reasons for which one may prefer Modula-3 over Oberon-2/Active Oberon? I have been considering Oberon too because, like Modula-3, it promises to be simple and minimalistic.
> So, again, keeping in mind that I don't need the advanced features mentioned above, nor multithreading, does it make any sense for me to choose Modula-3 instead of Oberon, or Object Pascal?
>
If you prefer absolute minimal language complexity without regard for programming richness,
as opposed to economy of concept, the Oberon family fares better by that criterion. But I
think, even with your minimal goals, you will like some of the additional things Modula-3 has.
> Lastly, what is the current availability of Modula-3 libraries? I have read that Modula-3 has a rich set of libraries, but that was many years ago. Are there any up-to-date libraries, fulfilling today's needs? I am mostly interested in GUI support (possibly bindings to some standard GUI toolkit, like GTK or QT, or wxWidgets), internet libraries and UTF-8 support.
>
> I thank you in advance.
>
> Best regards,
>
> Marresh
>
> P.S. is the creation and maintenance of module interfaces all that trouble? I read somewhere that it is a pain, and that the inconvenience of it would only be paid off when one has to manage large projects (which is not my case).
>
>
More information about the M3devel
mailing list