> > > 1. class that can have more then one object as it's parent (at this
> >
> > Multiple Inheretance. Difficult to understand, difficult to implement,
> > but I have a problem where multiple inheretance was the solution,
> > instead of multiples interfaces.
>
> Difficult ? While interfaces does not have any execution code, Classes
> do, so any real code such as functions and properties can be shared by
> classes. It's much less work in the long run, and still not that hard
> to understand then the use of interfaces...
At least ObjPas isn't case-sensitive like C (and doesn't need separate
headers, and don't have pre-compiler macros, :-D ) but mixing operator
overloading with multiple inheritance makes code hard to understand
more than enough.
IIRC member and method resolution was a PITA too.
Maybe it is a myth: C++ creates slower OO code, because its OO is complex
and supports even multiple inheritance. Does someone know if this is true?
I guess this is not true. AFAIK interfaces and multiple inheritance
are fundamentally equal, I think only the compiler needs to do some
"magic" to accomodate the inherited members...
> > > 2. Powerful containers for class usage such as class X requires class
> >
> > Same as templates/generics.
>
> Actually it's more an RTTI feature that we can use in order to control
> better our code.
> We do have strong RTTI, but we can make it even stronger :)
Can you give an example?
I can't think of any either. Not for the language, at least.
For the LCL/RTL it would be really nice to have some (wrapper)
classes, like the ones in Java and C#...
> > > 4. The amount of classes that comes with Java as part of the compiler
> > > :P
> >
> > Can live with them. Make your own libraries.
>
> You are loosing the reason to work with Pascal. (...)
Agreed. The guy completely missed the point.
The more "complete" our "standard library" is, the better (if it
doesn't add bloat, of course ;-)
> > > 5. Associative/anonymous classes (like in script language).
No way. Why completely change the pascal OO semantics for doing
something that can be done already in other ways and that can be done
on enviroments that was really meant for it (i.e. JavaScript) ?
Are You just fancy using 'begin..end' ? ;-)
Almost all suggestions in this thread (and the previous one) reinforce
my opinion on why many people dislike Pascal: they are lazy bastards!
Most of my colleagues which prefer C++ or Java over Delphi complain
that in Pascal you have to write too much, but they don't accept that
this is straight laziness. But at last, last week a new guy in my
workplace cited as the first reason for him to adore C++ was it is a
nice language for lazy programmers/typers.
Obviously these guys don't care about code readability (not news) and
never had to care about code maintanability :-/ (I presume they don't
like to code at all =P )
I have to admit that doing more typing probably must feel to some like
unnecessary and unneffective, but I absolutely positively doubt anyone
can be more productive in C++ or Java than in Object Pascal (or in
VisualStudio, Eclipse or JDeveloper than in Lazarus or Delphi).
What really puzzles me is how C++ could end so strongly supported on
so many levels.
I can't believe it was (only. lol) because of some "dick size contest"
(i.e. look at my haxor skills, i program in C, Pascal is for girlies),
so it must have slowly evolved from C's terseness, strong
multiplatform support, usage in Unix, etc, to the point that when C++
was created no software powerhouse had the balls to try to change the
rules of the game. And when Borland (almost) had it, MS took the ball
and went playing alone :-/
I'm probably wrong, but I think that if Delphi was at the same price
range as VisualStudio, and if Borland ported it to other platforms and
added all compiler optimizations people usually expect from a C
compiler instead of investing in that damned C++Builder, things would
very different now...
Cheers,
Flávio
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives