May 30, 2003
"Sebastian Moleski" <s.moleski@tcu.edu> wrote in message bb8686$254h$1@digitaldaemon.com
> "DRS" <drs@removethis.ihug.com.au> wrote in message news:bb85ot$24dv$1@digitaldaemon.com...

[...]

>> True constants
> I didn't understand then nor do I understand what you are referring to here.

I think Ignacio might have been trying to distinguish between true constants
and OP's variable constants.  :-)
Perhaps you should ask him, I just tried to make sense out of all the stuff
in the thread.

-- 

 A: Top-posters.
 Q: What is the most annoying thing on Usenet?


May 30, 2003
DRS wrote:

--- 8< ---(...out-of-the-box...)--- >8 ---

> By that criteria Object Pascal would probably get a few extra ticks.

How come? Object Pascal has "set", which is an efficient and good thing combined with enumerations, but too weak to be a general container. Dynamic array support has only appeared since Delphi 4.0 and is fairly weak, i.e. no multidimensional arrays. Strings were a strong point till short ago, but how when all flavors of unicode rule the world, it seems more appropriate if it were possible to subclass strings.

BTW, other more-or-less interesting but still comparable languages are GNU Pascal and GNU Sather. I shall contribute to the comparison with these languages.

-i.

--
(all the world are belong to us!)
- new media cyclops fighting against space invaders.



May 30, 2003
DRS wrote:

> > Operator overloading
> Yes (custom variants).

Does this mean you can only overload operators for a small subset of
classes (i.e. only through Variants)
I'm not convinced Delphi support is complete enough to claim this, but
am ready to be proven wrong (the last version of Delphi I used predated
this support)


> > Design by Contract
> Yes (assert).

Many languages on the table support asserts <g>  I don't think this qualifies as DBC.

> > Static construction order
> Yes (modules only).

> > Guaranteed initialization
> Yes (consts only).

Erm, doesn't 'XXX only' mean that initialization is NOT guaranteed then? <g>

> > RAII
> No.

And I still maintain Delphi supports this, but it isn't practiced!! It is a side effect of the Delphi interface mechanism.  All RAII needs is a guaranteed function call when something leaves scope, and the ability to provide your own cleanup in that function call.


> > Support all C types
> Yes

I think this is intended for C99 support, and I doubt anything but C99
will ever support the full range!
[Correction, I just checked the chart and D has them!]

> > And what are other stuff that you can add to this list that is found in OP and not in D?

To take highlights from the list...

> Set types
Good choice for the chart to contrast the D array support.

> Variant records
or 'C' unions, covered by everything but Java/C#?

> True constants
Erm, I think Delphi was last language to get these!
'fake-constants' might be more the language feature <g> but I'd simply
drop this

> Default parameters
as in C/C++/D, but not Java/C#?

> Open array parameters
Is a Delphi Open Array a langauge level tuple?

> Reintroduce
Not sure about this one, but the override keyword would be my other big plus for Delphi syntax.

> Dynamic
Just another kind of virtual dispatch, already covered

> Return value as variable vs. return
Now this one is interesting, if badly phrased!

[For those that don't know Delphi]
Delphi, as a language level feature, allows you to assume a variable
called 'result' in every function.  You can simply assign to result
through the function call and this value will automatically be returned
as the function exits.  After you have assigned the value, you can (of
course) query and use result just like any other local variable.

Alternatively, you can return a value at any point with a return statement, just as in the other languages.

> Run-Time Type Information (RTTI) operators
How does this differ from RTTI support in other languages?
C++ has dynamic_cast, Java does similar with its casting.  [Not sure how
C#/'D' handle RTTI]

> Ur-types
Is this just another way of saying 'reflection API'?
[So Java/C# score, C/C++ don't, 'D' I need Walter again]

> Packages
As opposed to modules?
[I think Units and Packages are simply different kinds of modules]


> This stuff you probably wouldn't accept without referring to libraries, but Delphi was practically designed around them:

> Interactive UI design

I think this is as core to Delphi as Design-by-contract is to D, so it
would be nice to sneak it in somehow <g>
Besides, it at least requires linker-level support (if not language) to
support the .dfm format (a text file associated with the
gui-integration)

-- 
AlisdairM
May 30, 2003
Oh, and another language I know nothing about but may be part of the same C/C#/C++/D family.  Anyone able to supply an Objective-C column?

-- 
AlisdairM
May 30, 2003
"Alisdair Meredith" <alisdair.meredith@uk.renaultf1.com> wrote in message news:3ED7A688.15D9FD43@uk.renaultf1.com...
> DRS wrote:
>
> > > Operator overloading
> > Yes (custom variants).
>
> Does this mean you can only overload operators for a small subset of
> classes (i.e. only through Variants)
> I'm not convinced Delphi support is complete enough to claim this, but
> am ready to be proven wrong (the last version of Delphi I used predated
> this support)
Yes. If you want to read more about that, I would suggest you go to the Borland documentation page and download the D6 help files. It has all the information in it.

> > Default parameters
> as in C/C++/D, but not Java/C#?
They could probably add this. The lack of default parameters is a rather annoying misfeature in both .NET and Java.

> > Open array parameters
> Is a Delphi Open Array a langauge level tuple?
In limited ways. If the language added support to store it in variables, it would be.

> > Return value as variable vs. return
> Now this one is interesting, if badly phrased!
>
> [For those that don't know Delphi]
> Delphi, as a language level feature, allows you to assume a variable
> called 'result' in every function.  You can simply assign to result
> through the function call and this value will automatically be returned
> as the function exits.  After you have assigned the value, you can (of
> course) query and use result just like any other local variable.
>
> Alternatively, you can return a value at any point with a return statement, just as in the other languages.
Return statement? Since when does Delphi have that?

> > Run-Time Type Information (RTTI) operators
> How does this differ from RTTI support in other languages?
> C++ has dynamic_cast, Java does similar with its casting.  [Not sure how
> C#/'D' handle RTTI]
C# has is and as. Guess where it got that from? <g>

> > Ur-types
> Is this just another way of saying 'reflection API'?
> [So Java/C# score, C/C++ don't, 'D' I need Walter again]
No. He was referring to TObject and IInterface.

sm


May 30, 2003
Sebastian Moleski wrote:

> > > Ur-types
> > Is this just another way of saying 'reflection API'?
> > [So Java/C# score, C/C++ don't, 'D' I need Walter again]
> No. He was referring to TObject and IInterface.

Yes, but what about them?!
I'm guessing the Object in Java and the equivalent in C# do the same,
but what is it they do?

-- 
AlisdairM
Team Thai Kingdom
May 30, 2003
"Alisdair Meredith" <alisdair.meredith@uk.renaultf1.com> wrote in message 3ED7A688.15D9FD43@uk.renaultf1.com
> DRS wrote:

I'm not necessarily competent to argue all the finer points of Delphi's language constructs, particularly against other languages with which I am less familiar.  My post was primarily a compilation of the thread in b.p.d.non-technical at the time and in the absence here of many who contributed to that it probably should be continued over there.  Or we get them over here and take over. :-)

>> > Operator overloading
>> Yes (custom variants).
>
> Does this mean you can only overload operators for a small subset of classes (i.e. only through Variants)

I think so.

> I'm not convinced Delphi support is complete enough to claim this, but am ready to be proven wrong (the last version of Delphi I used predated this support)

Tsk, tsk.  Native variants were introduced in D6 as part of the introduction of CLX and Kylix, and variants as a whole underwent a lot of changes.  Prior to that variants were a fudge.

[...]

>> > And what are other stuff that you can add to this list that is found in OP and not in D?
>
> To take highlights from the list...

[...]

>> Ur-types
> Is this just another way of saying 'reflection API'?
> [So Java/C# score, C/C++ don't, 'D' I need Walter again]

TObject, IInterface, and IUnknown.  So Java would score but not C/C++.  I don't know about D.

[...]

>> This stuff you probably wouldn't accept without referring to libraries, but Delphi was practically designed around them:
>
>> Interactive UI design
>
> I think this is as core to Delphi as Design-by-contract is to D, so it
> would be nice to sneak it in somehow <g>
> Besides, it at least requires linker-level support (if not language) to
> support the .dfm format (a text file associated with the
> gui-integration)

.dfms can also be binary (they can be both since D5).  What version of
Delphi are you using?

-- 

 A: Top-posters.
 Q: What is the most annoying thing on Usenet?


May 30, 2003
"Alisdair Meredith" <alisdair.meredith@uk.renaultf1.com> wrote in message news:3ED7A9D7.5592D5BF@uk.renaultf1.com...
> Sebastian Moleski wrote:
>
> > > > Ur-types
> > > Is this just another way of saying 'reflection API'?
> > > [So Java/C# score, C/C++ don't, 'D' I need Walter again]
> > No. He was referring to TObject and IInterface.
>
> Yes, but what about them?!
> I'm guessing the Object in Java and the equivalent in C# do the same,
> but what is it they do?

If you have one common root in your inheritance tree, you can expect certain things of all objects that you can't if you have multiple user-defined ultimate base classes (like C++ offers). Personally, I prefer single-base languages to multi-base languages just because it makes object-handling much easier. I know that that's in direct conflict with what a lot of OOP "gurus" say in regards to C++.

sm


May 30, 2003
"Sebastian Moleski" <s.moleski@tcu.edu> wrote in message bb89br$29k5$1@digitaldaemon.com
> "Alisdair Meredith" <alisdair.meredith@uk.renaultf1.com> wrote in message news:3ED7A688.15D9FD43@uk.renaultf1.com...
>> DRS wrote:

[...]

>> > Return value as variable vs. return
>> Now this one is interesting, if badly phrased!

Hey!  I'm doing a lot of cutting and pasting!

>> [For those that don't know Delphi]
>> Delphi, as a language level feature, allows you to assume a variable
>> called 'result' in every function.  You can simply assign to result
>> through the function call and this value will automatically be returned
>> as the function exits.  After you have assigned the value, you can (of
>> course) query and use result just like any other local variable.
>>
>> Alternatively, you can return a value at any point with a return statement, just as in the other languages.
> Return statement? Since when does Delphi have that?

For *ages*.  At least since D4 (see D4 OP reference manual, p 6-4).

My example:

function foo : boolean;

begin
  Result := false;
end;

-- 

 A: Top-posters.
 Q: What is the most annoying thing on Usenet?


May 30, 2003
DRS wrote:

> .dfms can also be binary (they can be both since D5).  What version of
> Delphi are you using?

Actually the last Delphi I used was V2 <g>
I've been on BCBuilder since then, so my Delphi knowledge is more
by-association these days.

I think there is enough Delphi-specific info in this thread now for Walter, unless he wants to query something.  Probably best to take detailed discussion back over to the borland forum, or we'll drown out the 'D' discussion!

-- 
AlisdairM