www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - D1 -> D2 Code converter

reply "jicman" <jicman cinops.xerox.com> writes:
Greetings!

Has anyone written any quick program to convert d1 code to d2?  I 
believe it will be a fine piece of program. :-)  Thanks.

josé
Apr 06 2015
parent reply "Dicebot" <public dicebot.lv> writes:
On Monday, 6 April 2015 at 20:25:39 UTC, jicman wrote:
 Greetings!

 Has anyone written any quick program to convert d1 code to d2?  
 I believe it will be a fine piece of program. :-)  Thanks.

 josé
It is surprisingly difficult, to the point of being almost impossible, to write such program. Problem is there are no simple 1-to-1 replacements for some of D1 concepts (like const storage class or array stomping) and adding const qualifiers automatically would require to effectively implement D1 compiler semantic stage with full code flow analysis. Combined, those 2 issues make creating such program hardly feasible. I will speaker about it in details in my DConf presentation (http://dconf.org/2015/talks/strasuns.html)
Apr 06 2015
parent "jicman" <jicman cinops.xerox.com> writes:
On Monday, 6 April 2015 at 20:48:05 UTC, Dicebot wrote:
 On Monday, 6 April 2015 at 20:25:39 UTC, jicman wrote:
 Greetings!

 Has anyone written any quick program to convert d1 code to d2?
  I believe it will be a fine piece of program. :-)  Thanks.

 josé
It is surprisingly difficult, to the point of being almost impossible, to write such program. Problem is there are no simple 1-to-1 replacements for some of D1 concepts (like const storage class or array stomping) and adding const qualifiers automatically would require to effectively implement D1 compiler semantic stage with full code flow analysis. Combined, those 2 issues make creating such program hardly feasible. I will speaker about it in details in my DConf presentation (http://dconf.org/2015/talks/strasuns.html)
Very interesting. It's like another complete language all by itself. :-) Thanks.
Apr 06 2015