Trying to recap what I wrote yesterday, real quick:
bluecode wrote:
Another thing that comes to my mind are functions declared as "synchronized" (or was it "multithreaded"... not sure), which means that the compiler automatically puts a mutex around these functions.
Depending on your OS' threading API, also possible in C/C++, even more fine-grained than on function level.
Well sure. But this is something that is so low level, that it should be part of the language imho.
I disagree. Putting stuff like that in the language means that everyone will work with the common denominator. That's great for the programmers, but a pain for the platform maintainer (who has to twist his OS functionality to suit the runtime) and the end user (who has to live with what the language defines instead of what the OS offers).
Thread models, IPC mechanisms, GUI look & feel. They are the domain of the OS, IMHO.
And imho this simplyfies programming a lot.
Absolutely, that's why the software companies love it so much.
And about fine-graindness (does that word really exist
) I can just say, that in D nested funtions exist, which imho can be declared to be "synchronized". Or did I misunderstand your point?
I think you got it correctly. But still it's not as if you couldn't easily do MT programming in C++. (Yes I know you hate libs, but that's your problem, not mine. Even Java has a standard lib, it's only hardwired into the compiler. And even with Java you use third-party libs like log4j...)
I really hate (I'm really sorry for the next word) f***ing libraries. I hate to install thousands of libraries (which usually depend on each other) to just compile two lines of code.
You don't hate libraries, you hate how poorly your OS "supports" dependencies and library versions.
That is the unsolved problem, not the languages.
That's why having it in the language is imho an important point.
With
every language, you
will create interdependencies. Your video software written in D
will use external libs for codecs - unless you write it all yourself (and go out of business because it's so expensive / buggy). You
cannot provide everything in your language-lib.
So IMHO, the language lib should restrict itself to the very basics and leave the rest to the open market. I like it when two competitors struggle for the best networking package, or the best GUI package, or even the best standard library. Much better than relying on the compiler from
one vendor to cater for all your needs.
Competition drives business.
btw. is "needn't" (instead of "need not") really colloquial language?
All those concatenations / apostrophies are, more or less. Noteable exception is "can't", which is "cannot" originally (note this is one word).
[edit: Why do you think that using new/delete in C++ is a kind of design flaw (if I understood you correctly?)]
In my experience, it is very seldom necessary, and
because pointers are such a pain if used incorrectly, veteran programmers avoid using them. So, liberal use of them usually points to someone trying to write C or Java in C++. (Especially the Java types think they have to use "new" whenever they're creating an object.)