Why not develop new language

H

Herb Sutter

There is an upcoming C++/CLI standard (currently draft, official
document expected in December 2004) - and also an upcoming C#/CLI 2
standard.

Just a note, we now expect to complete work on the C++/CLI standard in
March and have it approved by Ecma in June. We wanted the extra time to
complete and polish the C++/CLI spec, but another reason for the slip was
that the CLI standard (undergoing its second round of work in parallel
with the first round of C++/CLI) also slipped.

In case you're wondering "why 6 months," the answer is that Ecma's
schedule, you get two shots a year to submit a document for approval (June
and December), so any slip is 6 months (or a multiple thereof).
C++/CLI is more powerful than C#/CLI (including the upcoming C#/CLI one).

The design ideals of C++/CLI are the following:

1) Bring C++ abilities to CLI.
2) Bring CLI additional features to C++.
3) Leave no room for a lower level language in CLI (*including IL*).

BTW, another way of saying this that people seem to find useful is that,
as of our Whidbey (VC++ 2005) release, C++ is the systems programming
language for .NET.

Herb

---
Herb Sutter (www.gotw.ca)

Convener, ISO WG21 (C++ standards committee) (www.gotw.ca/iso)
Contributing editor, C/C++ Users Journal (www.gotw.ca/cuj)
Visual C++ architect, Microsoft (www.gotw.ca/microsoft)
 
I

Ioannis Vranos

Herb said:
Actually, you just wrote valid C++/CLI code -- C++/CLI also supports
finally with exactly that syntax. This is described in the current draft
spec available via:
http://www.msdn.microsoft.com/visualc/homepageheadlines/ecma/default.aspx
. See section 16.4, and search for "finally" throughout (there are other
spots that specify how it interacts with other language features like
goto).

This is in addition to destructors -- as Mike points out, you can also get
a similar effect with destructors:

One advantage of finally is visual locality of reference -- the code is
right there in the function instead of off in a different place (a
destructor definition). One advantage of destructors is that RAII objects
encapsulate and automatically manage ownership. In your example above, I
would prefer to use a destructor (by writing auto_ptr<Resource> instead of
Resource*, you don't need a finally at all). You can use either facility,
of course.

Herb

---
Herb Sutter (www.gotw.ca)

Convener, ISO WG21 (C++ standards committee) (www.gotw.ca/iso)
Contributing editor, C/C++ Users Journal (www.gotw.ca/cuj)
Visual C++ architect, Microsoft (www.gotw.ca/microsoft)



At last, the source himself! Now you can provide definite light on C++/CLI!


Questions of myself.


Why this:


array<int> ^p ={1,2,3,4};


can't also be array<int> ar = {1,2,3,4};


that is with stack semantics as every other ref object in C++/CLI? And
when we need it, we can do %ar.



Also I have reported a bug to MS in the current tools refresh for VC++
Express Beta 1, I hope it will get fixed. :)


BTW, stay around to give us your knowledge! :)






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
 
I

Ioannis Vranos

Herb said:
Just a note, we now expect to complete work on the C++/CLI standard in
March and have it approved by Ecma in June. We wanted the extra time to
complete and polish the C++/CLI spec, but another reason for the slip was
that the CLI standard (undergoing its second round of work in parallel
with the first round of C++/CLI) also slipped.

In case you're wondering "why 6 months," the answer is that Ecma's
schedule, you get two shots a year to submit a document for approval (June
and December), so any slip is 6 months (or a multiple thereof).




BTW, another way of saying this that people seem to find useful is that,
as of our Whidbey (VC++ 2005) release, C++ is the systems programming
language for .NET.


Great stuff. However, provided that you are here, another question.

Why can't we pin_ptr (and interior_ptr) reference objects anymore?






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
 
P

Peter Koch Larsen

Please notice that you are replying to Mike Wahler, but the comment below
seems to be related to a message from "Howard".
Actually, you just wrote valid C++/CLI code -- C++/CLI also supports
finally with exactly that syntax. This is described in the current draft
spec available via:
http://www.msdn.microsoft.com/visualc/homepageheadlines/ecma/default.aspx
. See section 16.4, and search for "finally" throughout (there are other
spots that specify how it interacts with other language features like
goto).

This is in addition to destructors -- as Mike points out, you can also get
a similar effect with destructors:

Ah... realising now that you knew that ;-)
One advantage of finally is visual locality of reference -- the code is
right there in the function instead of off in a different place (a
destructor definition). One advantage of destructors is that RAII objects
encapsulate and automatically manage ownership. In your example above, I
would prefer to use a destructor (by writing auto_ptr<Resource> instead of
Resource*, you don't need a finally at all). You can use either facility,
of course.

What you are saying implies that "finally" could be useful for something
Alexandrescus ScopeGuard emulates. finally can - IMHO - never be useful for
resource releases.

/Peter
 
J

Jerald Fijerald

Wherever I go on the internet news forums, sooner of later I hear
discussion from excited computer experts that C# is so much better
than C++. There are many such discussions (even in the comp.land.C++
newsgroup for god's sake) and I was thinking that it's gotta be true!
Well since all you people here think that C++ is probably one of the
"best programming languages of the world -- if not the best for its
purpose", that proves that C# is going to be the Next Big Thing (TM)
any day soon. Just wait till the public discovers C#.

So I hear these rumors and wonder, why no programming language is not
as good as C#? As I am wondering this, I realize that C# is by far the
utmost programming language of the world no matter what people say. I
Now Believe It.

But some of you may think I am an advokator of C#, and I was paid to
go in the newsgroups and make C# seem like much better than C++. But
it's not like that. M$ is bad. C# is incredibly superior to C++ and
because M$ is bad I wonder why don't we --the fanatics-- do something
to compute it. Ok, if I was a manager of a 1st year student, right now
I would chose C#, because it seems to be much better than C++ (I hear
it on discussions on MSGeek all the time!). But although fanatic, I
feel it is unfair to bash a better product because it's M$, and I am a
good fanatic. I admit when something is better. No, the right thing is
to make something even better! And then C# will finally die! Hail!

Even people inside M$ still use VC6. I think this sucks. What are they
doing?
 
I

Ioannis Vranos

Peter said:
What you are saying implies that "finally" could be useful for something
Alexandrescus ScopeGuard emulates. finally can - IMHO - never be useful for
resource releases.


Taking also under consideration that a CLI environment is garbage
collected it further decreases its use.






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
 
I

Ioannis Vranos

Jerald said:
Wherever I go on the internet news forums, sooner of later I hear
discussion from excited computer experts that C# is so much better
than C++. There are many such discussions (even in the comp.land.C++
newsgroup for god's sake) and I was thinking that it's gotta be true!
Well since all you people here think that C++ is probably one of the
"best programming languages of the world -- if not the best for its
purpose", that proves that C# is going to be the Next Big Thing (TM)
any day soon. Just wait till the public discovers C#.

So I hear these rumors and wonder, why no programming language is not
as good as C#? As I am wondering this, I realize that C# is by far the
utmost programming language of the world no matter what people say. I
Now Believe It.



Troll, troll, troll, in clc++'s door...


But some of you may think I am an advokator of C#, and I was paid to
go in the newsgroups and make C# seem like much better than C++. But
it's not like that. M$ is bad. C# is incredibly superior to C++ and
because M$ is bad I wonder why don't we --the fanatics-- do something
to compute it. Ok, if I was a manager of a 1st year student, right now
I would chose C#, because it seems to be much better than C++ (I hear
it on discussions on MSGeek all the time!). But although fanatic, I
feel it is unfair to bash a better product because it's M$, and I am a
good fanatic. I admit when something is better. No, the right thing is
to make something even better! And then C# will finally die! Hail!

Even people inside M$ still use VC6. I think this sucks. What are they
doing?



Read the rest of the thread.






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
 
J

Jerry Coffin

Only until MS will crush them using their patent power...

This is a frequent claim. I can't find any support for it though. In
fact, as far as I can tell from doing some searching, a lot of people
sue Microsoft, but Microsoft rarely sues anybody unless that somebody
sues them first.

Just for example, I'd advise Googling for "Microsoft patent suit"
(without the quotes) to see what you see. When I do it, I get one
article after another about Microsoft having been sued by everybody
and his brother, a couple about Microsoft paying out lots of money to
settle some suits, and exactly ONE in which Microsoft seems to have
sued anybody over patent infringement -- and that was a countersuit
against Lucent Technologies after Lucent had sued Micrsooft.

Now, it is true that Microsoft has initiated suits of other sorts --
such as against MikeRoweSoft.com, against Lindows, etc. I'd note,
however that these are considerably different -- they're defending
trademarks, not patents. At least in the US, the law is quite clear
that if a trademark comes into common use separate from the trademark
(e.g. if "Windows" started to be used to refer to GUIs in general)
that the owner's right to the trademark will be lost.

It takes only a FEW instances of similar names being used without the
trademark holder stopping it before the courts will rule that rights
to the trademark in general have been lost -- IOW, if MikeRoweSoft was
allowed to continue, chances are that if somebody else claimed to be
"Microsoft" (i.e. exactly the same name) that the company we now know
as Microsoft would NOT be able to stop them from doing so (even though
"Microsoft" is undoubtedly a registered trademark).
 
S

Steven T. Hatton

Ioannis said:
C#/CLI is an ECMA and ISO standard, so MS can't sue anyone for
implementing it.

That's not MS style anyway. What they are more likely to do is introduce
ideosyncrasies into their own implementation sufficient to thwart efforts
to easily port code, etc. Playing nicely with others isn't one of their
historically strong suits.

I update the Mono rpms periodically, and take a look at things. There are a
few things in the C# Standard documentation which offer a somewhat comical
contrast to the C++ Standard. The C# standard was written with the obvious
intent of being comprehensible. Anybody interested in improving C++ and
how it is used would do well to examine some of these materials. There are
features of C++ which are not available in C# or Java. Some of these are
valuable and worth preserving. There are many features in C# (pronounced
D-flat) and Java which can be emulated in C++, or even introduced into the
core language without negatively impacting the existing C++ language.

Most significantly, in my opinion, are the superior mechanisms for importing
resources, and introspection. The former is probably a better candidate
for inclusion in the core language, the latter is probably better addressed
using some kind of open standard, or Boost library.
 
I

Ioannis Vranos

Steven said:
That's not MS style anyway. What they are more likely to do is introduce
ideosyncrasies into their own implementation sufficient to thwart efforts
to easily port code, etc. Playing nicely with others isn't one of their
historically strong suits.

I update the Mono rpms periodically, and take a look at things. There are a
few things in the C# Standard documentation which offer a somewhat comical
contrast to the C++ Standard. The C# standard was written with the obvious
intent of being comprehensible. Anybody interested in improving C++ and
how it is used would do well to examine some of these materials. There are
features of C++ which are not available in C# or Java. Some of these are
valuable and worth preserving. There are many features in C# (pronounced
D-flat) and Java which can be emulated in C++, or even introduced into the
core language without negatively impacting the existing C++ language.

Most significantly, in my opinion, are the superior mechanisms for importing
resources, and introspection. The former is probably a better candidate
for inclusion in the core language, the latter is probably better addressed
using some kind of open standard, or Boost library.


Have you read about C++/CLI in the rest of the thread?






Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
 
A

Andrea Griffini

Ioannis Vranos said:
C#/CLI is an ECMA and ISO standard, so MS can't sue anyone for
implementing it.

I'm not an expert on these issues... however I don't think that
patents are incompatible with a standard as far as "fair use" is
granted. However "fair use" doesn't mean that anything is granted
for free and for nothing in exchange.

I've stumbled for example in a few articles about how "fair use"
can still be acceptable for ISO but incompatible with the GPL.

What I didn't find was a crystal clear statement from microsoft
that this is not going to happen.

Are we going to assist to another ".GIF" tragedy ??

Andrea
 
H

Herb Sutter

I'm not an expert on these issues... however I don't think that
patents are incompatible with a standard as far as "fair use" is
granted. However "fair use" doesn't mean that anything is granted
for free and for nothing in exchange.

I've stumbled for example in a few articles about how "fair use"
can still be acceptable for ISO but incompatible with the GPL.

What I didn't find was a crystal clear statement from microsoft
that this is not going to happen.

That statement was actually made long ago. Most recently, I mentioned this
in my more detailed article posted a week ago (August 27) in this
newsgroup.

Several years ago, back when the C# and CLI standards were just getting
started long before I joined Microsoft, Microsoft agreed to license any
necessary intellectual property (e.g., patents) under not only RAND
(reasonable and non-discriminatory) terms but also royal-free so that
people can create conforming implementations of these standards.

There have been and will probably continue to be many conspiracy theories
speculating the contrary, but this much is a matter of record and not of
theory. FWIW.

Herb

---
Herb Sutter (www.gotw.ca)

Convener, ISO WG21 (C++ standards committee) (www.gotw.ca/iso)
Contributing editor, C/C++ Users Journal (www.gotw.ca/cuj)
Architect, Developer Division, Microsoft (www.gotw.ca/microsoft)
 
S

Shailesh Humbad

Herb said:
That statement was actually made long ago. Most recently, I mentioned this
in my more detailed article posted a week ago (August 27) in this
newsgroup.

Several years ago, back when the C# and CLI standards were just getting
started long before I joined Microsoft, Microsoft agreed to license any
necessary intellectual property (e.g., patents) under not only RAND
(reasonable and non-discriminatory) terms but also royal-free so that
people can create conforming implementations of these standards.

There have been and will probably continue to be many conspiracy theories
speculating the contrary, but this much is a matter of record and not of
theory. FWIW.

Herb

---
Herb Sutter (www.gotw.ca)

Convener, ISO WG21 (C++ standards committee) (www.gotw.ca/iso)
Contributing editor, C/C++ Users Journal (www.gotw.ca/cuj)
Architect, Developer Division, Microsoft (www.gotw.ca/microsoft)

I'm not an expert either, but from the outside, I don't think the
market dynamics support Microsoft's ability to use its patents.
Suppose Microsoft did start using the patents as a club to prevent
others from developing their software or systems. Those companies
would be smaller than Microsoft, and therefore in the public's eye, it
would appear that Microsoft is "stepping on the little guy". I don't
think Microsoft wants to incite yet another round of lawsuits.

There are companies out there who are registering contrived patents as
legal traps specifically for the purpose of extortion, in the case
that any company can make money from those ideas. As long as the
patent office is granting these stupid patents, I think it is the
lesser of two evils for Microsoft to hold them rather than those
scum-sucking pirates.

In either case, I don't think there is any social benefit to software
patents. A patent on one-click shopping in software is like a patent
on close-up shots in movies. Imagine if bright young people start
doing patent searches before they start developing their new ideas,
then they might just give up on developing them from fear alone. I
think strong copyright protection is necessary and sufficient to
promote software innovation. I was in India over the summer, and most
people there laugh at the idea of paying for legal copies of software,
which I think is a large part of why India's native software industry
is close to zero, despite its huge technical talent base.
 
A

Andrea Griffini

Herb Sutter said:
That statement was actually made long ago. Most recently, I mentioned this
in my more detailed article posted a week ago (August 27) in this
newsgroup.

Several years ago, back when the C# and CLI standards were just getting
started long before I joined Microsoft, Microsoft agreed to license any
necessary intellectual property (e.g., patents) under not only RAND
(reasonable and non-discriminatory) terms but also royal-free so that
people can create conforming implementations of these standards.

Does royality free means that a someone using patented parts can ask
no permission for now and for the future ?

If there is a permission to be asked the this is already sort of a
trouble for the GPL licensing scheme.

Moreover it's absolutely irrelevant if NOW microsoft is going to
allow anyone without questioning. The point is if someone can
implement .NET *against* the will of microsoft.

If it can't then that path is doomed... an alternative implementation
will survive only up to the point MS will think it must die. And not
that MS is quite quick about changing (even radically) opinion.

Andrea
 
I

Ioannis Vranos

Andrea said:
Does royality free means that a someone using patented parts can ask
no permission for now and for the future ?

If there is a permission to be asked the this is already sort of a
trouble for the GPL licensing scheme.

Moreover it's absolutely irrelevant if NOW microsoft is going to
allow anyone without questioning. The point is if someone can
implement .NET *against* the will of microsoft.

If it can't then that path is doomed... an alternative implementation
will survive only up to the point MS will think it must die. And not
that MS is quite quick about changing (even radically) opinion.


I found this:


http://www.ecma-international.org/memento/codeofconduct.htm
 
A

Andrea Griffini

....

The problem is what RAND really mens both immediately and in the
long term. I've read for example something considered 'reasonable
and non-discriminatory' includes that the rights to use patented
material are immidiately revoked if you're in a legal litigation
with the patent owner (in ANY litigation, no matter what
the subject is). Also RAND refers to company-company and is
not meant as working for company end-users... how does this
apply for example with a GPL licensing in which every single
user is allowed to create a separate copy of the work ?
Even just the need to obtain a license from microsoft (even if
for free and under a non-discriminating judgement) can be a
real problem for GPLed software.

Another problem is what it means to revoke the RAND policy on
the patented parts. From the the text I you linked I think
(but I'm no lawyer) that the biggest problem is that the standard
may be retired. Whoa... what a serious damage, especially for a
company that always had such an high consideration for standards...
(the latter is sarcasm... even leaving alone the hideous past
records, by reading internal documents leaked out of microsoft
- the halloween docs - one could think that using violence on
standards to break interoperability is even a deliberate
*business practice* at MS).

If the text you linked is what you think is a "crystal clear"
statement that an alternative .NET implementation is not seriously
risking law muds at the will of microsoft then I must think that
crystal is much better here than where you live.

Show me them *dropping on the floor* all the patents about .NET
and that will be interesting material for a discussion about
how safe is to bet on mono.

Andrea
 
I

Ioannis Vranos

Andrea said:
The problem is what RAND really mens both immediately and in the
long term. I've read for example something considered 'reasonable
and non-discriminatory' includes that the rights to use patented
material are immidiately revoked if you're in a legal litigation
with the patent owner (in ANY litigation, no matter what
the subject is). Also RAND refers to company-company and is
not meant as working for company end-users... how does this
apply for example with a GPL licensing in which every single
user is allowed to create a separate copy of the work ?
Even just the need to obtain a license from microsoft (even if
for free and under a non-discriminating judgement) can be a
real problem for GPLed software.

Another problem is what it means to revoke the RAND policy on
the patented parts. From the the text I you linked I think
(but I'm no lawyer) that the biggest problem is that the standard
may be retired. Whoa... what a serious damage, especially for a
company that always had such an high consideration for standards...
(the latter is sarcasm... even leaving alone the hideous past
records, by reading internal documents leaked out of microsoft
- the halloween docs - one could think that using violence on
standards to break interoperability is even a deliberate
*business practice* at MS).

If the text you linked is what you think is a "crystal clear"
statement that an alternative .NET implementation is not seriously
risking law muds at the will of microsoft then I must think that
crystal is much better here than where you live.

Show me them *dropping on the floor* all the patents about .NET
and that will be interesting material for a discussion about
how safe is to bet on mono.


At first, I am not an MS advocator. Personally I decided to learn
Windows programming, and since .NET is the current MS platform I picked
it (in fact I had been waiting for it and learned the past MFC etc
stuff, but that's another story).

One day I came across CLI standard, and most recently C++/CLI. If they
are going to be free, I like them. If not, I will consider it as the MS
platform - as originally planned.


That's my view of the things. However there is also DotGNU.

http://www.gnu.org/projects/dotgnu


Would these guys create it, with non-free stuff?


If CLI proves to be fake freedom, I will remove any relevant links from
my site. :)


However CLI is very fundamental stuff, not all CLR and its API minimal,
not even Windows::Forms.


I hope Herb Sutter can answer our questions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top