On Thu, 05 Jan 2006 23:32:06 +0100, Mogens Hansen wrote:
> Alternativet C++/CLI ville være at vælge at C++ ikke skulle være
> noget væsentligt sprog på .NET platformen, hvilket ville være uheldig
> al den stund at Microsoft har bestemt at .NET platformen er en
> væsentlig del af deres strategi.
>
Jeg har ingen indvendinger mod, hvad MS føler/mener er vigtigt på deres
platform, og det deraf afledede ændringer af C++/CLI. Humlen er dog her,
at de vil have udvidelserne indlemmet i ISO C++, hvilket jeg mener er helt
hen i været. C++ er, og skal fortsat være, et generel purpose
programming language, og ikke skræddersyet til Windows platformen. Alle
de ændringer de foreslår, har jo ingen relevans, hvis din kode skal
oversættes på en anden platform, hvorfor det blot vil tilføje støj og
unødig kompleksitet til en i forvejen stor specifikation. Et andet
argument imod indlemmelsen er, at det på afgørende punkter bryder med
bagud kompatibiliteten med eksisterende kodebase.
I stedet for denne fastlåsning af GUI til winforms, burde den korrekte
måde, efter min mening, at indføre GUI-udvidelser til C++ være i stil
med Java's JDBC. Følgende er mit forslag, jeg har sendt til Matt Austern:
A proposal for implementing a standard GUI interface in C++
The main architecture resembles the idea behind Java's JDBC. E.g. the
language/library provides a standard interface or set of interfaces and
developers of graphics libraries does the actual implementation. If put
into a design pattern terminology the standard interface is a factory
hiding all implementation specific stuff from the programmer. The standard
interface would specify features and their dependencies but otherwise
leave implementation descessions to the developers of the graphics
library.
There are many advantages to this architecture of which I will point out
the most important ones:
Portability: Write one GUI class and reuse it on any platform providing a
C++ GUI standards compliant implementation. Simplicity: The C++ language
does not need to maintain a binary code base on every available platform.
All the language needs to maintain is a specification for the interface.
Compatibility: If the architecture is chosen backwards compatibility can
be maintained because the interface will be purely written in standard
C++ and have no ties to the underlying platforms graphics specifications
and/or hardware. Control: No graphics library will be able to extend or
change the functionality of the GUI interface in the language. This means
that the community will be in full control of the direction and
development but at the same time the community will not in any way
prevent developers of graphics libraries to go further. A core will be
standards compliant and the extention will not be.
It is hard for me to point out some disadvantages but of course one is
obvious: The success depends on adaptation from developers of graphics
libraries
Altså: C++/CLI bør derfor holdes ude fra ISO C++, men bør så være
MS's implementation af ISO C++'s standard gui interface.
> Men truende skyer over ISO C++ - nej bestemt ikke som jeg ser det.
>
Og jo, det synes jeg i høj grad. MS's motto har alle dage været embrace
and extend!
Quotes from the Halloween documents:
* "Recent case studies (the Internet) provide very dramatic evidence
... that commercial quality can be achieved / exceeded by OSS
projects."
* (Open source software) "is long-term credible ...
FUD tactics can not be used to combat it."
* "Linux can win as long as services / protocols are commodities."
* (Microsoft should) "De-commoditize protocols & applications"
The last strategy has been described by others as "embrace, extend
and extinguish".
--
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917