D on quora ...

Adam Wilson flyboynw at gmail.com
Mon Oct 16 07:56:35 UTC 2017


On 10/15/17 13:40, Laeeth Isharc wrote:
> On Saturday, 14 October 2017 at 22:43:33 UTC, Adam Wilson wrote:
>> On 10/7/17 14:08, Laeeth Isharc wrote:
>
>>>
>>> In a polyglot environment, D's code generation and introspection
>>> abilities might be quite valuable if it allows you to write core
>>> building blocks once and call them from other languages without too much
>>> boilerplate and bloat.  One could use SWIG, but...
>>
>> Oh dear, I seem to have accidentally set off a firestorm.
>>
>> Personally, I think there are better places to focus our energy than
>> worrying about what the users of other languages think. We like D,
>> that should be enough for us. The last line was somewhat
>> tongue-in-cheek. There is no way we're going to convert C#/Java users
>> either, and unlike C/C++ we cannot easily inter-operate with them.
>
> If we can convert Pascal users, why won't some C# and Java programmers
> be receptive to D?  Plenty of people have approached D from Java:
>

Indeed. I am an example of just such a convert (from C#). :) But it is 
much more difficult to inter-operate. The easiest path that I can see is 
Micro-services. Hide your different languages behind a REST API, such 
that your components are not talking C#<->D anymore, but HTTP<->HTTP. 
Then the language matters a LOT less, then you can convert individual 
services to a new language whenever business needs dictate.

> https://dlang.org/blog/2017/09/06/the-evolution-of-the-accessors-library/
> https://dlang.org/blog/2017/08/11/on-tilix-and-d-an-interview-with-gerald-nunn/
>
> https://github.com/intellij-dlanguage/intellij-dlanguage/
> (Kingsley came from Java).
>
> Why can't we easily interop with Java and C#?  I didn't find interop
> with Java so bad for what I was doing (embedding a Java library via the
> JVM with callbacks to D code), and Andy Smith found similar.
>
> http://dconf.org/2015/talks/smith.pdf
> (towards the end)
>
> C# interop for what I am doing sees easy enough.  (I will generate C#
> wrappers for D structs and functions/methods).
>
> This work wasn't open-sourced, and nor did Microsoft send out a press
> release about their use of D in the COM team.  But I spoke to the author
> in Berlin (maybe you did too), and it wasn't so much work to make it
> useful:
>
> http://www.lunesu.com/uploads/ModernCOMProgramminginD.pdf
>

Very cool. I had no idea MSFT was doing that. I didn't talk to him, but 
I was fighting a bad cold at DConf this year. :( I avoided talking to a 
lot of people.

Even so, I was more commenting on the fact that D has built in support 
for inter-operating with C/C++. It's not that it's impossible to 
inter-operate with C#/Java/etc., but it is significantly more work. And 
that can be a significant barrier to conversion when the ecosystem they 
are coming from comfortably provides everything they need already. :)

>
>> Instead of worrying about how to get more people to come from a
>> specific language. People will come if they see an advantage in D so
>> lets try to provide as many advantages as possible. :)
>
> Yes - agree with this.
>


-- 
Adam Wilson
IRC: LightBender
import quiet.dlang.dev;


More information about the Digitalmars-d mailing list