Jump to page: 1 26  
Page
Thread overview
How can D become adopted at my company?
Apr 24, 2012
Eljay
Apr 24, 2012
Trass3r
Apr 24, 2012
Eljay
Apr 24, 2012
Eljay
Apr 24, 2012
Brad Roberts
Apr 24, 2012
mta`chrono
Apr 25, 2012
Eljay
Apr 26, 2012
Brad Roberts
Apr 27, 2012
SomeDude
Apr 27, 2012
SomeDude
Apr 28, 2012
H. S. Teoh
Apr 28, 2012
SomeDude
Apr 28, 2012
SomeDude
Apr 28, 2012
Peter Alexander
Apr 29, 2012
Manu
Apr 30, 2012
Walter Bright
Apr 29, 2012
Sean Kelly
Apr 29, 2012
Manu
Apr 29, 2012
Tove
Apr 29, 2012
Manu
Apr 30, 2012
Tove
May 03, 2012
Don Clugston
May 03, 2012
Manu
May 07, 2012
Eljay
Apr 29, 2012
Nick Sabalausky
Apr 28, 2012
Jonathan M Davis
Apr 28, 2012
SomeDude
Apr 28, 2012
Jonathan M Davis
Apr 29, 2012
Manu
Apr 30, 2012
Nick Sabalausky
Apr 30, 2012
Timon Gehr
Apr 30, 2012
Walter Bright
May 01, 2012
Sean Kelly
Apr 24, 2012
Adam D. Ruppe
Apr 24, 2012
bearophile
Apr 24, 2012
Paulo Pinto
Apr 25, 2012
Kagamin
Apr 25, 2012
Paulo Pinto
Apr 26, 2012
Don Clugston
Apr 26, 2012
Jonathan M Davis
Apr 26, 2012
Walter Bright
Apr 27, 2012
Kagamin
Apr 26, 2012
Jacob Carlborg
Apr 26, 2012
Don Clugston
Apr 27, 2012
Jeff Nowakowski
Apr 26, 2012
Sean Kelly
Apr 24, 2012
Jacob Carlborg
April 24, 2012
[I had sent Walter an email, answering a question he asked me a few years ago.  Walter asked me to post the message here.  Slightly redacted - I took out an non-relevant aside, and since the forum doesn't support HTML bold, italic, underscore tags those have been stripped as well.]

Hi Walter,

You had asked me a question that I have been thinking about for a couple years.

Your question from 2009 was, “How can D become adopted at my company?”


*** What makes a language successful? ***

I think Stroustrup’s answer is the best metric I’ve heard:  a language is successful if it is used.  Or in my wording, if you know that technology can you get a job utilizing that technology.

Looking at all the successful languages, I have noticed that all the successful ones I am familiar with have had some sort of sponsor pushing the technology.  For example, Ada by the U.S. government, C# by Microsoft, Objective-C by Apple, C and C++ by AT&T, Lua by PCU in Rio, REXX by IBM, the list goes on and on and on.

The only exception I can think of is Ruby, a successful language that prospered by a grassroots movement without a corporate, government, or academic sponsor as far as I’m aware.

My understanding is that Facebook is sponsoring D.  At least in some capacity, I’m not sure of the details or extent.  But still, it’s a start, and important, and Facebook has monetary resources.


*** What makes a language popular? ***

The classic chicken-and-egg problem.  A language is popular because a lot of people use it.  A lot of people use it because it is popular.

So how does a budding language like D become more popular?  That’s a marketing and evangelist problem.  And not my forte.  But I have raised awareness of D with developers I know, word-of-mouth.

Some leading-edge independent developers have used D, and their programs demonstrate that D can walk-the-walk as well as talk-the-talk (e.g., Torus Troopers using D 0.110 and OpenGL).

Maybe Facebook could be convinced to pay some book writers to make D books.
   * Numerical Recipes in D
   * Design Patterns in D
   * The Dao of D
   * Harry Potter and the Frumious D Compiler


*** Who will use D?  And why?  And for what? ***

D is a neat language because it is a systems programming language, suitable as a more-than-viable alternative to C or C++.

But unlike C and C++, it has Safe D, which is eminently suitable for applications programming language.  Sure, C and C++ are used as applications programming languages, but that’s not what they were designed for.  D has an applications language story that is far more compelling than C and C++, and has the potential as a native applications programming language that VM based languages can’t touch.


*** What does D lack? ***

I think it is interesting to take a step back, and look at the whole enchilada of programming.  From Python to BASIC, from SQL to Brainf**k.

I think all these following things could be asked for as D Project Requests to the D user community.

Web framework.  What do people use Ruby on Rails, or slightly less popular Python and Django for?  Is D a suitable alternative?  Maybe, maybe not.  D can do the compiling job, no doubt, but is there a “Rails” or “Django” for D that is as strong as, well, Rails or Django?

Scripting.  Many games use Lua as an embedded scripting language.  With mixin we could write our own DSL in D.  Possibly even re-implement Lua-in-D.  Yet, I think D could greatly benefit by coming with a canned scripting language (e.g., a Lua-like language), as a standard feature.  Perhaps someone will do so (or has done so), and submit it for consideration.  That would make plumbing up a do-it-yourself scripting language (like Lua-on-C) to your engine-written-in-D so much easier.  If not Lua-in-D, perhaps JavaScript-in-D...?

Linux kernel in D.  This would be a crazy project for someone who is a Linux lover, an operating systems wonk, a D enthusiast, and highly OCD.  It is crazy because is a lot of effort to re-write something like a Linux kernel in another language, because it is a lot of work without any visible gain at the end.  But the final result would showcase that D can do the heavy lifting of an operating system.  Let’s see /language-X/ do that!  (Where /language-X/ is not Assembly, C, C++, or Sing#.)

D on iOS.  So for me personally, I would love to use D to write my applications for iOS, and OS X.  But… I’m not sure how to do that.  (The Objective-D project looks abandoned, never got out of the “toy” project stage, and doesn’t bridge Cocoa’s Frameworks written in Objective-C to D/Objective-D anyway.)

D for .NET.  Or I would love to use D to write my applications for .NET … and again, I’m not sure how to do that.  (The D.NET project looks abandoned, and never got out of the “toy” project stage.  And I don’t see a way to generate CIL from D.)

(For the above two D Project Requests, I have to admit I haven’t really looked all that hard.  So they could be already solved problems that I’m just ignorant of the existing solution.)


*** What features would you add to D? ***

I think these two features would help D tremendously:
   * D comes with a canned embedded scripting language, like Lua
   * D comes with the Objective facilities, like those found in Objective-C

For embedded scripting languages, Lua has shown it has the right balance of tiny-tiny-tiny footprint, rich expressivity, and highly performant.  It has been used in many games like World of Warcraft, and desktop applications such as the logic-and-UI language for Adobe Lightroom.

So why not just use Lua itself in D?  Because Lua has a nice Lua-to-C API, and in my opinion having Lua-in-D would be able to leverage some of D’s strengths and make the scripting language seamless.

The Objective portion of Objective-C is very interesting.  The amazing advantage of Objective-Whatever is not in the Whatever inasmuch as it is in what the Objective portion brings to the table.  Since all Objective objects use message-and-dispatch mechanism, it means that frameworks all become incredibly loosely coupled.  Also do to late-binding and the dispatch mechanism, anyone can extend any class or proxy any class or remote proxy any class, easily, even without source code.

To illustrate, I will compare C++ to Objective-C.  In C++, if you have a public API that takes in a std∷string const& as a parameter, you will soon discover that the std∷string const& is intimately affected by the compiler used and the optimization settings.  In Objective-C, the Objective string objects can be mixed-and-matched from different frameworks in which different string objective have entirely different implementations, but all comply with the same message contract.  And any framework can extend all the string objects used with novel functionality.  That de-coupling is super-important for scalability, including plug-ins and extension frameworks.


*** What’s the future of programming? ***

The “Next Big Thing” for computer languages probably won’t be emphasizing their super-awesome encapsulation and way-cool message-and-dispatcher based de-coupling.  :-)

I think the Next Big Thing in computer languages is rich DSL support, which will enable more complexity by simplifying what needs to be written in a more suitably (i.e., domain specific) expressivity.  Due to mixin and generational programming, I think D enables DSL grammars really-really-really well.

Also, due to a confluence of factors, the rising star for becoming the most widely used programming language is JavaScript.  I have to say, I’m not a fan of JavaScript.  I’ve seen the leading edge of compile-to-JavaScript languages, such as CoffeeScript and DART.  Can D get on that bandwagon and have the D compiler compile to JavaScript as some sort of IL?  I know that sounds like utter crazy talk, like Script# (C# to JavaScript compiler).

Sincerely,
Eljay

April 24, 2012
> My understanding is that Facebook is sponsoring D.  At least in some capacity, I’m not sure of the details or extent.  But still, it’s a start, and important, and Facebook has monetary resources.

Andrei works at facebook, that's all.

> Web framework.  What do people use Ruby on Rails, or slightly less popular Python and Django for?  Is D a suitable alternative?

See Adam Ruppe's work.

> Scripting.  Many games use Lua as an embedded scripting language.   With mixin we could write our own DSL in D.  Possibly even re-implement Lua-in-D.

No need to reinvent the wheel.

> So why not just use Lua itself in D?  Because Lua has a nice Lua-to-C API, and in my opinion having Lua-in-D would be able to leverage some of D’s strengths and make the scripting language seamless.

LuaD.

> kernel in D.

XOmB.

> Can D get on that bandwagon and have the D compiler compile to JavaScript as some sort of IL?

Theoretically. See emscripten.
April 24, 2012
As a follow up to my email to Walter...

I know I didn't address the question "How can D become adopted at my company?" head-on.

An on-going project written in (say) C++ is not going to get approval to re-write in D.  There is no ROI in it.

A new project that could be written in D will be met with a lot of resistance.  Management will consider D too risky, as compared to writing the same project in C++ or C# or Java.  Co-workers not familiar with D will consider it as a pain-in-the-learning-curve [an attitude I cannot fathom; learning a new computer language is a joy, like opening a birthday present].

In some cases, such as shipping an application for iOS or Windows Phone or Android devices, can D even be utilized?  Even if management and the team's developers are behind using D?

---

A brief blurb about who I am...

I started programming in 1976, where I contributed to a program called Oregon Trail written in HP2000A BASIC on TIES.  That was my very first programming experience.

After learning BASIC, I learned 6502 assembly, then later picked up FORTRAN, Pascal, and C.  Then 68000 assembly.

I abandoned programming in assembly when I got my first optimizing C compiler, which was able to out-optimize my lovingly hand-crafted assembly.  I became a true believer in the powerful mojo of optimizing compilers.

In 1990, I switched from C to C++, first as as "Better C" compiler.  By two years later, I had fully embraced OOP style.

C++ was my main language for a long time, with a couple years doing Java.  Most recently, I have been programming in C#.

---

About 12 years ago, using Aho's dragon book by my side, I tried my hand at writing my own programming language.  After six months, I gave up because creating a good, general purpose programming language IS VERY VERY HARD.

Later, when I stumbled upon D, it was like Walter had read my mind and implemented what I could only conceive of... I was smitten.  And I still am.

So the languages I admire are...
   * D, as a general purpose natively compiled multi-paradigm programming language
   * Lua, as a barebones, small footprint, embed-able do-it-yourself scripting language
   * Python 3, as a kitchen-sink-included scripting language

I have used extensively BASIC (HP2000A, Apple Integer, Applesoft, MAI BusinessBASIC IV, PickBASIC), FORTRAN, Prolog, LISP & Scheme, 6502 Assembly, 680x0 Assembly, Pascal, Mathematica, C, C++, Objective-C, Objective-C++, Java.

I'm also intrigued by some other languages but I do not use them day-to-day, such as F#, Spec#, Sing#.  And I certainly have toyed with many other programming languages, such as Perl, Ruby, REXX, Ada, Squeak, Forth, PostScript, yada yada yada.

My educational background is in high-energy physics where I learned FORTRAN, linguistics (with a focus on semantics and artificial intelligence) where I learned Prolog and LISP, and computer science.

---

And the most important bit of information:  I use vi (Vim).
April 24, 2012
Awesome!  Thanks Trass3r!
April 24, 2012
On Tuesday, 24 April 2012 at 12:04:27 UTC, Eljay wrote:
>  I have to say, I’m not a fan of JavaScript.  I’ve seen the leading edge of compile-to-JavaScript languages, such as CoffeeScript and DART.  Can D get on that bandwagon and have the D compiler compile to JavaScript as some sort of IL?

Yeah, I've had more success than I thought I would
with a dmd fork:

https://github.com/adamdruppe/dmd/tree/dtojs

A good chunk of the language works and we can do
pretty good library stuff (when I find the time!)

there's also LLVM's emscripten that takes a different
approach.
April 24, 2012
Eljay:

> Looking at all the successful languages, I have noticed that all the successful ones I am familiar with have had some sort of sponsor pushing the technology.

Python was widely used before Google "support". And I think Haskell has enjoyed corporate support for a lot of time.


> My understanding is that Facebook is sponsoring D.

Not much, I think.


> *** What does D lack? ***

Sometimes the problem is having too much ;-)


> But the final result would showcase that D can do the heavy lifting of an operating system.  Let’s see /language-X/ do that!  (Where /language-X/ is not Assembly, C, C++, or Sing#.)

I think Walter doesn't believe a lot in Sing#...

Bye,
bearophile
April 24, 2012
On 24-04-2012 16:05, bearophile wrote:
> Eljay:
>
>> Looking at all the successful languages, I have noticed that all the
>> successful ones I am familiar with have had some sort of sponsor
>> pushing the technology.
>
> Python was widely used before Google "support". And I think Haskell has
> enjoyed corporate support for a lot of time.
>
>
>> My understanding is that Facebook is sponsoring D.
>
> Not much, I think.
>
>
>> *** What does D lack? ***
>
> Sometimes the problem is having too much ;-)
>
>
>> But the final result would showcase that D can do the heavy lifting of
>> an operating system. Let’s see /language-X/ do that! (Where
>> /language-X/ is not Assembly, C, C++, or Sing#.)
>
> I think Walter doesn't believe a lot in Sing#...
>
> Bye,
> bearophile

Sing# has been battle-tested to build an actual operating system. I don't think it's a matter of belief...

-- 
- Alex
April 24, 2012
On Tuesday, 24 April 2012 at 14:05:14 UTC, bearophile wrote:
> Eljay:
>
>> Looking at all the successful languages, I have noticed that all the successful ones I am familiar with have had some sort of sponsor pushing the technology.
>
> Python was widely used before Google "support". And I think Haskell has enjoyed corporate support for a lot of time.
>

Python's killer application was Zope. I recall before Zope, no
one cared about Python in Portugal, only afterwards, people
started taking Python seriously,

Some of the main Haskell researchers are in the payroll of companies like Microsoft, or Siemens, for example.

The proprietary languages usually are pushed by big companies, until you
cannot avoid them. While the, lets call them, community oriented languages,
really need something that makes people care for the language and introduce
them silently in the company.

I played a bit with D1, but never cared about it too much. What really made
me give a second look to it was Andrei's book, but then I was disappointed to
find out that not everything was really working as described in the book.

As a language geek, I toy around with all programming languages I can play with, but I see the same issues as raised by Eljay.


April 24, 2012
On 2012-04-24 14:04, Eljay wrote:

> D on iOS. So for me personally, I would love to use D to write my
> applications for iOS, and OS X. But… I’m not sure how to do that. (The
> Objective-D project looks abandoned, never got out of the “toy” project
> stage, and doesn’t bridge Cocoa’s Frameworks written in Objective-C to
> D/Objective-D anyway.)

You would need to write bindings to the Objective-C classes just as you need to write bindings to the C functions you want to use.

I'm currently working on a tool that does this automatically. As a first step I intend to support C and Objective-C, then probably C++ as well.

-- 
/Jacob Carlborg
April 24, 2012
On Tue, 24 Apr 2012, Eljay wrote:

> As a follow up to my email to Walter...
> 
> I know I didn't address the question "How can D become adopted at my company?" head-on.

Your response is actually very typical of most responses to the question. What's interesting to me is that it's really a deflection and dodges the entire point of the question.  By avoiding the question, you (and don't take this personally, I mean 'the person answering a different question') avoid committing to trying to find a way at all.

> An on-going project written in (say) C++ is not going to get approval to re-write in D.  There is no ROI in it.

Neither Walter (in this case) nor the question asked for re-writting anything.  In fact, that's frequently stated (again, by Walter and others, including myself) as explicitly a non-goal.  Rewriting applications to another language is an exercise in time wasting and bug-reintroduction. Unless you have _another_ driving reason to do a rewrite, don't.

> A new project that could be written in D will be met with a lot of resistance. Management will consider D too risky, as compared to writing the same project in C++ or C# or Java.  Co-workers not familiar with D will consider it as a pain-in-the-learning-curve [an attitude I cannot fathom; learning a new computer language is a joy, like opening a birthday present].

And this is finally getting a the heart of the question, but also approaching it with an intend to fail approach to it.  Of course you don't want to take something new and introduce it as the solution for the next huge risky project.  That's bound to be smacked down and get no where.  To introduce change and reduce risk, you start small.  Something that's safe to let fail.  Of course that can backfire too if you want it to:

    "See, it failed, so the tools we used must suck."  Except that
    might not actually be why it failed.

So, the obvious follow up.. what have I done with D where I work?  Little, other than get it on the approved list of software we can use.  It's not on the list of officially supported languages (more a defacto thing than an actual list).  But the key problem is that I haven't written any new code in a very long time, something I miss more and more.  The applications I do touch are all pre-existing code bases, so see above about rewriting.

My 2 cents,
Brad

« First   ‹ Prev
1 2 3 4 5 6