[Sussex] RE: The 'D' programming language
Steve Dobson
SDobson at manh.com
Thu Feb 20 10:44:00 UTC 2003
Morning all
On 20 February 2003 at 09:21 Geoff Teale wrote:
> Trevor wrote:
> -------------
> > So that's it. I like Java, don't like C++, write
> > old-fashioned C ('cos I've
> > been doing it for a while) and I know what printf() returns.
> > I can just
> > about remember how to write FORTRAN, I've written assembler
> > on a variety of
> > platforms (but *only once* on an x86, and that was to
> > interface with the PCI
> > BIOS subsystem...).
>
> Trevor - I don't think a love of Java and a dislike of C++ is entirely
> uncommon. When you get into Object Oriented Design you start to want the
> world to be a very clean, ordered place. Java is very good at providing
> this environment, C++ - well, your own structures can be very clean and
> elegant but the legacy of C is there in large print and it can lead to
> inelegance and force you to do, and think about, things at a level that
> doesn't fit well with the mindset of the object orientated developer.
I have herd it said that Bill Joy will not add some features to the
Java language because it would make is as cluttered as C++ can be.
While some of features might be useful - I have to say that he has
a point. The more cluttered a language becomes the more there is
to dislike in the code use see written. It takes a very, very good
programmer to write a nice code all the time.
> Of course the thing is OO is the perfect tool to make this kind of code
> more elegant - you abstract away the very technical parts of the job
> inside classes and then use the elegant interfaces you have designed
> to do the actually flow of the system (I'm trying hard to express that
> without using the phrase "Business Logic" - which to my mind is an
> expression reserved for the same idiots who counter any technical
> discussion they didn't understand with "we have to fulfil the business
> need" or "lets take this to the business and see what they want to run
> with" - ultimately these people are on the fast-track to promotion - but
> they are also the producers of _bad_ systems, they produce what the
> customer says he wants - rather than what he actually wants).
You've must have worked with a lot of people who's logon should have been
"id10t" :-) I have a very clean (OO) definition of "Business Logic":
Code that actually implements the process of the business. When a
customer places an order some part of the "Business Logic" will have to
make an associated with the payment details so that when the goods/services
are delivered his/her credit card can be debited. How the credit card
is debited is the job of the "System Code" within the CreaditCard class.
What is so hard in this to understand?
> I actually think that C++ can be _very_ clean, judicial use of libraries
> such as the STL, Gtk-- or Trolltech's Qt 3.x (yes, the latter two are far
> from just GUI libraries, they are complete development toolkit's that make
> C++ a _very_ different place) but of course, a lot of this takes you away
> from a standarised language towards a specialised toolkit.
Any language can be used in a clean way. One of the ways I think Java
scores that it has actively been designed to be clean. The syntax doesn't
really allow anything else (format aside).
> So what happens if you set out to produce an object oriented language
> with C style syntax but without the concessions to the past or OS level
> programming. Some people will scream Java at this point, and yes, you
> could be right, but a more logical answer is "D".
> http://www.digitalmars.com/d/
<snip>
So the developers of "D" have taken a good look and learned from the
mistakes and successes of those that when before - I call that progress.
> The idea is that C++ is a compromised system... <snip>
Of course C++ is a compromise system; it was designed to be. OO incourages
re-use - and I think I'm write in saying that it was a driving factor in
Stroustrup's design of the language. By making C++ a superset of C one
can make use of all the C libraries that are out there. Okay - I know that
you know this Geoff - I've seen some of your C++ code and it made use of
the Wrapper pattern.
At the end of the day C++ carries the baggage that was built in to it to
get it accepted when C was everywhere. The biggest problem any new
language has is getting wide spread acceptance in the developer community.
Java's pick up was amazing. At one time Sun measured the "life" of Java
in days - and then you couldn't walk in to Waterstones with out seeing
at least one shelf full of Java books - and Java was only 800 days old -
that's around 3 years old!!!!!!
My claim to shame is I was at the UK Sun expo the year they released Java.
There was a stand there - I walk by - I didn't anything on the stand to
warrant my attention - There, at last, my secret is out!
Steve
More information about the Sussex
mailing list