www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Software architecture support in D.

reply Gor Gyolchanyan <gor.f.gyolchanyan gmail.com> writes:
There are some very useful generic concepts, which are often used when
designed a software architecture.
A few of those are:
* Message passing (event-driven programming).
* State machines.
* Component-driven programming.
Having a proper support for these concepts means an easy and pleasant
time, spent designing software architectures.
The cost of software, written in D would be greatly reduced, because
one would only need to define the program logic, using ready-to-use
tools as mentioned above. This also means much cheaper and better way
of rewriting legacy code (which will come in VERY handy, regarding
compatibility with existing libraries).
What do you think? Is it worth the effort of writing such generic
tools for Phobos?
Oct 25 2011
next sibling parent reply simendsjo <simendsjo gmail.com> writes:
On 25.10.2011 12:07, Gor Gyolchanyan wrote:
 * Message passing (event-driven programming).

std.concurrency and zeromq (missing a good wrapper). libev or libevent would be nice too.
Oct 25 2011
next sibling parent simendsjo <simendsjo gmail.com> writes:
On 25.10.2011 12:18, Gor Gyolchanyan wrote:
 yeah. 0MQ is the ultimate concurrency tool. I just love it.
 But i mean a D-solution, rather then a C-solution port.
 D's rich modeling power allows those concepts to be implemented in a
 whole new and incredibly flexible and easy-to-use way.

Missing libraries is a big problem for D. It's much better to have wrappers for c libraries until Ds community is large enough to have it's own solutions.
Oct 25 2011
prev sibling parent filgood <filgood somewhere.net> writes:
have you seen this?

https://github.com/itiu/zeromq-connector



On 25/10/2011 11:18, Gor Gyolchanyan wrote:
 yeah. 0MQ is the ultimate concurrency tool. I just love it.
 But i mean a D-solution, rather then a C-solution port.
 D's rich modeling power allows those concepts to be implemented in a
 whole new and incredibly flexible and easy-to-use way.

 On Tue, Oct 25, 2011 at 2:14 PM, simendsjo<simendsjo gmail.com>  wrote:
 On 25.10.2011 12:07, Gor Gyolchanyan wrote:
 * Message passing (event-driven programming).

std.concurrency and zeromq (missing a good wrapper). libev or libevent would be nice too.


Oct 30 2011
prev sibling next sibling parent Gor Gyolchanyan <gor.f.gyolchanyan gmail.com> writes:
yeah. 0MQ is the ultimate concurrency tool. I just love it.
But i mean a D-solution, rather then a C-solution port.
D's rich modeling power allows those concepts to be implemented in a
whole new and incredibly flexible and easy-to-use way.

On Tue, Oct 25, 2011 at 2:14 PM, simendsjo <simendsjo gmail.com> wrote:
 On 25.10.2011 12:07, Gor Gyolchanyan wrote:
 * Message passing (event-driven programming).

std.concurrency and zeromq (missing a good wrapper). libev or libevent would be nice too.

Oct 25 2011
prev sibling next sibling parent Mirko Pilger <pilger cymotec.de> writes:
 * State machines.

http://www.complang.org/ragel/
Oct 25 2011
prev sibling next sibling parent Gor Gyolchanyan <gor.f.gyolchanyan gmail.com> writes:
It generates D code externally for a specific state machine.
I meant a purely library solution for a ready generic state machine to
which you can hook pu your specific program logic.

On Tue, Oct 25, 2011 at 2:29 PM, Mirko Pilger <pilger cymotec.de> wrote:
 * State machines.

http://www.complang.org/ragel/

Oct 25 2011
prev sibling next sibling parent Gor Gyolchanyan <gor.f.gyolchanyan gmail.com> writes:
It's unclear whether a particular solution is easier to implement in
D,  or is easier to translate from C.
These cases, which i enumerated seem to be easier to implement in D,
because they're very high-level, which C doesn't work too good with.

On Tue, Oct 25, 2011 at 2:30 PM, simendsjo <simendsjo gmail.com> wrote:
 On 25.10.2011 12:18, Gor Gyolchanyan wrote:
 yeah. 0MQ is the ultimate concurrency tool. I just love it.
 But i mean a D-solution, rather then a C-solution port.
 D's rich modeling power allows those concepts to be implemented in a
 whole new and incredibly flexible and easy-to-use way.

Missing libraries is a big problem for D. It's much better to have wrappers for c libraries until Ds community is large enough to have it's own solutions.

Oct 25 2011
prev sibling next sibling parent Jose Armando Garcia <jsancio gmail.com> writes:
On Tue, Oct 25, 2011 at 4:49 AM, Gor Gyolchanyan
<gor.f.gyolchanyan gmail.com> wrote:
 It's unclear whether a particular solution is easier to implement in
 D, =A0or is easier to translate from C.

You can translate zeromq's headers to D in 10 minute. I will give you a day to make a D wrapper. I doubt you will be successful in implementing zeromq in a day. Is that still unclear?
Oct 28 2011
prev sibling parent Gor Gyolchanyan <gor.f.gyolchanyan gmail.com> writes:
It's a single instance which, in fact, is easier to translate.
There are numerous mathematical libraries and stuff like libevent,
which is WAY better to implement in D because of huge differentce of
available tool set.

On Fri, Oct 28, 2011 at 7:00 PM, Jose Armando Garcia <jsancio gmail.com> wr=
ote:
 On Tue, Oct 25, 2011 at 4:49 AM, Gor Gyolchanyan
 <gor.f.gyolchanyan gmail.com> wrote:
 It's unclear whether a particular solution is easier to implement in
 D, =A0or is easier to translate from C.

You can translate zeromq's headers to D in 10 minute. I will give you a day to make a D wrapper. I doubt you will be successful in implementing zeromq in a day. Is that still unclear?

Oct 29 2011