www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D's DbC used in comparison for C++ proposal

reply Kramer <Kramer_member pathlink.com> writes:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1773.html#comparison-of-contract-programming-in-d-eiffel-and-c

I randomly happened upon the link above while looking for information on
contract programming.  This was back in March 2005; it's nice to see D show up
in something like this.

Anyways, I just though some people might enjoy.

-Kramer
Nov 01 2005
parent reply "Walter Bright" <newshound digitalmars.com> writes:
"Kramer" <Kramer_member pathlink.com> wrote in message
news:dk8f6e$ncv$1 digitaldaemon.com...

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1773.html#comparison-of-contract-programming-in-d-eiffel-and-c
 I randomly happened upon the link above while looking for information on
 contract programming.  This was back in March 2005; it's nice to see D
show up
 in something like this.
D was the motivating force behind that proposal, I expect we'll see more of D showing up in C++.
Nov 01 2005
next sibling parent reply Kyle Furlong <kylefurlong gmail.com> writes:
Walter Bright wrote:
 "Kramer" <Kramer_member pathlink.com> wrote in message
 news:dk8f6e$ncv$1 digitaldaemon.com...
 
 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1773.html#comparison-of-contract-programming-in-d-eiffel-and-c
 
I randomly happened upon the link above while looking for information on
contract programming.  This was back in March 2005; it's nice to see D
show up
in something like this.
D was the motivating force behind that proposal, I expect we'll see more of D showing up in C++.
Does this remind anyone of the politics in the US? Some third party comes up with a great idea, and one or both of the main parties absorbs it?
Nov 02 2005
parent reply "Walter Bright" <newshound digitalmars.com> writes:
"Kyle Furlong" <kylefurlong gmail.com> wrote in message
news:dk9tjl$26ar$1 digitaldaemon.com...
 Walter Bright wrote:
 "Kramer" <Kramer_member pathlink.com> wrote in message
 news:dk8f6e$ncv$1 digitaldaemon.com...
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1773.html#comparison-of-contract-programming-in-d-eiffel-and-c
I randomly happened upon the link above while looking for information on
contract programming.  This was back in March 2005; it's nice to see D
show up
in something like this.
D was the motivating force behind that proposal, I expect we'll see more
of
 D showing up in C++.
Does this remind anyone of the politics in the US? Some third party comes up with a great idea, and one or both of the main parties absorbs
it? C++ can absorb all it wants, but it'll never be D, because C++ has too many backwards compatibility issues throwing a wrench into what's really needed to fix it.
Nov 02 2005
parent reply Sean Kelly <sean f4.ca> writes:
Walter Bright wrote:
 
 C++ can absorb all it wants, but it'll never be D, because C++ has too many
 backwards compatibility issues throwing a wrench into what's really needed
 to fix it.
Definately. I think it's great that C++ is incorporating features that I like because it will make my life easier, but the language isn't nearly as elegant as D. And in some respects I am concerned that the next iteration of C++ will include so much stuff that the learning curve will be enormous. Interestingly, it wasn't until I started playing with the DMD front-end code that I began to understand and appreciate the finer points of the D design (since the DMD front-end is basically written in a C++ approximation of its D equivalent). As a result, I'm gaining a growing distaste for all the constructs C++ provides to handle simple things like memory management and object ownership--they clutter the code tremendously and never feel particularly natural to use. If complex library code is necessary to facilitate such routine tasks, part of me is left wondering if it isn't a fault of the language design. Sean
Nov 02 2005
parent reply Ivan Senji <ivan.senji_REMOVE_ _THIS__gmail.com> writes:
Sean Kelly wrote:
 Walter Bright wrote:
 
 C++ can absorb all it wants, but it'll never be D, because C++ has too 
 many
 backwards compatibility issues throwing a wrench into what's really 
 needed
 to fix it.
Definately. I think it's great that C++ is incorporating features that I like because it will make my life easier, but the language isn't nearly as elegant as D. And in some respects I am concerned that the next iteration of C++ will include so much stuff that the learning curve will be enormous. Interestingly, it wasn't until I started playing with the DMD front-end code that I began to understand and appreciate the finer points of the D design (since the DMD front-end is basically written in a C++ approximation of its D equivalent). As a result, I'm gaining a growing distaste for all the constructs C++ provides to handle simple things like memory management and object ownership--they clutter the code tremendously and never feel particularly natural to use. If complex library code is necessary to facilitate such routine tasks, part of me is left wondering if it isn't a fault of the language design.
Makes you wonder how great it would be if DMD fron-end was written in D. It would be many times easier to understand, maintain, change, debug...
 
 Sean
Nov 02 2005
parent reply Sean Kelly <sean f4.ca> writes:
Ivan Senji wrote:
 
 Makes you wonder how great it would be if DMD fron-end was written in D.
 It would be many times easier to understand, maintain, change, debug...
It probably wouldn't be too hard to port, given the design. Sean
Nov 02 2005
parent reply Ivan Senji <ivan.senji_REMOVE_ _THIS__gmail.com> writes:
Sean Kelly wrote:
 Ivan Senji wrote:
 
 Makes you wonder how great it would be if DMD fron-end was written in D.
 It would be many times easier to understand, maintain, change, debug...
It probably wouldn't be too hard to port, given the design.
I thought that the problem with porting would be interfacing to back-end wich is C++.
 
 Sean
Nov 02 2005
parent reply Sean Kelly <sean f4.ca> writes:
Ivan Senji wrote:
 Sean Kelly wrote:
 
 Ivan Senji wrote:
 Makes you wonder how great it would be if DMD fron-end was written in D.
 It would be many times easier to understand, maintain, change, debug...
It probably wouldn't be too hard to port, given the design.
I thought that the problem with porting would be interfacing to back-end wich is C++.
That doesn't affect how hard the code would be to port, only its usefulness for integration with a C++ back-end. I suspect that a D version of the front-end still might be useful for anyone hoping to write an IDE for D in D, etc. Beyond that... perhaps someone feel like writing an intermediate code generator in D? ;-) Sean
Nov 02 2005
parent reply Ivan Senji <ivan.senji_REMOVE_ _THIS__gmail.com> writes:
Sean Kelly wrote:
 Ivan Senji wrote:
 
 Sean Kelly wrote:

 Ivan Senji wrote:

 Makes you wonder how great it would be if DMD fron-end was written 
 in D.
 It would be many times easier to understand, maintain, change, debug...
It probably wouldn't be too hard to port, given the design.
I thought that the problem with porting would be interfacing to back-end wich is C++.
That doesn't affect how hard the code would be to port, only its usefulness for integration with a C++ back-end. I suspect that a D version of the front-end still might be useful for anyone hoping to write an IDE for D in D, etc. Beyond that... perhaps someone feel like writing an intermediate code generator in D? ;-)
Well i did write a code generator for D but never did finish it really, it was more of a D->extendedD translator but i didn't hook it up to a good lexer, so it was limited and it was grammar based so it was suffering from my inability to write a good D grammar. But it was fun to write and play with some syntax extensions for D. One of my favorite ones (would be nice to have it in D) was (part taken int[] numbers, roots; numbers.length = 10; (each[int index] numbers) = index*2; //numbers[i] = i*2; numbers.{writefln(it);}; //print all numbers numbers.{roots ~= sqrt(it);} //wich is also equal to (each[int index] roots) = sqrt(numbers[index]);
 
 Sean
Nov 02 2005
parent R'emy Mou:eza <R'emy_member pathlink.com> writes:
 Ivan Senji wrote:
 That doesn't affect how hard the code would be to port, only its 
 usefulness for integration with a C++ back-end.  I suspect that a D 
 version of the front-end still might be useful for anyone hoping to 
 write an IDE for D in D, etc.  Beyond that... perhaps someone feel like 
 writing an intermediate code generator in D? ;-)
Peri Hankey as written a D to D translator as a proof of concept for his analytical grammar machine [http://www.dsource.org/projects/languagemachine/]. The whole thing may seem very counter intuitive at first sight but it is really a powerfull way to manipulate languages. I have played with it to change the front-end grammar into something close to C++ so as to get the back-end generate the appropriate D code. So far it works nicely for the subset it can recognize. One can tune this front( or back )-end to implement new features that will be translated into current D code. It could help to taste the look and feel of ideas prior to have them directly implemented in the compiler.
Nov 03 2005
prev sibling parent Georg Wrede <georg.wrede nospam.org> writes:
Walter Bright wrote:
 "Kramer" <Kramer_member pathlink.com> wrote in message
 news:dk8f6e$ncv$1 digitaldaemon.com...
 
 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1773.html#comparison-of-contract-programming-in-d-eiffel-and-c
 
 I randomly happened upon the link above while looking for information on
 contract programming.  This was back in March 2005; it's nice to see D
 show up in something like this.
Makes me so proud! (As in my Dad is stronger than your dad.)
 D was the motivating force behind that proposal, I expect we'll see more of
 D showing up in C++.
Killer! So D is making inroads to the academically minded! A new, implicit campaign for D in CS! What caught my eye was the __old stuff. Seemed practical.
Nov 02 2005