October 05, 2010 What would you rewrite in D? | ||||
|---|---|---|---|---|
| ||||
Just asking out of curiosity. With all the great language features, I'm sure that many of you have thought about this. For me, I figured a good start would be your basic Unix/Linux/BSD utilities, like cat and grep. I figure it may make the code easier to read and maintain as well as potentially improve the quality of the software. Of course, most of these are so old they're probably quite bug free, but some probably could use a rewrite. Some may even benefit for threading. Anyone else? Casey | ||||
October 05, 2010 Re: What would you rewrite in D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to sybrandy | sybrandy: > Anyone else? There are several things I'd like to translate to D. Some of them are: - a constraint solver that I use in Python - many small things to perform combinatorics (this is partially fit for Phobos2 too). - The mem.c/mem.h memory management utility written by Walter for C programming, from here: http://c.snippets.org/code/temp/snip-c.zip for when you need to use manual memory management in D :-) - A hierarchical memory manager, http://swapped.cc/halloc/ again for low-level manual memory management. - This little C++ solver for the fifteen puzzle: http://www.codeguru.com/dbfiles/get_file/puzzle_src.zip - Some other small and medium-sized bioinformatics tools. Bye, bearophile | |||
October 06, 2010 Re: What would you rewrite in D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to sybrandy | DMD
--
... <IXOYE><
| |||
October 06, 2010 Re: What would you rewrite in D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to BCS | There is DDMD.
On Wed, Oct 6, 2010 at 10:04 AM, BCS <none@anon.com> wrote:
> DMD
>
> --
> ... <IXOYE><
>
>
>
>
| |||
October 06, 2010 Re: What would you rewrite in D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to sybrandy | On 10/5/10 17:27 CDT, sybrandy wrote:
> Just asking out of curiosity. With all the great language features, I'm
> sure that many of you have thought about this.
>
> For me, I figured a good start would be your basic Unix/Linux/BSD
> utilities, like cat and grep. I figure it may make the code easier to
> read and maintain as well as potentially improve the quality of the
> software. Of course, most of these are so old they're probably quite bug
> free, but some probably could use a rewrite. Some may even benefit for
> threading.
>
> Anyone else?
>
> Casey
I wouldn't spend much time on rewriting classic utilities in D. There's plenty to be done anew. One category of tools to be written in D are utilities aimed at D itself (parsers, analyzers, Thrift bindings, protocol buffers bindings, code for DB interface, etc.)
Andrei
| |||
October 06, 2010 Re: What would you rewrite in D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to sybrandy | "sybrandy" <sybrandy@gmail.com> wrote in message news:i8g8oi$1hv6$1@digitalmars.com... > Just asking out of curiosity. With all the great language features, I'm sure that many of you have thought about this. > > For me, I figured a good start would be your basic Unix/Linux/BSD utilities, like cat and grep. I figure it may make the code easier to read and maintain as well as potentially improve the quality of the software. Of course, most of these are so old they're probably quite bug free, but some probably could use a rewrite. Some may even benefit for threading. > Not that I would want to do it myself, but I'd like to see LLMV and Scintilla moved to D. But really, just about anything in C/C++ that I might ever want to modify. If I never have to touch another line of C/C++ it'll be too soon. | |||
October 06, 2010 Re: What would you rewrite in D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Tuesday 05 October 2010 20:16:41 Andrei Alexandrescu wrote:
> On 10/5/10 17:27 CDT, sybrandy wrote:
> > Just asking out of curiosity. With all the great language features, I'm sure that many of you have thought about this.
> >
> > For me, I figured a good start would be your basic Unix/Linux/BSD utilities, like cat and grep. I figure it may make the code easier to read and maintain as well as potentially improve the quality of the software. Of course, most of these are so old they're probably quite bug free, but some probably could use a rewrite. Some may even benefit for threading.
> >
> > Anyone else?
> >
> > Casey
>
> I wouldn't spend much time on rewriting classic utilities in D. There's plenty to be done anew. One category of tools to be written in D are utilities aimed at D itself (parsers, analyzers, Thrift bindings, protocol buffers bindings, code for DB interface, etc.)
>
> Andrei
Indeed.
It could be reasonable to convert existing C or C++ code to D if you're going to be heavily changing it, but converting pre-existing applications which are currently in C or C++, and which you don't need to maintain, seems like a waste of time. It _could_ be an interesting exercise in how to do things in D and could very well show shortcomings in D, dmd's current implementation, and/or shortcomings in Phobos, but then so would new applications.
At this point, if I can choose what language I'm going to write something in, I'm almost certainly going to choose D (though obviously stuff like GUI apps may not really be properly feasible in D yet, and some things are just gonig to work better in other languages), but I have enough to do (and not enough time to do it) without spending the time to rewrite entire, working applications in D.
- Jonathan M Davis
| |||
October 06, 2010 Re: What would you rewrite in D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to sybrandy | sybrandy Wrote:
>What would you rewrite in D?
Phobos.
| |||
October 06, 2010 Re: What would you rewrite in D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Kagamin | On Wed, 06 Oct 2010 10:29:24 +0400, Kagamin <spam@here.lot> wrote:
> sybrandy Wrote:
>
>> What would you rewrite in D?
>
> Phobos.
Nice one!
| |||
October 06, 2010 Re: What would you rewrite in D? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Kagamin | On 10/6/10 1:29 CDT, Kagamin wrote:
> sybrandy Wrote:
>
>> What would you rewrite in D?
>
> Phobos.
The irony/joke is lost on me, so I'll bite: how do you mean that?
Andrei
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply