November 23, 2005
> Someone was working on an MSIL compiler for D.  The project was doing pretty well the last time I heard about it, too, though it's been a while since then.

DNet, yeah, I saw it. It allowed you to use the .NET framework, which is great, but too bad the exe is not native code in that case. Indeed, is it even possible to use .NET from a native code application? I'll have to try this VS2005.

> Ares was created to serve a twofold purpose: first, some folks were unhappy with the overall "feel" of Phobos for one reason or another and wanted to try and address those issues, and second, response from Walter regarding library submissions has been a bit too slow on occasion for the rabid newsgroup posse, and it seemed like a community-driven effort might be more accessible.

Walter already has a compiler to take care of, can imagine he's busy : )

> That said, I'm not particularly interested in seeing Phobos, Ares, or Mango ported to another language, largely because I'm using D because I prefer it to those other languages.  In a world full of procedural languages, the reasons to choose one over another typically come down to tool support or style preference.

My problem is that I don't really start with a new project any time soon. I'm working on a huge project and am constantly rewriting bits. The entire project must keep running, and we release a new version once per week. There's no way to convert all the code to D, but it's doable to start using a different library for some pieces. I was imagining my own C++ Phobos to replace all the fopen's and CreateFile's. Not necessarily to convert the whole thing to D later, but just to force people to use 1 way of doing things. And to clean up, of course.

> All of the libraries you've mentioned are still evolving.  If there's something you like or don't like about one of them, by all means post feedback.  And if you're interested in porting another library to D, feel free to do so.  The greatest barrier to progress is a lack of free time ;-)

How true. If I would have had more free time, I would have started making an ultimate standard library and would have posted that instead of the post I wrote now.

L.


November 23, 2005
Chris wrote:
> I requested (quite politely of course) that Deja Augustine release the
> source to the D community so we could continue to develop it.
> Unfortunately I never heard back from him.
> 

That is really a shame.

> I know a thing or two about MSIL but I lack the experience to write a
> full parser and compiler. I could not start a project such as this,
> but I could definitely improve on existing code if it were available.

If you ever get that code you can count on me to help you improve it.
:)

> 
> Chris
November 23, 2005
Lionello Lunesu wrote:
 > What disturbs me is the fact that every new language introduces a new
> 'standard' library. And it's mostly the success of the standard library that determines the language's faith. It's one thing to learn a new syntax, but with each new language we also have to learn a new library. This wastes a lot of time, probably more than learning the language itself. Why is there no single, cross-language standard library? .NET?
> 
> In this respect, I think Microsoft's got it right with their .NET framework: whatever language you use, there's only one 'standard library'. 

<rant>
 I think .NET is a great fraud. There is only *one* .NET language, it's C#. There's only one standard libray -- the C# standard library. The other languages don't have one. Other languages are supported only to the extent that they are similar to C#. VB6 was too different, it got shafted. C++ got a lobotomy, a hack was required to supported deterministic destruction. The container classes  are pathetic by C++ standards. There's no support in the IL for 80 bit reals. .NET is C# through and through.
They had an enormous budget, and they abandoned compatibility with C, with the Windows API, and even the x86 CPU, they had Java to learn from, and the best they could come up with was C# ???? Any idiot can produce a cleaner language by cutting the stupid bits out of C++, if you don't mind losing the best bits at the same time.
</rant>

Libraries are always closely tied to their language. But, I agree that we should copy a successful structure as far as possible.

> My suggestions:
> * merge Phobos, Ares and Mango into one helluva standard library
> * adopt either the .NET framework or the python modules structure
> 
> Of course, D's standard library must remain in native code. I'm only suggesting adopting another library's structure.

I agree completely, I think we should clarify what the barriers are to repackaging Phobos.
The crucial question is, can the code from Phobos be pulled into Ares, and repackaged as a much better standard library, or are there issues with the licenses? It would just be ridiculous for Ares to reimplement things that are already in Phobos.

Walter's a fantastic language designer and compiler writer, but D would progress much faster if the standard library could be spun off. Even if there was a repository for branches on the library, with Walter retaining the sole authority to merge branches into the trunk. The docs could improve quickly, for a start, instead of wasting effort updating that stupid wiki instead of the real thing.
Reduce Walter's involvement into "have a look at the changes in this file, if it's OK, click this button to check it into the official Phobos". Especially, he's got better things to do than fix typos in documentation.
November 23, 2005
Don Clugston wrote:
> <rant>
>  I think .NET is a great fraud. There is only *one* .NET language, it's C#. 

What do you mean by this? There are many .NET languages. Any language that conforms to some rules, types and gets translated to MSIL can be a .NET language. Even D could.

> There's only one standard libray -- the C# standard library. 

Iz is .NET standard library, and if D had a .NET compiler it would equally be D.NET's std lib.

> The other languages don't have one. Other languages are supported only to the extent that they are similar to C#. VB6 was too different, it got shafted. C++ got a lobotomy, a hack was required to supported deterministic destruction. 

With this I agree, C++.NET is the ugliest thing in the world.

> The container classes  are pathetic by C++ standards. There's no support in the IL for 80 bit reals. .NET is C# through and through.
> They had an enormous budget, and they abandoned compatibility with C, with the Windows API, and even the x86 CPU, they had Java to learn from, 

Well in the end .NET code gets just-in-time compiled to WinAPI calls and x86 instructions, there is just one more step in between - MSIL.

> and the best they could come up with was C# ???? Any idiot can produce a cleaner language by cutting the stupid bits out of C++, if you don't mind losing the best bits at the same time.

I agree D is much better, and more powerfull than C#, that is why it would ne so great to have an alternative D(.NET) compiler. Some people like-it-or-not have to program in .NET and D would be IMHO a far better choise than C#.
November 23, 2005
"Lionello Lunesu" <lio@remove.lunesu.com> wrote in message news:dm161c$q45$1@digitaldaemon.com...
>I think it's universally acknowledged that Phobos must change and grow. Even
>> though it's still in beta, D is very usuable, while its library lets it down (I've found myself preferring to reinvent the wheel rather than try to cope with its bugs and shortcomings).
>
> That can't be right. Who wants to do that? If the solution to problems in Phobos is 'to reinvent the wheel' it's clear that there's something wrong somewhere.
>
>> What should constitute a standard library? It is perhaps worth considering other standard libraries. J2SE/J2EE and the .NET framework (and to some extent Delphi's VCL) cover a vast swathe of ground, from base types to collections, from I/O to HTTP, from XML processing to databases, from graphics to windowing. But the C++ standard library restricts itself more or less to containers and memory. Ruby and Python seem to fall somewhere between the two camps. Where should Phobos draw the line?
>
> Defining this would indeed be a good start. But also the other functionality (not in Phobos) should be given direction.
>
>> Walter, single-handedly, won't be able to build a library the size and scale of others mentioned above.
>
> Of course. My concern is that Phobos stays as is and that 'other functionality' will only be available in 'third party' libraries, scattered among multiple, overlapping libraries. Your linked exe ends up having 4 different 'open file' functions.
>
>> So as I see it, the solution is for the community to club together and build its own ideal standard library, and if it ends up remaining unofficial, so be it - D users would at least have a single, deep, compendious library to code against. What would the cons be of taking this path (design by committee isn't always a curse)?
>
> I think that's perfect! And whiule designing this new library, why not adopt an existing library's structure? Should also save some time since you don't spend much time thinking about the API, classes, interfaces.
>
>> As for basing your library on other language's libraries, there'd be numerous pitfalls you'd need to avoid. Do you slavishly clone every aspect?
>
> I think the positive aspects of slavishly cloning the structure outweigh the negative. Familiarity for many people is a greater benefit (to them, and therefor to the language) than being able to optimize special cases.

Still not sure about that. This assumes the API you copy is the best way of doing something. I like the structure of the .NET BCL and there's a lot it gets right, but is it appropriate for D?

>
>> What about differences in behaviour? Users would probably expect it to function the same as the API they're accustomed to (I think we've seen some of this already with DWT and DFL). And so on. But such an approach could provide a good, solid springboard.
>
> By adopting an existing API you obviously adopt its behaviour. The
> behaviour of the function is in fact more important than it's name or the
> module it's in. Thinking about it, I think it's the behaviour of functions
> that takes the longest to learn. Does it throw? Does it accept null? What
> if....?
> As for DWT, DFL: they should both have adopted WTL or Windows Forms, or
> VCL or something :-)
>
>> In this day and age, I reckon a practical, valuable standard library should include, on top of what Phobos provides, modules that cover character encoding (and conversions), globalisation (calendars, cultures), Internet/HTTP (with asynchronous I/O), databases (SQL etc), and XML (stream-based readers and writers, a DOM implementation, schemas, XSLT, XPath).
>
> I agree. Seems Phobos has a long way to go.
>
>> One consideration - what's the consensus on distributing shared binaries with a library? Certainly this would speed things up, like the writing of the XML packages, which could sit atop libxml2 (and in fact I have already done this).
>
> I don't know what the consensus is but I wouldn't mind ; )  It surely beats the rewriting the whole lib in D.

Of course, rewriting existing libraries in D isn't the only way to go about it, and wouldn't be optimal - you end up copying those libraries' bugs and inefficiencies. You could start from scratch, as Mango did with its XML modules.

>
> L.

There might be an opportunity here to start over, to re-think string handling (see the recent threads), add missing functionality, fill language gaps (array helpers like indexOf/lastIndexOf, insert/remove; a hashtable that works with interfaces), and so on.


November 23, 2005
Hi,

> .NET is C# through and through.

Well yeah, why wouldn't you have at least one language that fits the library perfectly, or the other way around: one library that fits C# perfectly. I don't know which one was first : )

> They had an enormous budget, and they abandoned compatibility with C, with the Windows API, and even the x86 CPU, they had Java to learn from, and the best they could come up with was C# ???? Any idiot can produce a cleaner language by cutting the stupid bits out of C++, if you don't mind losing the best bits at the same time.

As I recall they not only cut stuff, but also added quite a few new thingies, not unlike D. As far as C++ .NET is concerned, I've done a small program in it and it is ...disgusting... I'm sticking to WTL when coding Windows apps in C++.

> The crucial question is, can the code from Phobos be pulled into Ares, and repackaged as a much better standard library, or are there issues with the licenses? It would just be ridiculous for Ares to reimplement things that are already in Phobos.

I think that's what's already been done. I believe Ares is a full replacement for Phobos, including AA and GC.

> Walter's a fantastic language designer and compiler writer, but D would progress much faster if the standard library could be spun off. Even if there was a repository for branches on the library, with Walter retaining the sole authority to merge branches into the trunk. The docs could improve quickly, for a start, instead of wasting effort updating that stupid wiki instead of the real thing.

I agree! The wiki's is getting kind-of messy. Of course, anybody can go about and organize stuff. Maybe the official docs should be imported into the wiki and be the unofficial "official doc".

> Especially, he's got better things to do than fix typos in documentation.

<cynic>Yeah, fixing bugs in DDoc.</cynic>
Walter's doing a great job as the language designer and compiler writer.
Eventhough the language lacks some features I would personally like, in the
end having 1 reviewer is reassuring. At least there's consitency in
decisions (well, should be anyway).

I really believe Phobos is pulling D down, rather than pushing it up, which is a real shame. D deserves better.

L.


November 23, 2005
"Ivan Senji" <ivan.senji_REMOVE_@_THIS__gmail.com> wrote in message news:dm1e9c$vj6$1@digitaldaemon.com...
> Don Clugston wrote:
>> <rant>
>>  I think .NET is a great fraud. There is only *one* .NET language, it's
>> C#.
>
> What do you mean by this? There are many .NET languages. Any language that conforms to some rules, types and gets translated to MSIL can be a .NET language. Even D could.

Right - there are dozens of .NET languages. http://www.dotnetpowered.com/languages.aspx. C# was merely the first to be designed especially for .NET.

>
>> There's only one standard libray -- the C# standard library.
>
> Iz is .NET standard library, and if D had a .NET compiler it would equally be D.NET's std lib.
>
>> The other languages don't have one. Other languages are supported only to the extent that they are similar to C#. VB6 was too different, it got shafted. C++ got a lobotomy, a hack was required to supported deterministic destruction.
>
> With this I agree, C++.NET is the ugliest thing in the world.

That's not the case anymore. The new C++/CLI is a vast improvement over Managed C++ (although it no longer looks like C++).

>
>> The container classes  are pathetic by C++ standards. There's no support
>> in the IL for 80 bit reals. .NET is C# through and through.
>> They had an enormous budget, and they abandoned compatibility with C,
>> with the Windows API, and even the x86 CPU, they had Java to learn from,
>
> Well in the end .NET code gets just-in-time compiled to WinAPI calls and x86 instructions, there is just one more step in between - MSIL.
>
>> and the best they could come up with was C# ???? Any idiot can produce a cleaner language by cutting the stupid bits out of C++, if you don't mind losing the best bits at the same time.
>
> I agree D is much better, and more powerfull than C#, that is why it would ne so great to have an alternative D(.NET) compiler. Some people like-it-or-not have to program in .NET and D would be IMHO a far better choise than C#.


November 23, 2005
Ivan Senji wrote:
> Don Clugston wrote:
> 
>> <rant>
>>  I think .NET is a great fraud. There is only *one* .NET language, it's C#. 
 > What do you mean by this? There are many .NET languages. Any language
> that conforms to some rules, types and gets translated to MSIL can be a .NET language. Even D could.

I know that's the official line, but it is really not true. AFAICT, the only reason the other languages exist is so that C++ and VB programmers don't feel like they've been abandoned. (In fact, VB.NET is just a preprocessor which replaces the syntax and feeds the result into the C# compiler).

Of course I'm exaggerating, but the point is, the rules and types, and even the MSIL itself, were custom-made for C#. MSIL is not language-neutral. It is an intermediate language for compilation of C#; every other language has to "make do". To an extent, you can deduce the features of C# just by reading the MSIL docs.

>> There's only one standard libray -- the C# standard library. 
> 
> Iz is .NET standard library, and if D had a .NET compiler it would equally be D.NET's std lib.

That would be the same as C++ using the C standard library. It's not a C++ library, it's not written the way you'd write a C++ library, at all.

And this is why C++.NET and VB.NET had to have features like delegates and garbage collection added, they are an essential part of the libraries.

> I agree D is much better, and more powerfull than C#, that is why it would ne so great to have an alternative D(.NET) compiler. Some people like-it-or-not have to program in .NET and D would be IMHO a far better choise than C#.

I agree with that.
November 23, 2005
>>The crucial question is, can the code from Phobos be pulled into Ares, and repackaged as a much better standard library, or are there issues with the licenses? It would just be ridiculous for Ares to reimplement things that are already in Phobos.
> 
> 
> I think that's what's already been done. I believe Ares is a full replacement for Phobos, including AA and GC.

It's only enough to compile. All the functions like writef(), the string functions, the math functions, io, etc are not in Ares.

> I agree! The wiki's is getting kind-of messy. Of course, anybody can go about and organize stuff. Maybe the official docs should be imported into the wiki and be the unofficial "official doc".

Better I think would be to create a subversion repository (on dsource?) and import phobos and the docs into it.
Then anyone could change it, and if Walter liked any changes, he could bless it as official, and someone could update the unofficial phobos with the official one every time a release was made. Of course he would have to agree to the existence such an unofficial phobos repository.

I just suggest this because it would require no effort from Walter. It would of course be better if there was an official repository.

trunk --- official DMD releases
branch --- latest unofficial release for Walter to review
subbranches --- new submissions.

One branch could be called 'Ares' :-) The Ares crowd could fold relevant Phobos updates into their branch, instead of needing to reinvent the wheel.
I just hate to see duplicated effort.

> I really believe Phobos is pulling D down, rather than pushing it up, which is a real shame. D deserves better.

I couldn't agree more.
November 23, 2005
Let me give some of my thoughts on this issue:

I too think good libraries are very important, but I question the need for them to be "standard", and by "standard" I mean supervised by the language makers, or being part of the language library standard itself. Actually, let me refine this statement in two cases:
One is about libraries about general-purpose stuff, like containers, IO, memory, etc., -> yes, those should be in the language standard.
But more specific or advanced stuff, like XML, DOM's, HTTP and advanced networking, databases, graphical toolkits, etc., they could well be in seperate libraries, or in a whole seperate high-level library. What I want of such library is that it be consistent, well-structured, etc. and possibly "standard" in the sense that there aren't a slew of different ones to do the same thing, but I don't necessarely want to be the language makers the responsable for such library.
Take for example Boost, it's a great library, and it didn't have to be part of the standard library (altough they're thinking of assimilating some things)

Also, in D's case, Walter as a one-man show will never be able to make a standard library as comprehensive as .Net's or Java's, altough surely he agrees on the importance of a good library.
In fact, even for the core library (the general-purpose stuff) Walter's time is very limited, so there's no purpose is just sitting and wishing for such a library to exist. The best we can do is ask to those interested in the D community to help build a good "single" library instead of the slew of stuff we have currently (Phobos, Ares, MinTL, DTL, Mango, etc.), and then maybe someday it would be good enough that it (or parts of it) would be incorporated in the D standard.


-- 
Bruno Medeiros - CS/E student
"Certain aspects of D are a pathway to many abilities some consider to be... unnatural."