August 07, 2019
On Wednesday, 7 August 2019 at 13:54:46 UTC, Ethan wrote:
> On Wednesday, 7 August 2019 at 12:36:53 UTC, Bert wrote:

> We have LDC. Someone sitting down and starting up D.NET and integrating it in to the .NET Core ecosystem would be fantastic. Then you could write D code in the .NET environment and get access to the .NET runtime.

see https://en.wikipedia.org/wiki/Nemerle .NET with metaprogramming.
see .NET Native as CoreRT.
see compile scripts and expressions as lambdas - runtime metaprogramming with native speed.
but D.NET is no needed.

imo needed D++ (we have LDC)

// next is simple D module interop.d
//===================================================

codeC {
  #define SOME_MACRO /* */
  #include <stdio.h>
  struct A { .. }
  printf( "%d", a.fld );
}

// D code
// D structs support C/C++ inheritance with or without vtbl
// I mean diamond inheritance as C++ does
// D struct can be created at stack or C++ heap only (or member of D class)
struct D : A {
   void meth() {
     // can easy call any(?) C/C++ code without codeC(pp) blocks
     // or see as Terra interoperate with Lua
   }
}

codeCpp {
  #ifdef SOME_MACRO
  // classes in C++ is same C/C++ struct but only default private inheritance and members
  // allocated in stack or C++ heap cuz GC has undefined finalization order
  // for D code is same as struct { private: }
  class C : virtual public D {
  }
}

// D classes as now - allocated by GC or Scoped, cannot inherits structs
class ClassD {
  // usual D class
}

// just my comment in code:
// so f*ck alias this and add full C/C++ struct supports
// full C++ interop allow use D as system language as betterCpp
//===================================================


Clang has full C++ compiler that generates LLVM-IR.
LDC generates LLVM-IR too. they can live together.
Rust generates LLVM-IR too. need some universal TypeInfo that supports any kind of vtbl/types/descrs, something like Type Scheme for better world - u can program some module in lang that u think is more suitable.
C++ 2z will add dynamic compilation, LLVM supports it already.
D++ will have full C++ standard for ever.
No needed any wrappers to C/C++ for ever. U can use any of billion libs as is.

a lil problems:
- C++ uses std::string in most times. should D++ use it too?
  in any case D should use some nonGC-string (for betterC too)
  OT: imo any OSes and langs should use totally interoperable String class (something like improved BSTR) - many interop troubles will disappear.
- using C++ templates in D style.
- hmm.. probably no more problems.
August 07, 2019
On Wednesday, 7 August 2019 at 15:18:00 UTC, Ethan wrote:
> [snip]
>
> Yes, I already do this in Binderoo. It's a critical piece of infrastructure for the program I talk of.
>
> But simply calling .NET code is not what I mean. I mean making D a first-class language in the .NET ecosystem by providing a front-end to the .NET compiler.

Ah, ok.

I watched the Dconf video on Binderoo a while back, but I don't think I really groked it at the time. The documentation doesn't look like it has been updated since then either. I had no idea it worked with .net.
August 07, 2019
On Wednesday, 7 August 2019 at 17:35:05 UTC, jmh530 wrote:
> I watched the Dconf video on Binderoo a while back, but I don't think I really groked it at the time. The documentation doesn't look like it has been updated since then either. I had no idea it worked with .net.

I plan on relaunching it at some point in the reasonably near future. Needless to say, I've mainly focused on the .NET side of things since I left Remedy.
August 07, 2019
On Wednesday, 7 August 2019 at 15:18:00 UTC, Ethan wrote:
> But simply calling .NET code is not what I mean. I mean making D a first-class language in the .NET ecosystem by providing a front-end to the .NET compiler.

There was actually a project for that long, long time ago:

https://github.com/tim-m89/dnet
https://archive.codeplex.com/?p=dnet

August 07, 2019
On 8/7/2019 4:33 AM, Paulo Pinto wrote:
>> Not only that, Zortech C++ is the reason C++ itself reached the tipping point and became mainstream.
> Sorry to say it like this, but Zortech wasn't relevant in Europe, if at all.
> 
> I got introduced to C++ via Turbo C++ 1.0 and it was all Borland, Microsoft and Metrowerks from there on.

That came years afterwards. The success of Zortech C++ motivated Borland to drop their project of adding OOP extensions to C and go with C++. (I know the people involved.) The success of Borland C++ motivated Microsoft similarly (I heard at the time that MS was also developing their own OOP C language, but was never able to get confirmation).

But there is little doubt the sharp upward tilt of C++ happened with the introduction of Zortech C++. ZTC++ was on DOS, where 90% of the programming at the time happened.

Before ZTC++, C++ was a curiosity on unix platforms that was battling neck-and-neck with Objective C. (The comp.lang.c++ and comp.lang.objectivec newsgroups had about the same traffic volume.) After ZTC++ appeared, C++ boomed and ObjC tanked (and was rescued from oblivion by Apple).
August 07, 2019
On 8/7/2019 9:12 AM, Exil wrote:
> I mean anyone can make claims without data proving it. Even without Zortech C++ C++ would have gotten to the point it is at now.

See my other followup post.
August 08, 2019
On Thursday, 8 August 2019 at 00:16:22 UTC, Walter Bright wrote:
> Before ZTC++, C++ was a curiosity on unix platforms that was battling neck-and-neck with Objective C. (The comp.lang.c++ and comp.lang.objectivec newsgroups had about the same traffic volume.) After ZTC++ appeared, C++ boomed and ObjC tanked (and was rescued from oblivion by Apple).

Don't get this as being disrespectful, I'm just curious in what happened then? I'm mean after your compiler was gather traction as you said, what happened and why others compilers succeeded? Better UI? Implementation?

Max.
August 07, 2019
On 8/7/2019 9:17 AM, Exil wrote:
> Right DMC is all but dead,

Mainly because I stopped working on it to do D full time.

Although I remain the only person to have implemented a soup-to-nuts C++ compiler, simultaneously doing two languages proved beyond me :-)

Just to be clear, without the DMC++ back end, D would never have happened. For example, Windows 64 support became critical a few years ago. GDC and LDC were quite inadequate on it (they've since improved greatly) and we would have been severely negatively impacted if I hadn't upgraded the backend for Win64.

It's a great strength of D that we have 3 well-supported compilers, DMD, LDC and GDC.
August 07, 2019
On 8/7/2019 5:23 PM, Maximilian wrote:
> Don't get this as being disrespectful, I'm just curious in what happened then? I'm mean after your compiler was gather traction as you said, what happened and why others compilers succeeded? Better UI? Implementation?

Borland / Microsoft poured massive resources into theirs.

Borland was able to leverage their Turbo Pascal userbase, and Microsoft was very dominant in developer tools.

In spite of that, Zortech still did better and better, eventually being bought out by Symantec.

August 08, 2019
On Wed, 2019-08-07 at 17:16 -0700, Walter Bright via Digitalmars-d wrote: […]
> 
> Before ZTC++, C++ was a curiosity on unix platforms that was battling
> neck-and-neck with Objective C. (The comp.lang.c++ and comp.lang.objectivec
> newsgroups had about the same traffic volume.) After ZTC++ appeared, C++
> boomed
> and ObjC tanked (and was rescued from oblivion by Apple).

Being in the UNIX (well Solaris) world at the time at UCL, C++ was seen as interesting but in need of templates which it then got (1990) and so became viable, and Objective C was seen (possibly wrongly but still) as ramming Smalltalk and C together badly and so not viable. Someone got a few NeXT machines but they got put in a cupboard to gather dust: nice UI paradigm, useless programming platform. Macintosh had already taken hold in the HCI and media communities.

I was teaching C++ to first year second term (first term they did Scheme (1987 and 1988) or Miranda (1989 onwards) undergraduates 1987 to 1992 – all dates ±1. We used the Glockespiel compiler because CFront was an afront, and GCC was not up to it. Students liked it and did very well. After 1990 anyway when we didn't have to do #define/void* hacks to create data structures but could use templates.

Of course templates with untyped parameters was an error, still not fixed in C++20 – apparently Concepts got pulled out again.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk