C++, D: Dinosaurs?

Tony tonytech08 at gmail.com
Mon Nov 3 14:37:32 PST 2008


"Nick Sabalausky" <a at a.a> wrote in message 
news:genrqm$1h4$1 at digitalmars.com...
> "Tony" <tonytech08 at gmail.com> wrote in message 
> news:genht8$2fcg$1 at digitalmars.com...
>>
>> "Nick Sabalausky" <a at a.a> wrote in message 
>> news:gel5tu$1a1v$1 at digitalmars.com...
>>> "Clay Smith" <clayasaurus at gmail.com> wrote in message 
>>> news:gej5nr$13jd$1 at digitalmars.com...
>>>> Tony wrote:
>>>>> Someone has to ask the obvious question! (The question is in the 
>>>>> subject of this post).
>>>>>
>>>>> Tony
>>>>
>>>> Technically, I'd consider C++ to be undead. Old, ugly, its zombie 
>>>> rotting flesh never seems to die. It lives by eating the brains of C 
>>>> programmers.
>>>>
>>>> ~ Clay
>>>
>>> Funny you mention that, the analogies I normally think of for C++ are 
>>> either a 120+ year-old on life support or, as you said, the living dead. 
>>> It's long past it's time, but people just won't let it finally rest 
>>> (probably because, aside from D, there's no modern language that's a 
>>> suitable replacement for C++ in *all* of C++'s use-cases. C# and Java, 
>>> for instance, are only partial replacements. They can handle many of 
>>> C++'s uses, but not all.)
>>
>> The "in *all* of C++'s use-cases" part is probably the way to create a 
>> dinosaur (call it E, F or G or whatever). The concept of "general purpose 
>> language" is getting a bit long-toothed?
>>
>> Tony
>
> I strongly disagree. The concept of domain-specific languages is 
> ultra-trendy these days (probably promoted by the same knuckleheads that 
> hailed things like pure-OO, pure-functional, and Extreme Programming as 
> silver bullets).

> But I consider domain-specific languages to be purely a symptom of a 
> strong need for a better general purpose language.

Probably. But to further on that, I would say that languages like C++ and D 
ARE the specialized ("domain specific") languages rather then the "general 
purpose" ones. Consider them as "where/when you need high level assembly 
language type of tool". Everyone who invents "the better C++" ends up in the 
same category as that overly complex, for a GP language, language.

>
> Let's face it: programming needs and uses have expanded so much over the 
> last decade or so that C/C++ hasn't really been a "general purpose" 
> language for quite some time.

"General Purpose Language" may indeed be an oxymoron. (All kinds of jokes 
noting 'GPL', omitted).

> These days it's a systems/performance language instead.

And not a very influential one at that, which really bogs down development.

> True, all the attempts at retrofitting it with modern-ish features to try 
> to keep it general-purpose have turned it into a regular frankenstein's 
> monster of a language, but that does nothing to disprove the viability of 
> general purpose languages in general.

If you define "general purpose" like C++ does, then that's exactly what you 
will get: something trying to be all things to all people, which never works 
well.

> It just demonstrates that C++ needs a reboot (hence: D). Heck, D is 
> already far better as a general-purpose language than C/C++ (although it's 
> still not quite there yet).

Note that I put them in the same grouping, so you know where I stand with D. 
I mean, it's fine for those who like cosmic OO hiearchy in the 
implementation and also like GC (one HAS to use GC with D, right?). I have 
my own memory management architecture so I don't want to be forced to use 
something else.

>
> I'd *much* rather use a true general-purpose language (which, again, C++ 
> is no longer an example of) than muck around with 500 different languages 
> for every stupid little thing.

Now you're being typically extremist. There is continuum from 1 to 500. 
Obviously then the task becomes deciding where to draw the lines.

>
> For example, have you ever tried doing web development? You can't 
> realistically do anything nontrivial without tripping over at least 
> handful of different, essentially domain-specific, languages: ECMAScript, 
> (T)SQL, (X)HTML, XML, CSS, and either PHP, ASP/VBScript, ASP.NET/C#, 
> Python or Ruby.

I wouldn't do it that way. A lot of the difficulty is trying to get content 
specification and delivery technologies to work like a real program. You 
have specified a bunch of high level tools (not all nor most are languages 
in the sense of C, D etc BTW) and therefore made the development complex 
just by the sheer number of tools and therefore knowledge needed. If you 
think you need all that just because your website hosting provider supports 
those, maybe it's time to self-host and code up what you want with a small 
subset of tools: whatever you want to create the content, an embedded 
database, maybe ISAPI on Windows. Depending on how dynamic (read "program 
like") the website needs to be may cause some headaches because there is no 
good solution for that because the web was not designed to do that.

> And that's just the bare minimum for any non-trivial web site.

Not necessary at all.

> For one thing, most of those are great examples of the fact that 
> domain-specific languages do nothing to prevent piss-poor language design.

I too don't want to use more languages than necessary (read: one). I want 
good libraries with a good "GPL" to handle most things. If you relegate the 
"domain specific" moniker to only such high level and disparate technologies 
that you mentioned, well, those are the things I avoid or want to avoid.

> But besides that: Conceptually, web development is one of the most trivial 
> forms of programming out there. But the domain-specific language-soup 
> realities of it have turned what should have been trivial into one of the 
> programming world's biggest pains-in-the-ass. It's an absolute mess.

It's not that bad unless you are forced to program to your host's interfaces 
that they must maintain to control what one can do on a machine from a 
security point of view. If you are self-hosting, there are no such limits: 
you write the code and trust it to do what you want it to.

> I'm currently writing my first compiler, and I have in the past written 
> homebrew for the Atari VCS, and an Asm sound driver for a multiprocessing 
> microcontroller/embedded-device that has no sound hardware other than a 
> generic DAC capability. All of those have proven to be far less 
> pains-in-the-ass than any of my web development work. Considering the 
> conceptual simplicity of the web, that's just absolutely pathetic.

Trying to make an elephant jump through a hoop is difficult, yes.

Tony 





More information about the Digitalmars-d mailing list