News for hackers. Stuff that matters.
Re:Merging In The GNU D Language Compiler To GCC by feb on Friday October 07, 2011 @06:10AM (#3083325)
Reading the thread, it's surprising how much work is still needed to merge the D frontend (GDC) into the GCC project:

* Assign copyright to the FSF which requires contacting all authors including those who are MIA.

* Update the code to the GCC coding conventions

* Submit for review patches to the GCC core that where shipped with GDC and get them accepted

* Finding a co-maintainer

* Promise to continue to maintain the code

* Implement naked functions attribute

* Convert the testsuite to Dejagnu

* Downgrade the zlib library used by GDC or upgrade the one in GCC

Those are all reasonable requirements from the GCC project, but impose some extra work for the GDC maintainers. Cheers to them for biting the bullet.

Re:Merging In The GNU D Language Compiler To GCC by ggchappell on Sunday October 09, 2011 @01:07AM (#3089721)
> Assign copyright to the FSF which requires contacting all authors including those who are MIA.

What for? GDC is distributed under the GPL. Isn't it kind of the whole point of the GPL, that this kind of thing can be done without having to ask for special permission?

Re:Merging In The GNU D Language Compiler To GCC by aklein on Friday October 07, 2011 @10:05AM (#3084009)
I'd be so excited for D to gain wider adoption. One area in which it really shines is in metaprogramming (compile-time code generation) that is such a headache in C++. http://www.digitalmars.com/d/2.0/templates-revisited.html
Re:Merging In The GNU D Language Compiler To GCC by Nelson69 on Friday October 07, 2011 @09:32AM (#3083846)
I think this is good news, if it all happens. There are some hurdles though. D have always had a nice look about it, a good reliable, predictable, open compiler is a huge step to greater acceptance.
Re:Merging In The GNU D Language Compiler To GCC by r4vik on Friday October 07, 2011 @06:52AM (#3083401)
once D is in GCC does that mean most of the rationale of Go(lang) is gone, in that both D and Go are supposed to be non-shitty C++.

Now I don't need to download another compiler to write D and I can use c libraries with it, I don't think Go has much over D in order to make me go to the effort of installing a Go compiler.

Re:Merging In The GNU D Language Compiler To GCC by nl on Friday October 07, 2011 @07:01AM (#3083423)
No.

The concurrency constructs (Goroutines) in Go are different and quite unique (I think D offers a number of models, but mostly pushes you towards Actors).

Go has simplicity as a much higher priority than D does.

This thread might be useful: https://groups.google.com/forum/#!topic/golang-nuts/8k59Rgke...

They are both interesting languages, but you might as well say that because C++ and Ada are in GCC the rationale behind Go has gone.

Re:Merging In The GNU D Language Compiler To GCC by r4vik on Friday October 07, 2011 @09:01AM (#3083742)
That's assuming you care about concurrency in a low-level systems programming language. If my problem space requires concurrency I'd use clojure or erlang.

I guess if you're interested in one language for everything then maybe Go is better.

Re:Merging In The GNU D Language Compiler To GCC by burgerbrain on Friday October 07, 2011 @10:37AM (#3084168)
Go is not meant to be a low level systems language... it is meant to be a systems language useful for implementing services... something for which you better be caring about concurrency for.

Erlang really is the best language to point at and say "why do we need this new one", though doing that in the first place is stupid.

Re:Merging In The GNU D Language Compiler To GCC by william42 on Friday October 07, 2011 @01:53PM (#3085060)
Isn't Erlang the oldest language out of the ones we're talking about?
Re:Merging In The GNU D Language Compiler To GCC by sambeau on Friday October 07, 2011 @07:59AM (#3083567)
No.

D is a rethinking of C++.

Go is a re-imagining of C++.

Re:Merging In The GNU D Language Compiler To GCC by hasenj on Friday October 07, 2011 @08:09AM (#3083598)
Go seems more like an imagining of what a modern descendent of C should be like.

It's not just about classes; it's also about concurrency.

Although D2 did have some concurrency ideas, I think Go does a much better job at figuring out how to solve concurrency problems on modern hardware.

Re:Merging In The GNU D Language Compiler To GCC by andralex on Friday October 07, 2011 @08:33AM (#3083664)
I disagree. As far as I can tell, Go is a resolute step backwards from C++ in efficiency, modeling power, and generic programming. That's not necessarily bad; simplicity has its virtue, too. The larger problem is that Go fails to avail itself of the progress in programming languages theory and practice in the past 30 years.
Re:Merging In The GNU D Language Compiler To GCC by uriel on Friday October 07, 2011 @08:53AM (#3083723)
Go is specially a huge step backwards from C++ in convoluted insanity.
Re:Merging In The GNU D Language Compiler To GCC by deadalnix on Friday October 07, 2011 @10:13AM (#3084045)
as well as D.
Re:Merging In The GNU D Language Compiler To GCC by andralex on Friday October 07, 2011 @10:45AM (#3084190)
without throwing the good parts away.
Re:Merging In The GNU D Language Compiler To GCC by sambeau on Friday October 07, 2011 @12:36PM (#3084741)
To explain:

D took C++ and improved upon it.

Go went back to C and said, "what if C++ had never existed".

Re:Merging In The GNU D Language Compiler To GCC by andralex on Friday October 07, 2011 @01:35PM (#3084978)
... "and if we were still in 1981".
Re:Merging In The GNU D Language Compiler To GCC by hasenj on Friday October 07, 2011 @10:01PM (#3086771)
Not really. Go was designed with at least these 2 ideas in mind:

- Modern web servers - Modern multi-core CPUs

None of which existed in 1981

Re:Merging In The GNU D Language Compiler To GCC by pjmlp on Saturday October 08, 2011 @05:30AM (#3087564)
None of the Go ideas are new.

And in 1981 there were already application servers, running in multiprocessor machines using Multics, UNIX and VMS, just to name a few operating systems.

Personally I see Go as a better C, nothing more.

Re:Merging In The GNU D Language Compiler To GCC by hasenj on Saturday October 08, 2011 @11:11AM (#3088078)
Interesting, I didn't know there was multi-core even back then.

But still, at least, they weren't as common place as they are now.

Re:Merging In The GNU D Language Compiler To GCC by sambeau on Saturday October 08, 2011 @10:51AM (#3088036)
"Personally I see Go as a better C, nothing more."

Which is a good thing, right?

Re:Merging In The GNU D Language Compiler To GCC by pjmlp on Sunday October 09, 2011 @08:33AM (#3090353)
Sure, we need safer systems languages.
Re:Merging In The GNU D Language Compiler To GCC by sambeau on Saturday October 08, 2011 @10:53AM (#3088040)
To be fair, the way Go uses interfaces is new.
Re:Merging In The GNU D Language Compiler To GCC by he_the_great on Sunday October 09, 2011 @12:00PM (#3090657)
Nope, not even. SML apparently did so, and probably others.
Re:Merging In The GNU D Language Compiler To GCC by pjmlp on Sunday October 09, 2011 @08:33AM (#3090351)
The only thing new about them is that you don't need to write "implements" or something similar.
Re:Merging In The GNU D Language Compiler To GCC by sambeau on Monday October 10, 2011 @07:07AM (#3093226)
It is more subtle and powerful than that.

By placing the contract at the use of a type with an interface rather than at the declaration of a type you effectively introduce a form of duck typing to a static language.

You can write an interface for a type long after the type has been declared (or been declared by someone else). Interfaces can be defined and used without having to go back and change existing code. This is very lightweight.

Re:Merging In The GNU D Language Compiler To GCC by pjmlp on Tuesday October 11, 2011 @01:49AM (#3097315)
Still, there are a few functional programming languages that offer similar concepts. Scala is one of them, as a few in the ML family.
Re:Merging In The GNU D Language Compiler To GCC by andralex on Saturday October 08, 2011 @09:34AM (#3087880)
Those are not ideas.
Re:Merging In The GNU D Language Compiler To GCC by sambeau on Saturday October 08, 2011 @10:59AM (#3088051)
They are if you put the words "easily, efficient programming of" in front of them, which I think was what the parent comment was getting at.

To be even more pedantic than yourself, I would like to point out that everything that can be expressed is an idea. For us to have a word we must have a meme. A noun and the idea of a noun are inseperable. Even mathematics is language that conforms to this rule.

jus'sayin'…

Re:Merging In The GNU D Language Compiler To GCC by andralex on Sunday October 09, 2011 @08:14AM (#3090325)
Point taken. Mine is that Go attempts to solve these new ideas with 1980s programming language technology. Touting it as a reimagining of C (or anything) would be insulting to C.
Re:Merging In The GNU D Language Compiler To GCC by sambeau on Monday October 10, 2011 @07:25AM (#3093290)
Dismissing Go as '1980s programming language technology' is unfair, patronising and misses the point.

Very little of substance has been invented in programming languages since Lisp was created in the 1950s. It has mostly been syntax.

C itself is an early 1970s language based on ideas from the 1960s. It has been the backbone of serious computing for nearly 40 years. It is 1970s programming technology that works.

One of the few 'new' things to arrive was Tony Hoare's CSP (in 1978). Go takes this idea and builds an effective implementation of it onto a C-like language with minimal noise.

Go then adds the a tiny amount of syntax to C to have a layer of Object Orientation. This is not a 'modern' 1980s style of OOP like C++ uses, rather it is the 1970s OOP of Alan Kay and Smalltalk.

So it it insulting to say that 'Go attempts to solve these new ideas with 1980s programming language technology'.

If anything, Go is 1970s technology.

Re:Merging In The GNU D Language Compiler To GCC by pjmlp on Tuesday October 11, 2011 @01:52AM (#3097321)
Have you ever used Smalltalk?

Go has very little to do with OO Smalltalk style.

The only new language that has a very close to Smalltalk OO style is Ruby.

Re:Merging In The GNU D Language Compiler To GCC by zem on Saturday October 08, 2011 @02:57AM (#3087351)
go is far closer to a better c than it is to a better c++
Re:Merging In The GNU D Language Compiler To GCC by cenuij on Friday October 07, 2011 @07:12AM (#3083446)
I don't follow you on this. You could just as well say; since Go is already in GCC I don't need another compiler to write Go and I don't need to write any D, or C++ or...

In any case D and Go are very different beasts

Re:Merging In The GNU D Language Compiler To GCC by r4vik on Friday October 07, 2011 @09:03AM (#3083751)
Yeah I wasn't clear, I mean one of the big things putting me off using D more was having to download DMD, so I'd be more inclined to write Go, if this gets merged I won't be.
Re:Merging In The GNU D Language Compiler To GCC by ori_b on Friday October 07, 2011 @09:14AM (#3083788)
Why? Both compilers are just one apt-get away.
Re:Merging In The GNU D Language Compiler To GCC by uriel on Friday October 07, 2011 @09:28AM (#3083830)
One thing to remember is that AFAIK no D2 compiler implements the whole language, and even DMD, which is the 'canonical' implementation seems to be well known for its copious bugs. This is not surprising given how huge and complex the language is.

Go's compilers (like all code) also have bugs, but you rarely if ever run into them, even given their youth and the blinding rate of improvement, they are quite stable.

Re:Merging In The GNU D Language Compiler To GCC by andralex on Friday October 07, 2011 @10:45AM (#3084188)
D1's compiler was great when D did as little as Go does. Also please stop spreading FUD - the current compiler is eminently usable.
Re:Merging In The GNU D Language Compiler To GCC by burgerbrain on Friday October 07, 2011 @11:44AM (#3084435)
"was great", implying you are conceding it now has faults but are suggesting this is only because it does more than Go does.. I'll let that stand for the furtherance of this conversation but I do disagree with your assertion...

"current compiler is eminently usable", didn't you just concede half a sentence ago that it is now full of bugs?

Re:Merging In The GNU D Language Compiler To GCC by andralex on Friday October 07, 2011 @01:32PM (#3084965)
Well we're not in court. I simply meant to say that it takes longer to write a compiler for a larger language, and that today the D compiler is of good quality.
Re:Merging In The GNU D Language Compiler To GCC by uriel on Friday October 07, 2011 @08:11AM (#3083602)
You could as well say that now that gcc can compile C++, it can drop support for C (and no, C is not a subset of C++ anymore).

Go aims for a very small and clean set of features that work well together and produce code that is easy to write and read, D seems to aim to include every C++ feature and a few more.

Re:Merging In The GNU D Language Compiler To GCC by WalterBright on Friday October 07, 2011 @12:47PM (#3084785)
Not every C++ feature at all. It does aim to include support for modern paradigms, whether or not C++ supports them.