Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | jt@toerring.de (Jens Thoms Toerring) |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: a style question: |
| Date | 2015-09-01 15:23 +0000 |
| Organization | Freie Universitaet Berlin |
| Message-ID | <d4lu84Fr132U1@mid.uni-berlin.de> (permalink) |
| References | (2 earlier) <ms1bf1$peo$1@dont-email.me> <d4josjFqhdfU8@mid.individual.net> <ms2do6$d72$1@dont-email.me> <d4k6i5Ff37rU1@mid.uni-berlin.de> <ms2qfd$v8c$1@dont-email.me> |
Bartc <bc@freeuk.com> wrote:
> On 01/09/2015 00:33, Jens Thoms Toerring wrote:
> > Bartc <bc@freeuk.com> wrote:
> >> But I can't follow C++ because, when people make full use of its
> >> features as they like to do;
> >
> > Have you ever asked yourself why people like to to use them, even
> > though you consider them to be "useless", "horrible", "over-com-
> > plex" and what else? It's simple: because they're so damned use-
> > ful and extend the expressiveness of the language into realms you
> > can't even start imagining as long as you expect that everything
> > must be done as it's done in C or similar lower-level languages.
> >
> > Perhaps you should attempt to realize that "higher-level lan-
> > guage" doesn't mean "more functions to do some things that some
> > people may want to do" (say printing an array or a structure,
> > which all non-terminally-stupid users could do with a function
> > of their own or might be supplied via a library). It means
> > introducing new, more abstract concepts that allow the users
> > of the language to do things that, in a lower-level language,
> > not only are impossible but hardly can be thought of.
> What sort of things?
You've been told by not too small a number of people (and given
all kinds of examples) that e.g. the ability to create new types
that are aligned to the problem you have to solve and having them
treated on the same footing as built-in types is one of them.
And that, in turn, requires operator overloading. And to make
creation of types really powerful you need tempkates. With all
this you can extend the language to be able to deal with pro-
blems in the most simple and transparent way. And you've been
told about the way memory issues can be dealt with in an auto-
matic manner that reduces the amount of code you've got to write
considerably and decreases the chance of introducing bugs and me-
mory leaks along the way. But you must give it a try to under-
stand it - just talking about it is like discussing colors with
someone who has decided to keep his eyes firmly shut all of his
life.
> I normally use a dynamic language, which is actually quite low-level
> compared with some, that can do much of what C++ can do, and with none
> of the fuss.
If that is true I'd very much tempted to try that language. Alas,
I've never seen any documentation for it, just some often inscru-
table code snippets you post from time to time. So I still have
to be convinced that you found the silver bullet.
> I remember nearly a year ago needing a JPEG library, and I could only
> find a C++ version that took ages to try and decipher. Eventually I
> found a C version (it might be the one Malcolm kindly sent me), that did
> the same thing and was far simpler. The C++ seemed to just be using all
> its bells and whistles for the sake of it. Because they are there.
> In my position, I am unlikely to write or generate C++ code. But I
> sometimes need to interface to it, or to understand other people's code,
> or to convert it to a different language and for that purpose its
> features get in the way. Then, the less esoteric and abstract the better!
Let me translate what you write into some equivalent example:
I need some crucial information and have found out that it is
supposed to be contained in a book written in Spanish. Now I've
had several years of Latin in school as well as a bit of French,
and I got some exposure to Italian, all languages nearly related
to Spanish. But when I open that book it looks tantalizingly like
things I know, many words are ringing a bell etc., but I still
don't understand what's written. But instead of learning the re-
quired amount of Spanish (or getting some help with a trans-
lation) I start running around, telling everyone in sight what a
horrible language Spanish is and imply that anyone making the
effort to learn it must be a moron. If those damned Spaniards
wouldn't be such a bunch of arrogant bastards they'd use proper
words instead of inventing new ones, just to spite me!
Put like that what would you call me? But then I'm more and
inclined to suspect that you're just trolling...
Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
a style question: G G <gdotone@gmail.com> - 2015-08-31 02:30 -0700
Re: a style question: Ian Collins <ian-news@hotmail.com> - 2015-08-31 21:40 +1200
Re: a style question: jt@toerring.de (Jens Thoms Toerring) - 2015-08-31 09:52 +0000
Re: a style question: Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-08-31 03:24 -0700
Re: a style question: Bartc <bc@freeuk.com> - 2015-08-31 11:50 +0100
Re: a style question: Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-31 13:21 +0100
Re: a style question: Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-08-31 05:41 -0700
Re: a style question: Bartc <bc@freeuk.com> - 2015-08-31 14:55 +0100
Re: a style question: Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-31 15:50 +0100
Re: a style question: Bartc <bc@freeuk.com> - 2015-08-31 18:40 +0100
Re: a style question: Melzzzzz <mel@zzzzz.com> - 2015-08-31 17:46 +0200
Re: a style question: Bartc <bc@freeuk.com> - 2015-08-31 17:27 +0100
Re: a style question: Melzzzzz <mel@zzzzz.com> - 2015-08-31 18:42 +0200
Re: a style question: Jorgen Grahn <grahn+nntp@snipabacken.se> - 2015-08-31 17:41 +0000
Re: a style question: Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-08-31 15:33 -0700
Re: a style question: Jorgen Grahn <grahn+nntp@snipabacken.se> - 2015-09-01 08:34 +0000
Re: a style question: Ian Collins <ian-news@hotmail.com> - 2015-09-01 07:40 +1200
Re: a style question: Bartc <bc@freeuk.com> - 2015-08-31 21:36 +0100
Re: a style question: Ian Collins <ian-news@hotmail.com> - 2015-09-01 08:51 +1200
Re: a style question: Bartc <bc@freeuk.com> - 2015-08-31 22:37 +0100
Re: a style question: Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-08-31 15:24 -0700
Re: a style question: Ian Collins <ian-news@hotmail.com> - 2015-09-02 19:37 +1200
Re: a style question: jt@toerring.de (Jens Thoms Toerring) - 2015-08-31 23:33 +0000
Re: a style question: Bartc <bc@freeuk.com> - 2015-09-01 01:13 +0100
Re: a style question: Ian Collins <ian-news@hotmail.com> - 2015-09-01 18:21 +1200
Re: a style question: jt@toerring.de (Jens Thoms Toerring) - 2015-09-01 15:23 +0000
Re: a style question: Bartc <bc@freeuk.com> - 2015-09-01 18:06 +0100
Re: a style question: Jorgen Grahn <grahn+nntp@snipabacken.se> - 2015-09-01 20:39 +0000
Re: a style question: jt@toerring.de (Jens Thoms Toerring) - 2015-09-01 20:45 +0000
Re: a style question: Bartc <bc@freeuk.com> - 2015-09-01 22:53 +0100
Re: a style question: Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-08-31 17:51 -0700
csiph-web