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)

 
 
Ben Bacarisse
Guest
Posts: n/a
 
      09-14-2012
Nick Keighley <(E-Mail Removed)> writes:

> On Sep 13, 12:33*pm, James Kuyper <(E-Mail Removed)> wrote:
>> On 09/13/2012 06:36 AM, BartC wrote:

>
> <snip>
>
>> > However, the context in this subthread was whether C was a suitable starting
>> > point for a hypothetical universal language. Since such a language would
>> > need to incorporate, amongst many other extremes, the type handling of Ada,
>> > with that of Python, plus all the manipulations allowed by C, then that's
>> > obviously a non-starter.

>>
>> If you're giving those languages as examples because you consider them
>> to be the best in each of those areas, you're probably aiming too high.
>> An "everything" language will necessarily involve a lot of compromises;
>> you'll be lucky if it handles types as well as the average language;
>> it's not likely to handle them as well as the language (whichever one
>> that is) that handles types best. The same is likely to be true of every
>> other desirable feature of the language.

>
> which leaves me wondering what purpose this "everything language"
> serves


Yes, me too.

When I first saw Malcolm's post I thought he was being sarcastic, but it
seems not.

I can understand the remark if it's born of frustration: why do we have
so many similar languages? but not if it born of a desire to fix the
situation with one universal language.

For example, from a technical point of view, having both Java and C# is
daft, but we have both because of the way businesses work. There is
also a reason to be frustrated when new languages repeat the mistakes of
previous ones. I hope never to see a new programming language that
thinks a character is a byte, or one that has no high-level concurrency
control, but I am certain I'll be disappointed!

So I can imagine having fewer languages, but the language design space
is too vast to covered by only a few data points.

--
Ben.
 
Reply With Quote
 
 
 
 
BartC
Guest
Posts: n/a
 
      09-14-2012


"Nick Keighley" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sep 13, 1:15 pm, Nick Keighley <(E-Mail Removed)>
> wrote:
>> On Sep 12, 10:18 pm, Malcolm McLean <(E-Mail Removed)>
>> wrote:
>>
>> > בתאריך יום רביעי, 12 בספטמבר 2012 20:57:10 UTC+1, מאת Bart:> "James
>> > Kuyper" <(E-Mail Removed)> wrote in message

>>
>> > > I thought Malcolm was suggesting the use of a single int type instead
>> > > of the
>> > > four common widths supported by many CPUs (plus signed/unsigned
>> > > variations).

>>
>> > > Perhaps dealing with all my eight types isn't a big deal after all..

>>
>> > Most data is integers, strings, reals or enums.

>>
>> chars, bools

>
> functions, monads, continuations..


He said *most* data. How many everyday programmers are dealing with monads
(whatever they are) and continuations (whatever *those* are)?

Most data *is* numbers and strings; and even strings are really just
sequences of numbers.

--
Bartc

 
Reply With Quote
 
 
 
 
Malcolm McLean
Guest
Posts: n/a
 
      09-14-2012
בתאריך יום שישי, 14 בספטמבר 2012 14:00:34 UTC+1, מאת Bart:
> "Nick Keighley" <(E-Mail Removed)> wrote in message
>
>
> Most data *is* numbers and strings; and even strings are really just
> sequences of numbers.
>

Data is also ones and zeros. And it's dates, names, x,y,z co-ordinates,
employee records.
One question is, what's the level of granularity, and thus generality, at
which it becomes sensible to have support at the level of the language? But
the question I'm asking is slightly different. If two programming language
entities represent essentially the same data, can we not eliminate one? Do
we need double and float? Do we need strings and characters, or can a
character be a one-letter string? Do we need twelve or so integer types?

Of course types aren't added for the sake of it, and there are machine
efficiency reasons for different types. But it seems to me that the integertypes, in particular need rationalisation.
 
Reply With Quote
 
John Bode
Guest
Posts: n/a
 
      09-14-2012
On Friday, September 14, 2012 8:00:34 AM UTC-5, Bart wrote:
> "Nick Keighley" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
>
> > On Sep 13, 1:15 pm, Nick Keighley <(E-Mail Removed)>
> > wrote:
> >> On Sep 12, 10:18 pm, Malcolm McLean <(E-Mail Removed)>
> >> wrote:
> >>
> >> > בתאריך יום רביעי, 12 בספטמבר 2012 20:57:10 UTC+1, מאת Bart:> "James
> >> > Kuyper" <(E-Mail Removed)> wrote in message
> >>
> >> > > I thought Malcolm was suggesting the use of a single int type instead
> >> > > of the
> >> > > four common widths supported by many CPUs (plus signed/unsigned
> >> > > variations).
> >>
> >> > > Perhaps dealing with all my eight types isn't a big deal after all...
> >>
> >> > Most data is integers, strings, reals or enums.
> >>
> >> chars, bools

> >
> > functions, monads, continuations..

>
> He said *most* data. How many everyday programmers are dealing with monads
> (whatever they are) and continuations (whatever *those* are)?


Anyone doing functional programming in Haskell or a similar language.
Which, while not a huge number, is significant.

If we want to get truly pedantic, all data (at least in the context of
digital computers) is some arrangement of bits in memory. When you get right
down to it, all we work with are bits, bytes, and words (which means BLISS is
the ultimate programming language).

Doesn't mean higher-level, abstract types (like functions and monads) aren't
useful (even necessary in some domains).

 
Reply With Quote
 
Jan G
Guest
Posts: n/a
 
      09-30-2012
Nick Keighley wrote:

> which leaves me wondering what purpose this "everything language"
> serves


Or you won't have you being just a someone putting a part in a car?



 
Reply With Quote
 
Jan G
Guest
Posts: n/a
 
      09-30-2012
Nick Keighley wrote:
> On Sep 13, 12:33 pm, James Kuyper <(E-Mail Removed)> wrote:
>> On 09/13/2012 06:36 AM, BartC wrote:

>
> <snip>
>
>>> However, the context in this subthread was whether C was a suitable
>>> starting point for a hypothetical universal language. Since such a
>>> language would need to incorporate, amongst many other extremes,
>>> the type handling of Ada, with that of Python, plus all the
>>> manipulations allowed by C, then that's obviously a non-starter.

>>
>> If you're giving those languages as examples because you consider
>> them to be the best in each of those areas, you're probably aiming
>> too high. An "everything" language will necessarily involve a lot of
>> compromises; you'll be lucky if it handles types as well as the
>> average language; it's not likely to handle them as well as the
>> language (whichever one that is) that handles types best. The same
>> is likely to be true of every other desirable feature of the
>> language.

>
> which leaves me wondering what purpose this "everything language"
> serves


Do you want a union? Do you want a leader?


 
Reply With Quote
 
Jan G
Guest
Posts: n/a
 
      09-30-2012
Ben Bacarisse wrote:

> I can understand the remark


Not to be obtuse but how about you shut up a bit?


 
Reply With Quote
 
Jan G
Guest
Posts: n/a
 
      09-30-2012
Nick Keighley wrote:

you killed people


 
Reply With Quote
 
Jan G
Guest
Posts: n/a
 
      09-30-2012
BartC wrote:

you want to kill people


 
Reply With Quote
 
Jan G
Guest
Posts: n/a
 
      09-30-2012
Nick Keighley wrote:

my bad on you, you have killed people


 
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