[M3devel] "target specific pragmas"?
Olaf Wagner
wagner at elegosoft.com
Thu Feb 14 09:12:09 CET 2008
Quoting Jay <jayk123 at hotmail.com>:
> I'll try to repeat myself less and ramble less, and stay constructive...
That would be great. It's really nice that there is much more discussion
here since you joined and much more work on the Windows targets, but
it would still even better if you could (a) be less sarcastic (which
tends to annoy some others) and (b) think once again before hitting
the send button. On some days there's even so much traffic here that
I can only browse the headers (there are dozens of other mails I need
to pay close attention to).
> You can't just be the antithesis of C. You have to decide what it is
> about C that is wrong and fix it or do it over.
> And then of course, agreement on what is wrong. I probably see less
> wrong than you.
> Bad module system -- #include.
> Bad module system -- preprocesor which kills or damages other
> efforts at language-aware tools.
> Beyond this, at the moment, I am unsure.
C is good for special kinds of system programming, with very
experienced users and a code base that can still be controlled by
a few minds. Large projects tend to stretch these bounds easily.
For large projects taking place in a commercial environment with
many teams and well-specified layers and interfaces, M3 is IMO
much better suited than C (or C++, or even Java), though ironically
it's not really used there (which is a pity).
> I have "argued for" C++ for further "problems" in C, but I have
> "grown" (or shrunk? :) ) to appreciate that C might not be as bad as
> I used to think.
I like C much better than C++; it's small and can be useful. C++ is
way too large and complex and has never been exactly defined. When
we used to program point of sale systems in the early 90s for a
company here in Berlin, we had two large files of more than 1200 pages
which was the upcoming C++ spec draft. Nobody has ever read even
1/10 of it. We tried about half a dozen compilers, each with nice
features, but they were completely incompatible, and cost much
efforts to keep code even syntactically accepted.
> If you start over completely from scratch, you should still look at
> what is out there.
Well, we're not doing that here (starting from scratch).
M3 is a well-defined and well working language, and the community
here likes to use it. I'm not against language changes in general,
but they need to be considered very well if we really want to
improve the language. Addition of a portable 64 bit integer type
for once was something that was needed, because hardware
architectures and operating systems have changed.
> Granted, some things are mostly arbitrary. Braces vs. begin/end. But
> the editors all support braces now.
> Until you get me to change editors (probably never), Modula-3 is
> always going to be less convenient.
Any decent editor can be configured wrt. syntax highlighting and
writing support (we even had that for the simple DOS editors we
were using at the university together with Modula-2).
Have you tried (X)Emacs? There's a really nice m3-mode for it,
with highlighting and automatic completion of all language
constructs.
> At this point you are just fighting the vast majority (except
> Python...). It could have gone differently, but C won.
I'm not fighting anybody here ;-)
> If you ignore that lowest level thing, there are places where
> Modula-3 is perfectly good, but doesn't take the next step.
> A good example I think here is it has nice "objects", however it
> requires they be heap allocated I think even in unsafe code. You
> should be able stack (or global) allocate something with "virtual
> functions". It seems an arbitrary limitation. I realize in safe
> code, you have to heap allocate more anyway, but that is a different
> point I think.
I'm not sure if that is really needed.
> Similarly is "multiple inheritance just of interfaces". I realize
> though..this hides a "vtable per interface". Maybe is much more
> expensive than people realize and shouldn't be provided lightly.
Multiple inheritance was left out of the language after long
discussions because it was not really understood at that time.
It may be that things have changed in this respect, but I still
don't think it is.
> Maybe I just need to reread Nelson's book. You know..reference vs.
> tutorial. The language reference is very very terse and that is ok.
> Short on examples. A tutorial that gives many examples might be
> good. Hey maybe I'm just the newbie in a good position to write it.
> (not)
You can express quite a lot of unexpected things with the few
language constructs. Often I'm still amazed at the ideas of other
programmers when reading M3 code.
> I guess I should be in comp.lang.c.advocacy. :)
Yes, some of your comments would be better placed there :)
> To a large extent I'm just looking for a small smart group to have a
> friendly intellectual discussion with.
> (and of course, don't mess up their code)
I think you can have that here. People are willing to discuss and
think things over, but the pace may be somewhat slower than you'd like :-)
(It's not as bad as with Tolkien's Ents, but still ... slow :)
So, as others have noted, it's great that there is so much activity
recently, but it would still be better if the discussions and comments
were more focused on important language related content about M3.
Nobody has accused you of malicious intentions, and you've always
accepted objections and corrections by others as far as I remember.
I think what is mostly needed is to slightly adapt your style of
working and discussing things to become better accepted here.
Don't speak out too rash, and don't commit lots of small changes
too soon. Work things out and become more self-confident about
the results of your work. I'm sure you can contribute many interesting
things to M3.
Olaf
PS: Sorry if some of the above reads as if I'm your teacher ;-)
--
Olaf Wagner -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
More information about the M3devel
mailing list