Board index » delphi » Re: Delphi 7/8 Language enhancements

Re: Delphi 7/8 Language enhancements


2003-12-04 01:49:55 AM
delphi77
Craig Stuntz [TeamB] writes:
Quote
That would merely be a matter of the CLS.
The CLI, I think.
Quote
But at least parts of operator overloading are not in the CLS at all --
notably, the names of the implementing methods. So I don't think
that's
the whole story, at the very least.
They are part of the ECMA docs about the CLI (Common Language Interface).
Partition I Architecture.pdf:
10.3 Operator Overloading
10.3.1 Unary operators
10.3.2 Binary operators
10.3.3 Conversion operators
Pages 62ff of that document contain all the names. But it also says, on
page 62:
"CLS (framework): Shall not publicly expose overloading except as
specified here. Frameworks authors
should bear in mind that many programming languages, including
Object-Oriented languages, do not support
overloading and will expose overloaded methods or properties through
mangled names. Most languages
support neither operator overloading nor overloading based on return
type, so op_Implicit and op_Explicit
shall always be augmented with some alternative way to gain the same
functionality. "
I think that could be a more valid reason for the CLS not using them.
But I think I have seen some instances of operator overloading in the CLS
on *classes*. Just do a Member Search (F4) on "op_" in Lutz Roeder's
Reflector, and you will find them on numeric classes, on String, Cursor,
Version, XmlQualifiedName etc.
--
Rudy Velthuis (TeamB)
"This isn't right, this isn't even wrong."
-- Wolfgang Pauli (1900-1958), upon reading a young physicist's paper
 
 

Re: Delphi 7/8 Language enhancements

Rudy Velthuis (TeamB) writes:
Quote
Craig Stuntz [TeamB] writes:

>That would merely be a matter of the CLS.

The CLI, I think.
Actually I meant CLS. This is the "least common denominator" which
you must comply with if you want to support *all* .NET languages. But
.NET itself is capable of more, and the CLI is bigger in scope than the
CLS. If you are concerned about things that all languages might not
allow, however, you look to the CLI.
-Craig
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : delphi.weblogs.com
InterBase PLANalyzer 1.1 -- Free InterBase query optimization
tool: delphi.weblogs.com/IBPLANalyzer
 

Re: Delphi 7/8 Language enhancements

Craig Stuntz [TeamB] writes:
Quote
Actually I meant CLS. This is the "least common denominator" which
you must comply with if you want to support all .NET languages. But
.NET itself is capable of more, and the CLI is bigger in scope than the
CLS.
I'm not sure if you can separate one from the other.
--
Rudy Velthuis (TeamB)
"Too many pieces of music finish too long after the end."
- Igor Stravinsky (1882-1971)
 

Re: Delphi 7/8 Language enhancements

Rudy Velthuis (TeamB) writes:
Quote
I'm not sure if you can separate one from the other.
Why? CLS and CLI are not the same. There's quite a bit in CLI which
isn't in CLS.
-Craig
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : delphi.weblogs.com
IB 6 versions prior to 6.0.1.6 are pre-release and may corrupt
your DBs! Open Edition users, get 6.0.1.6 from mers.com
 

Re: Delphi 7/8 Language enhancements

Craig Stuntz [TeamB] writes:
Quote
Rudy Velthuis (TeamB) writes:

>I'm not sure if you can separate one from the other.

Why? CLS and CLI are not the same. There's quite a bit in CLI which
isn't in CLS.
Well yes, but I can hardly imagine a serious .NET language wich doesn't
follow the CLI.
--
Rudy Velthuis (TeamB)
"The opposite of a correct statement is a false statement. The opposite
of a profound truth may well be another profound truth."
- Niels Bohr (1885-1962)
 

Re: Delphi 7/8 Language enhancements

Rudy Velthuis (TeamB) writes:
Quote
Well yes, but I can hardly imagine a serious .NET language wich
doesn't follow the CLI.
I don't know what your definition of "serious" is but I don't believe
that VB.NET supports operator overloading. AFAIK you can claim to
"follow" the CLI without implementing every bit of it, and if you have
all of CLS you can claim to be a full .NET language even if you can't
do everything that Delphi for .NET can do. For example, C# can not do
unmanaged exports, but it is still considered a full .NET language.
-Craig
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : delphi.weblogs.com
InterBase in Multi-tier World -- Use multiple RDMs, IB features in
your appserver: delphi.weblogs.com/stories/storyReader$195
 

Re: Delphi 7/8 Language enhancements

Craig Stuntz [TeamB] writes:
Quote
Rudy Velthuis (TeamB) writes:

>Well yes, but I can hardly imagine a serious .NET language wich
>doesn't follow the CLI.

I don't know what your definition of "serious" is but I don't believe
that VB.NET supports operator overloading.
It supports calling the operators as static methods, like the Delphi for
.NET preview did. That is one of the options in the CLI, so it is
CLI-compliant.
--
Rudy Velthuis (TeamB)
"Whether you think that you can, or that you can't, you are usually
right."
- Henry Ford (1863-1947)
 

Re: Delphi 7/8 Language enhancements

Nick Hodges (TeamB) writes:
Quote
On 3 Dec 2003 12:51:43 -0700, "Rudy Velthuis (TeamB)"
<XXXX@XXXXX.COM>writes:

>
>Well yes, but I can hardly imagine a serious .NET language wich
>doesn't follow the CLI.

You mean like C#? ;-)
In what way it doesn't?
--
Rudy Velthuis (TeamB)
"God, please save me from your followers!"
- Bumper Sticker
 

Re: Delphi 7/8 Language enhancements

Rudy Velthuis (TeamB) writes:
Quote
It supports calling the operators as static methods
What wouldn't? In that sense, language support can not be a reason not
to overload operators on classes.
-Craig
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : delphi.weblogs.com
How to ask questions the smart way:
www.catb.org/~esr/faqs/smart-questions.html
 

Re: Delphi 7/8 Language enhancements

On 3 Dec 2003 12:51:43 -0700, "Rudy Velthuis (TeamB)"
<XXXX@XXXXX.COM>writes:
Quote

Well yes, but I can hardly imagine a serious .NET language wich doesn't
follow the CLI.
You mean like C#? ;-)
Nick Hodges - TeamB
Lemanix Corporation
Please always follow the newsgroup guidelines --
www.borland.com/newsgroups
 

Re: Delphi 7/8 Language enhancements

On 3 Dec 2003 13:40:24 -0700, "Rudy Velthuis (TeamB)"
<XXXX@XXXXX.COM>writes:
Quote
In what way it doesn't?
I dont' remember, frankly, but Danny mentioned at least three or four.
Craig mentioned one --
Nick Hodges - TeamB
Lemanix Corporation
Please always follow the newsgroup guidelines --
www.borland.com/newsgroups
 

Re: Delphi 7/8 Language enhancements

Rudy Velthuis (TeamB) wrote on 3 Dec 2003 13:40:24 -0700 ...
<XXXX@XXXXX.COM>
Quote
>>Well yes, but I can hardly imagine a serious .NET language wich
>>doesn't follow the CLI.
>
>You mean like C#? ;-)

In what way it doesn't?
Here are a few:
+ Export DLL entry points
+ Use default parameters
+ Module level functions and fields
+ Non-default indexers
+ Access boxed value types without unboxing them
Marc Rohloff
marc rohloff at bigfoot dot com
 

Re: Delphi 7/8 Language enhancements

"Rudy Velthuis (TeamB)" <XXXX@XXXXX.COM>writes:
Quote
In what way it doesn't?
I believe Danny Thorpe mentioned that the CLI has support for sets,
but I don't know of any languages other than Delphi that support
them.
-Rich
 

Re: Delphi 7/8 Language enhancements

On Wed, 3 Dec 2003 17:04:56 -0500, Marc Rohloff <XXXX@XXXXX.COM>
writes:
Quote
+ Use default parameters
That's one I found out about yesterday. Another one to the list of
Delphi language features that C# doesn't have!
Nick Hodges - TeamB
Lemanix Corporation
Please always follow the newsgroup guidelines --
www.borland.com/newsgroups
 

Re: Delphi 7/8 Language enhancements

Rich Walker wrote on Wed, 03 Dec 2003 16:11:28 -0600 ...
<XXXX@XXXXX.COM>
Quote
"Rudy Velthuis (TeamB)" <XXXX@XXXXX.COM>writes:

>In what way it doesn't?

I believe Danny Thorpe mentioned that the CLI has support for sets,
but I don't know of any languages other than Delphi that support
them.
The CLI doesn't support sets exactly, in fact since the CLI doesn't
enforce an enum to be limited to a specified value, that the CLI doesn't
support enum's only sets!
There is an attribute (FlagsAttribute) that informs anyone who cares
that the enum is intended as a bitmap/set. The CLI doesn't care about
this and the only place that I know of where it is checked is in an
enum's ToString method.
Marc
marc rohloff at bigfoot dot com