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

B

Ben Bacarisse

Nick Keighley said:
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.
 
B

BartC

Nick Keighley said:
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.
 
M

Malcolm McLean

בת×ריך ×™×•× ×©×™×©×™, 14 בספטמבר 2012 14:00:34 UTC+1, מ×ת Bart:
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.
 
J

John Bode

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).
 
T

Tim Rentsch

Nick Keighley said:
functions, monads, continuations..

Monads aren't really a datatype, even a generic datatype like
'list' or 'array', but more like a datatype pattern, something like
a function that operates on type constructors (of which 'list' and
'array' are both examples). That puts them in a different category
(no pun intended) than other datatypes, even generic ones like
lists and arrays.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top