Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > C as a Subset of C++ (or C++ as a superset of C)

Reply
Thread Tools

C as a Subset of C++ (or C++ as a superset of C)

 
 
lawrence.jones@siemens.com
Guest
Posts: n/a
 
      09-11-2012
Malcolm McLean <(E-Mail Removed)> wrote:
>
> Yes, we badly need one programming language that does everything.


What you'll get is a programming language that does everything badly.
--
Larry Jones

I can feel my brain beginning to atrophy already. -- Calvin
 
Reply With Quote
 
 
 
 
Malcolm McLean
Guest
Posts: n/a
 
      09-11-2012
בתאריך יום שלישי, 11 בספטמבר 2012 16:14:25 UTC+1, מאת (E-Mail Removed):
> Malcolm McLean <(E-Mail Removed)> wrote:
>
> > Yes, we badly need one programming language that does everything.

>
>
> What you'll get is a programming language that does everything badly.
>

That's arguably OK. Better to do every badly, but at least work, everywhere, than have a finely honed, expensively developed, very interesting program, in Lisp.
 
Reply With Quote
 
 
 
 
Nick Keighley
Guest
Posts: n/a
 
      09-12-2012
On Sep 11, 11:14*pm, Malcolm McLean <(E-Mail Removed)>
wrote:
> בתאריך יום שלישי, 11 בספטמבר 2012 16:14:25 UTC+1, מאת (E-Mail Removed):> Malcolm McLean <(E-Mail Removed)> wrote:
>
> > > Yes, we badly need one programming language that does everything.

>
> > What you'll get is a programming language that does everything badly.

>
> That's arguably OK. Better to do every badly, but at least work, everywhere, than have a finely honed, expensively developed, very interesting program, in Lisp.


oh. I assumed you were proposing Lisp *as* the universal hammer. Which
blub are you proposing then? PL/I was the last attempt.
 
Reply With Quote
 
Malcolm McLean
Guest
Posts: n/a
 
      09-12-2012
בתאריך יום רביעי, 12 בספטמבר 2012 09:01:53 UTC+1, מאת Nick Keighley:
> On Sep 11, 11:14*pm, Malcolm McLean <(E-Mail Removed)>
>
> oh. I assumed you were proposing Lisp *as* the universal hammer. Which
> blub are you proposing then? PL/I was the last attempt.
>

I'd say it needs essentially C syntax - loops, curly brackets, non-flow control non-arithemtical functionality implemented as functions rather than the core language. That's generally been accepted.

But C itself isn't a good universal language, because of the buffer overflow and wild pointer issue. Also because of the difficulties in representing higher-level contructs, like classes, graphs, and metacode. Even structs have no way of serialising without writing special functions for each case.

Also the proliferation of integer types is unacceptable.

 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      09-12-2012
On Sep 12, 12:40*pm, Malcolm McLean <(E-Mail Removed)>
wrote:
> בתאריך יום רביעי, 12 בספטמבר 2012 09:01:53 UTC+1, מאת Nick Keighley:> On Sep 11, 11:14*pm, Malcolm McLean <(E-Mail Removed)>


Malcolm Mclean said
>>> Yes, we badly need one programming language that does everything.


apparently for small values of "everything"


> > oh. I assumed you were proposing Lisp *as* the universal hammer. Which
> > blub are you proposing then? PL/I was the last attempt.

>
> I'd say it needs essentially C syntax - loops, curly brackets, non-flow control non-arithemtical functionality implemented as functions rather than the core language. That's generally been accepted.


by whom? You seem to saying we need a single low level procedural
language. I'm not sure your wish-list is consistent. lets call it
Single Procedural Language (SPL)

> But C itself isn't a good universal language, because of the buffer overflow and wild pointer issue.


use Java? But that interposes a VM. How do you avoid buffer overflow
without runtime overhead? Could we write a device driver in SPL? What
about cryto, compression or embedded code?

> Also because of the difficulties in representing higher-level contructs, like classes, graphs, and metacode.


templates? Can even Java do all these things?

> Even structs have no way of serialising without writing special functionsfor each case.


Java? Python? Sounds potentially expensive

> Also the proliferation of integer types is unacceptable.


but also useful. is there a current langauage thate meets your
criteria?

 
Reply With Quote
 
James Kuyper
Guest
Posts: n/a
 
      09-12-2012
On 09/12/2012 09:31 AM, Nick Keighley wrote:
> On Sep 12, 12:40 pm, Malcolm McLean <(E-Mail Removed)>
> wrote:

....
>>>> Yes, we badly need one programming language that does everything.

....
> ... is there a current langauage thate meets your
> criteria?


I believe that "we badly need" implies that he knows of no such language.
 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      09-12-2012
On Sep 12, 3:16*pm, James Kuyper <(E-Mail Removed)> wrote:
> On 09/12/2012 09:31 AM, Nick Keighley wrote:
>
> > On Sep 12, 12:40 pm, Malcolm McLean <(E-Mail Removed)>
> > wrote:

> ...
> >>>> Yes, we badly need one programming language that does everything.

> ...
> > ... is there a current langauage thate meets your
> > criteria?

>
> I believe that "we badly need" implies that he knows of no such language.


ok. is there one that matches most of the requirement? I'm dubious
that a language can have address safety, generics, metacode and
builtit serialization whilst still preserving the low level access
that is one of C's powers.
 
Reply With Quote
 
Malcolm McLean
Guest
Posts: n/a
 
      09-12-2012
בתאריך יום רביעי, 12 בספטמבר 2012 14:31:18 UTC+1, מאת Nick Keighley:
> On Sep 12, 12:40*pm, Malcolm McLean <(E-Mail Removed)>
>
>> I'd say it needs essentially C syntax - loops, curly brackets, non-flow
>> control non-arithemtical functionality implemented as functions rather than >> the core language. That's generally been accepted.

>
>
> by whom? You seem to saying we need a single low level procedural
> language. I'm not sure your wish-list is consistent. lets call it
> Single Procedural Language (SPL)
>

Most modern new languages go for curly braces and a superfically at least
C-like syntax. But there are exceptions, of course. If there were no exceptions
at all then saying "we need essential C-like syntax" would be as fatuous as
saying "we should standardise on Arabic numerals".
 
Reply With Quote
 
BartC
Guest
Posts: n/a
 
      09-12-2012
"Malcolm McLean" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> בתאריך יום רביעי, 12 בספטמבר 2012 09:01:53 UTC+1, מאת Nick Keighley:
>> On Sep 11, 11:14 pm, Malcolm McLean <(E-Mail Removed)>
>>
>> oh. I assumed you were proposing Lisp *as* the universal hammer. Which
>> blub are you proposing then? PL/I was the last attempt.
>>

> I'd say it needs essentially C syntax - loops, curly brackets, non-flow
> control non-arithemtical functionality implemented as functions rather
> than the core language. That's generally been accepted.


Not by everyone. Or it's been forced on them. A number of syntax styles are
possible for a given language, of which C-style is one, characterised by too
much punctuation and lots of curly braces.

> Also the proliferation of integer types is unacceptable.


Proliferation? Typically there are 8 combinations of signed/unsigned, and
width (8,16,32,64 bits). For discrete int variables, you might only use one
or two. For packed arrays and structs, you need to have the choice.

> But C itself isn't a good universal language, because of the buffer
> overflow and wild pointer issue. Also because of the difficulties in
> representing higher-level contructs, like classes, graphs, and metacode.
> Even structs have no way of serialising without writing special functions
> for each case.


No, C is hopeless. There are plenty of improvements that can be made(**),
but you will just end up with some ghastlier version of C++. I don't believe
a single universal language can be created that will please everyone.

(** I recently finished designing a low-level implementation language that
pretty much does what C does. When I listed the differences (mostly
improvements in my view!) from C, I stopped when I got to 100. And that
didn't include syntax which is utterly different. But then, it's not hard to
tidy up a language that's 40 years old.)

--
Bartc

 
Reply With Quote
 
Malcolm McLean
Guest
Posts: n/a
 
      09-12-2012
בתאריך יום רביעי, 12 בספטמבר 2012 16:22:06 UTC+1, מאת Bart:
> "Malcolm McLean" <(E-Mail Removed)> wrote in message
>
>
> Proliferation? Typically there are 8 combinations of signed/unsigned, and
> width (8,16,32,64 bits). For discrete int variables, you might only use one
> or two. For packed arrays and structs, you need to have the choice.
>

Consider this

int16 *readaudiosamples(void *context);
void playaudiosamples(short *wave, int N);

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C as a Subset of C++ (or C++ as a superset of C) Ansel C++ 130 09-04-2012 01:10 PM
Newbie: Are Ruby regexp's a subset, superset, or equal to Perl's? Harry Ruby 12 09-23-2009 09:45 PM
Function to apply superset of arguments to a function Andrey Fedorov Python 9 09-10-2009 03:36 AM
subset of data using dataview?? Guoqi Zheng ASP .Net 2 01-19-2004 01:54 PM
Frighteners superset, any news? Grand Inquisitor DVD Video 0 11-20-2003 03:02 AM



Advertisments