Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #19026 > unrolled thread
| Started by | gus gassmann <gus@nospam.com> |
|---|---|
| First post | 2012-10-17 06:49 -0300 |
| Last post | 2012-10-19 07:37 -0400 |
| Articles | 20 on this page of 153 — 30 participants |
Back to article view | Back to comp.lang.c++
C/C++ question about dynamic "static struct" gus gassmann <gus@nospam.com> - 2012-10-17 06:49 -0300
Re: C/C++ question about dynamic "static struct" Noob <root@127.0.0.1> - 2012-10-17 13:08 +0200
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-17 08:19 -0400
Re: C/C++ question about dynamic "static struct" Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-10-17 15:19 +0000
Re: C/C++ question about dynamic "static struct" gus gassmann <gus@nospam.com> - 2012-10-17 18:47 -0300
Re: C/C++ question about dynamic "static struct" Ike Naar <ike@iceland.freeshell.org> - 2012-10-17 22:46 +0000
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-18 07:13 +0000
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-17 18:58 -0400
Re: C/C++ question about dynamic "static struct" Stuart <DerTopper@web.de> - 2012-10-18 09:55 +0200
Re: C/C++ question about dynamic "static struct" jacob navia <jacob@spamsink.net> - 2012-10-18 10:13 +0200
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-18 08:23 +0000
Re: C/C++ question about dynamic "static struct" jacob navia <jacob@spamsink.net> - 2012-10-18 11:17 +0200
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-18 23:37 +1300
Re: C/C++ question about dynamic "static struct" Rui Maciel <rui.maciel@gmail.com> - 2012-10-18 15:35 +0100
Re: C/C++ question about dynamic "static struct" Öö Tiib <ootiib@hot.ee> - 2012-10-19 11:40 -0700
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-18 21:45 +1300
Re: C/C++ question about dynamic "static struct" Rui Maciel <rui.maciel@gmail.com> - 2012-10-18 15:03 +0100
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-18 07:18 -0400
Re: C/C++ question about dynamic "static struct" Stuart <DerTopper@web.de> - 2012-10-18 17:43 +0200
Re: C/C++ question about dynamic "static struct" William Ahern <william@wilbur.25thandClement.com> - 2012-10-18 13:52 -0700
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-19 21:34 +1300
Re: C/C++ question about dynamic "static struct" Stuart <DerTopper@web.de> - 2012-10-19 11:03 +0200
Re: C/C++ question about dynamic "static struct" "BartC" <bc@freeuk.com> - 2012-10-20 14:03 +0100
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-19 09:27 +0000
Re: C/C++ question about dynamic "static struct" Stuart <DerTopper@web.de> - 2012-10-19 13:43 +0200
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-19 12:46 +0000
Re: C/C++ question about dynamic "static struct" ImpalerCore <jadill33@gmail.com> - 2012-10-19 10:14 -0700
Re: C/C++ question about dynamic "static struct" Paavo Helde <myfirstname@osa.pri.ee> - 2012-10-19 14:53 -0500
Re: C/C++ question about dynamic "static struct" Öö Tiib <ootiib@hot.ee> - 2012-10-19 13:52 -0700
Re: C/C++ question about dynamic "static struct" Öö Tiib <ootiib@hot.ee> - 2012-10-19 14:13 -0700
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-19 21:24 +0000
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-20 11:47 +1300
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-19 21:22 +0000
Re: C/C++ question about dynamic "static struct" William Ahern <william@wilbur.25thandClement.com> - 2012-10-19 11:21 -0700
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-19 21:29 +0000
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-19 18:53 -0400
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-20 12:13 +1300
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-20 05:55 +0000
Re: C/C++ question about dynamic "static struct" Stuart <DerTopper@web.de> - 2012-10-20 13:24 +0200
Re: C/C++ question about dynamic "static struct" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-10-20 12:54 +0100
Re: C/C++ question about dynamic "static struct" Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-10-20 06:45 -0700
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-21 09:20 +1300
Re: C/C++ question about dynamic "static struct" Dombo <dombo@disposable.invalid> - 2012-10-20 22:28 +0200
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-21 07:05 +0000
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-21 02:23 -0500
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-21 07:32 +0000
Re: C/C++ question about dynamic "static struct" "BartC" <bc@freeuk.com> - 2012-10-21 11:56 +0100
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-21 12:54 -0500
Re: C/C++ question about dynamic "static struct" ptyxs <kerloch@gmail.com> - 2012-10-22 13:43 +0200
Re: C/C++ question about dynamic "static struct" gwowen <gwowen@gmail.com> - 2012-10-26 03:37 -0700
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-26 07:33 -0500
Re: C/C++ question about dynamic "static struct" Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-10-27 05:14 -0700
Re: C/C++ question about dynamic "static struct" Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-10-27 05:08 -0700
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-20 13:44 -0500
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-21 09:09 +1300
Re: C/C++ question about dynamic "static struct" Dombo <dombo@disposable.invalid> - 2012-10-20 22:31 +0200
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-21 02:11 -0500
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-21 20:28 +1300
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-21 07:40 +0000
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-21 13:31 -0500
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-22 08:41 +1300
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-21 16:24 -0500
Re: C/C++ question about dynamic "static struct" Öö Tiib <ootiib@hot.ee> - 2012-10-21 15:05 -0700
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-22 07:52 +0000
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-22 14:02 -0500
Re: C/C++ question about dynamic "static struct" gwowen <gwowen@gmail.com> - 2012-10-26 03:41 -0700
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-26 07:53 -0500
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-26 09:51 -0400
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-26 13:48 -0400
Re: C/C++ question about dynamic "static struct" ImpalerCore <jadill33@gmail.com> - 2012-10-26 07:35 -0700
Re: C/C++ question about dynamic "static struct" Paavo Helde <myfirstname@osa.pri.ee> - 2012-10-26 18:42 -0500
Re: C/C++ question about dynamic "static struct" ImpalerCore <jadill33@gmail.com> - 2012-10-27 04:21 -0700
Re: C/C++ question about dynamic "static struct" Öö Tiib <ootiib@hot.ee> - 2012-10-27 05:04 -0700
Re: C/C++ question about dynamic "static struct" Paavo Helde <myfirstname@osa.pri.ee> - 2012-10-27 08:06 -0500
Re: C/C++ question about dynamic "static struct" ImpalerCore <jadill33@gmail.com> - 2012-10-27 06:50 -0700
Re: C/C++ question about dynamic "static struct" Paavo Helde <myfirstname@osa.pri.ee> - 2012-10-27 11:13 -0500
Re: C/C++ question about dynamic "static struct" ImpalerCore <jadill33@gmail.com> - 2012-10-27 12:02 -0700
Re: C/C++ question about dynamic "static struct" Paavo Helde <myfirstname@osa.pri.ee> - 2012-10-27 15:46 -0500
Re: C/C++ question about dynamic "static struct" ImpalerCore <jadill33@gmail.com> - 2012-10-27 20:24 -0700
Re: C/C++ question about dynamic "static struct" Dombo <dombo@disposable.invalid> - 2012-10-27 20:11 +0200
Re: C/C++ question about dynamic "static struct" Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-10-27 05:43 -0700
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-27 13:52 -0500
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-27 14:40 -0500
Re: C/C++ question about dynamic "static struct" google@ianshome.com - 2012-10-23 12:03 -0700
Re: C/C++ question about dynamic "static struct" Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-10-27 05:35 -0700
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-27 14:24 -0500
Re: C/C++ question about dynamic "static struct" Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-10-27 05:36 -0700
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-21 07:08 +0000
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-21 02:51 -0500
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-21 21:09 +1300
Re: C/C++ question about dynamic "static struct" Rui Maciel <rui.maciel@gmail.com> - 2012-10-21 12:16 +0100
Re: C/C++ question about dynamic "static struct" Rui Maciel <rui.maciel@gmail.com> - 2012-10-21 11:55 +0100
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-21 13:47 -0500
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-22 08:46 +1300
Re: C/C++ question about dynamic "static struct" Rui Maciel <rui.maciel@gmail.com> - 2012-10-22 03:02 +0100
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-22 08:04 +0000
Re: C/C++ question about dynamic "static struct" Tobias Müller <troplin@bluewin.ch> - 2012-10-21 18:54 +0000
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-22 08:49 +1300
Re: C/C++ question about dynamic "static struct" Tobias Müller <troplin@bluewin.ch> - 2012-10-21 20:07 +0000
Re: C/C++ question about dynamic "static struct" Öö Tiib <ootiib@hot.ee> - 2012-10-21 13:53 -0700
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-22 09:54 +1300
Re: C/C++ question about dynamic "static struct" Rui Maciel <rui.maciel@gmail.com> - 2012-10-22 02:41 +0100
Re: C/C++ question about dynamic "static struct" Tobias Müller <troplin@bluewin.ch> - 2012-10-22 06:12 +0000
Re: C/C++ question about dynamic "static struct" Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-10-22 20:52 +0000
Re: C/C++ question about dynamic "static struct" Öö Tiib <ootiib@hot.ee> - 2012-10-22 16:30 -0700
Re: C/C++ question about dynamic "static struct" Stuart <DerTopper@web.de> - 2012-10-23 11:22 +0200
Re: C/C++ question about dynamic "static struct" Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-10-23 16:58 +0000
Re: C/C++ question about dynamic "static struct" Rui Maciel <rui.maciel@gmail.com> - 2012-10-22 02:22 +0100
Re: C/C++ question about dynamic "static struct" Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-10-27 05:30 -0700
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-20 09:06 -0400
Re: C/C++ question about dynamic "static struct" Öö Tiib <ootiib@hot.ee> - 2012-10-20 07:43 -0700
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-21 07:11 +0000
Re: C/C++ question about dynamic "static struct" Rui Maciel <rui.maciel@gmail.com> - 2012-10-21 11:56 +0100
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-21 07:43 -0400
Re: C/C++ question about dynamic "static struct" Öö Tiib <ootiib@hot.ee> - 2012-10-21 10:36 -0700
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-22 08:13 +0000
Re: C/C++ question about dynamic "static struct" Steve Thompson <stevet810@gmail.com> - 2012-10-22 15:08 +0000
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-22 14:42 -0400
Re: C/C++ question about dynamic "static struct" Rui Maciel <rui.maciel@gmail.com> - 2012-10-21 10:12 +0100
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-20 13:24 -0500
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-21 07:16 +0000
Re: C/C++ question about dynamic "static struct" Les Cargill <lcargill99@comcast.com> - 2012-10-21 13:57 -0500
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-22 08:17 +0000
Re: C/C++ question about dynamic "static struct" Fritz Wuehler <fritz@spamexpire-201210.rodent.frell.theremailer.net> - 2012-10-20 22:41 +0200
Re: C/C++ question about dynamic "static struct" Dombo <dombo@disposable.invalid> - 2012-10-21 01:04 +0200
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-21 07:23 +0000
Re: C/C++ question about dynamic "static struct" Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-10-21 19:33 +0000
Re: C/C++ question about dynamic "static struct" Greg Martin <greg@softsprocket.com> - 2012-10-21 13:20 -0700
Re: C/C++ question about dynamic "static struct" Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-10-23 15:44 +0000
Re: C/C++ question about dynamic "static struct" Dombo <dombo@disposable.invalid> - 2012-10-23 20:01 +0200
Re: C/C++ question about dynamic "static struct" Stuart <DerTopper@web.de> - 2012-10-24 12:01 +0200
Re: C/C++ question about dynamic "static struct" Dombo <dombo@disposable.invalid> - 2012-10-24 20:31 +0200
Re: C/C++ question about dynamic "static struct" Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-10-20 06:13 -0700
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-21 07:25 +0000
Re: C/C++ question about dynamic "static struct" Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-10-27 05:54 -0700
Re: C/C++ question about dynamic "static struct" Old Wolf <oldwolf@inspire.net.nz> - 2012-11-11 14:58 -0800
Re: C/C++ question about dynamic "static struct" gof@somewhere.invalid (Adam Wysocki) - 2012-11-12 10:33 +0000
Re: C/C++ question about dynamic "static struct" Ian Collins <ian-news@hotmail.com> - 2012-10-18 12:19 +1300
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-18 07:06 +0000
Re: C/C++ question about dynamic "static struct" Noob <root@127.0.0.1> - 2012-10-18 11:36 +0200
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-19 09:28 +0000
Re: C/C++ question about dynamic "static struct" Noob <root@127.0.0.1> - 2012-10-19 12:07 +0200
Re: C/C++ question about dynamic "static struct" gus gassmann <gus@nospam.com> - 2012-10-19 08:03 -0300
Re: C/C++ question about dynamic "static struct" Fritz Wuehler <fritz@spamexpire-201210.rodent.frell.theremailer.net> - 2012-10-20 07:14 +0200
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-19 06:58 -0400
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-17 08:29 -0400
Re: C/C++ question about dynamic "static struct" Richard Damon <news.x.richarddamon@xoxy.net> - 2012-10-17 08:35 -0400
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-17 08:49 -0400
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-18 07:10 +0000
Re: C/C++ question about dynamic "static struct" Keith Thompson <kst-u@mib.org> - 2012-10-18 12:11 -0700
Re: C/C++ question about dynamic "static struct" Juha Nieminen <nospam@thanks.invalid> - 2012-10-19 09:30 +0000
Re: C/C++ question about dynamic "static struct" Keith Thompson <kst-u@mib.org> - 2012-10-19 03:05 -0700
Re: C/C++ question about dynamic "static struct" James Kuyper <jameskuyper@verizon.net> - 2012-10-19 07:37 -0400
Page 7 of 8 — ← Prev page 1 2 3 4 5 6 [7] 8 Next page →
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2012-10-21 07:16 +0000 |
| Message-ID | <k607h2$ika$1@speranza.aioe.org> |
| In reply to | #19132 |
In comp.lang.c++ Les Cargill <lcargill99@comcast.com> wrote: >> Just the standard library alone makes life so much >> easier (no matter if you are just making a quick 50-line test program >> or a large 50k-line serious project.) > > Or you get an old version of STL that's buggy and there's an observed > problem that takes up to a *year* ( off and on - not continuous > pushing ) to resolve. When C programmers have to resort to problems that might have been relevant 20 years ago in order to make their case, I think that demonstrates quite well that they don't have any *actual* argument. > Also, I once had a ... data structure that I built with a need > for associativity ( think arrays indexed by strings ) where it > was twice the code* and half the performance to use STL than > bash something out in 'C'. Oh, if STL had only had "foreach" > from the start.... "The standard library cannot be used for this", is a rather weak argument for why the standard library is not useful. The standard library does not offer *everything*. So what? What it does offer is in practice very useful.
[toc] | [prev] | [next] | [standalone]
| From | Les Cargill <lcargill99@comcast.com> |
|---|---|
| Date | 2012-10-21 13:57 -0500 |
| Message-ID | <k61gk7$isu$1@dont-email.me> |
| In reply to | #19150 |
Juha Nieminen wrote: > In comp.lang.c++ Les Cargill <lcargill99@comcast.com> wrote: >>> Just the standard library alone makes life so much >>> easier (no matter if you are just making a quick 50-line test program >>> or a large 50k-line serious project.) >> >> Or you get an old version of STL that's buggy and there's an observed >> problem that takes up to a *year* ( off and on - not continuous >> pushing ) to resolve. > > When C programmers have to resort to problems that might have been > relevant 20 years ago in order to make their case, I think that > demonstrates quite well that they don't have any *actual* argument. > This was much, much more recent than that. People are *still running* 20 year old STL implementations... "So why don't you upgrade?" My very question. The answer was interesting. >> Also, I once had a ... data structure that I built with a need >> for associativity ( think arrays indexed by strings ) where it >> was twice the code* and half the performance to use STL than >> bash something out in 'C'. Oh, if STL had only had "foreach" >> from the start.... > > "The standard library cannot be used for this", is a rather weak > argument for why the standard library is not useful. It's an explicit demonstration of the *dis*utility of it. Dunno about you, but I don't get to point to that and say "abandon hope", I have to go fix it. > The standard > library does not offer *everything*. So what? What it does offer > is in practice very useful. > It *can* be. What we're arguing about is whether or not language features enable bad practice, and that's not going to be settled in one thread. -- Les Cargill
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2012-10-22 08:17 +0000 |
| Message-ID | <k62ve1$oqf$1@speranza.aioe.org> |
| In reply to | #19174 |
In comp.lang.c++ Les Cargill <lcargill99@comcast.com> wrote: >> When C programmers have to resort to problems that might have been >> relevant 20 years ago in order to make their case, I think that >> demonstrates quite well that they don't have any *actual* argument. > > This was much, much more recent than that. People are > *still running* 20 year old STL implementations... And this affects me how, exactly? Why should *I* care? Why should I choose C over C++ if some people are still running 20 year old STL implementations? >> "The standard library cannot be used for this", is a rather weak >> argument for why the standard library is not useful. > > It's an explicit demonstration of the *dis*utility of it. Dunno > about you, but I don't get to point to that and say "abandon > hope", I have to go fix it. I don't understand that at all. Since the standard library does not offer a solution for every single problem in existence, it's not useful? That's like one of the craziest arguments I have ever heard, even from a C advocate (and that's saying quite a lot; believe me, I have seen quite crazy stuff.)
[toc] | [prev] | [next] | [standalone]
| From | Fritz Wuehler <fritz@spamexpire-201210.rodent.frell.theremailer.net> |
|---|---|
| Date | 2012-10-20 22:41 +0200 |
| Message-ID | <1af3ab5d0684b0284d2be6344a542be3@msgid.frell.theremailer.net> |
| In reply to | #19069 |
Juha Nieminen <nospam@thanks.invalid> wrote: most of what you wrote is agreeable, snipped... > Also, C++ does have some features that are not offered by other languages. This is hard to believe. Would you be inclined to name a few? I'm not a C/C++ guy so I'll have to check but I really find it difficult to believe C or C++ could offer anything that isn't offered by other languages for a few reasons: C is not the oldest language, therefore it was based on ideas and languages that came before. C++ is based on C and other ideas and languages that came before. There have been many new languages since C++ and many many new ones since C. Aside from "features" that are really nothing more than quirks or bad design, are you really suggesting a language written 20 years ago based on a language written 20 years or so before that has features other languages don't offer? That would be interesting! Are you being pedantic and suggesting C++ has features that aren't presented exactly the same way in other languages, or are you suggesting C++ really has features that have no equivalents in other languages, or ???
[toc] | [prev] | [next] | [standalone]
| From | Dombo <dombo@disposable.invalid> |
|---|---|
| Date | 2012-10-21 01:04 +0200 |
| Message-ID | <k5vaiu$48n$1@dont-email.me> |
| In reply to | #19140 |
Op 20-Oct-12 22:41, Fritz Wuehler schreef: > Juha Nieminen <nospam@thanks.invalid> wrote: > > most of what you wrote is agreeable, snipped... > >> Also, C++ does have some features that are not offered by other languages. > > This is hard to believe. Would you be inclined to name a few? I'm not a > C/C++ guy so I'll have to check but I really find it difficult to believe C > or C++ could offer anything that isn't offered by other languages for a few > reasons: > > C is not the oldest language, therefore it was based on ideas and languages > that came before. C++ is based on C and other ideas and languages that came > before. There have been many new languages since C++ and many many new ones > since C. Aside from "features" that are really nothing more than quirks or > bad design, are you really suggesting a language written 20 years ago based > on a language written 20 years or so before that has features other > languages don't offer? That would be interesting! > > Are you being pedantic and suggesting C++ has features that aren't presented > exactly the same way in other languages, or are you suggesting C++ really > has features that have no equivalents in other languages, or ??? I don't know every programing language in existence, but as far as know there aren't that many programming languages that support RAII (deterministic destructors) and templates like C++ does. Also C++ has evolved significantly over the last 20 years. The C++ language I learned C++ 20 years ago is very different from C++ as we know it today. 20 years ago C++ was little more than C with classes; no templates, no standard library (or STL), no exceptions...etc. One cannot consider programming language features in isolation; the necessity/added-value of a feature and even if possibility of adding a feature depends on the language as a whole. Reasons that other programming languages do no support a certain features may be due to that it doesn't fit in well with other parts of the language (e.g. deterministic destructors), or that the language designer opted for a much less powerful but simpler alternative (e.g. generics instead of templates), or that the language designer doesn't believe that the feature is a good idea (e.g. operator overloading), or even leave a feature out entirely because other aspects of the language make the feature unnecessary (e.g. a dynamically typed language has little use for templates or generics).
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2012-10-21 07:23 +0000 |
| Message-ID | <k607u8$jc9$1@speranza.aioe.org> |
| In reply to | #19140 |
In comp.lang.c++ Fritz Wuehler <fritz@spamexpire-201210.rodent.frell.theremailer.net> wrote: >> Also, C++ does have some features that are not offered by other languages. > > This is hard to believe. Would you be inclined to name a few? By "other languages" I was referring to the ones popularly used. For example RAII *is* offered by some other languages (eg. if I remember correctly ADA might have had it), but those tend to be either obscure languages that nobody uses, or have fallen almost completely out of usage in practice (except in very narrow and specific industries, eg. with ADA.) (And no, this was not an argument on whether RAII is better than automatic GC. That was not the point.) It's hard to classify if any language offers the same functionality as C++ templates do (regardless of what you think about their syntax; I'm talking purely about the functionality here.) There are certainly some languages (especially some functional ones) which you might argue offer the same functionality, although using a rather different approach. But even then there often are radical differences.
[toc] | [prev] | [next] | [standalone]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2012-10-21 19:33 +0000 |
| Message-ID | <slrnk88jg3.1d3.grahn+nntp@frailea.sa.invalid> |
| In reply to | #19062 |
On Thu, 2012-10-18, William Ahern wrote:
> In comp.lang.c Stuart <DerTopper@web.de> wrote:
>> On 10/18/12 James Kuyper wrote:
>> [snip]
>> > I'm primarily a C programmer, so I may be
>> > missing out some elegant C++ way of doing that, but the following
>> > inelegant (and untested) code should do the job:
>> [snip]
>
>> I'm intrigued. I have never ever met someone who described himself as a C
>> programmer. May I ask what kind of business you are in? My guess is your
>> line of work includes either device drivers, embedded devices, kernel code
>> or something else that forces you to write C instead of C++. In all these
>> years I have never met someone who used C instead of C++ unless he was
>> forced to do so.
>
> Well, you have now. I've worked in several shops (both small and billion
> dollar companies) which were C only by choice. The consensus was that the
> cost/benefit of C++ didn't pan out, particularly for backend, non-GUI work.
I've worked in those places too. Unlike you I believe they are
misguided, but I agree they exist and aren't unusual.
> I'm guessing that you come from a Windows background and/or graduated
> college in the past 3 or 4 years. That's usually how it goes, IME. C++
> didn't make waves in the Unix world until a few years ago, and then it took
> off with Google and Apple**, especially when they picked up their college
> recruitment. C++ grew up in Microsoft-land and in Microsoft-friendly
> universities which dumped SUN--or never had the history to begin with. Which
> isn't a slight, just an observation about the peculiarities of C++ culture.
I get the feeling (which may be incorrect) that you justify discarding
C++ by trying to associate it with Microsoft, and anti-Unix nonsense
in general. Since I'm pro-Unix myself that annoys me.
There are /different/ C++ cultures, just like there are different C
cultures. For me C++ fits very well into Unix programming[1]. It's
just like Unix programming in C, only with better tools such as the
standard containers, RAII and so on. I don't know what they do in the
Windows world ... seems to be most have spent many years down the
Java/.NET route until very recently.
/Jorgen
[1] One perhaps surprising reason is the Unix APIs are C API. That way
I'm not tied to someone's antiquated ideas about how an
object-oriented interface should work. Sure, C APIs can feel
primitive at times -- but at least a decent number of people know
how do design them properly!
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
[toc] | [prev] | [next] | [standalone]
| From | Greg Martin <greg@softsprocket.com> |
|---|---|
| Date | 2012-10-21 13:20 -0700 |
| Message-ID | <rOYgs.16770$Ns2.2177@newsfe18.iad> |
| In reply to | #19175 |
On 12-10-21 12:33 PM, Jorgen Grahn wrote: > On Thu, 2012-10-18, William Ahern wrote: >> In comp.lang.c Stuart <DerTopper@web.de> wrote: >>> On 10/18/12 James Kuyper wrote: >>> [snip] >>>> I'm primarily a C programmer, so I may be >>>> missing out some elegant C++ way of doing that, but the following >>>> inelegant (and untested) code should do the job: >>> [snip] >> >>> I'm intrigued. I have never ever met someone who described himself as a C >>> programmer. May I ask what kind of business you are in? My guess is your >>> line of work includes either device drivers, embedded devices, kernel code >>> or something else that forces you to write C instead of C++. In all these >>> years I have never met someone who used C instead of C++ unless he was >>> forced to do so. >> >> Well, you have now. I've worked in several shops (both small and billion >> dollar companies) which were C only by choice. The consensus was that the >> cost/benefit of C++ didn't pan out, particularly for backend, non-GUI work. > > I've worked in those places too. Unlike you I believe they are > misguided, but I agree they exist and aren't unusual. > What seems to be the real irony here is that it isn't 1992, though I'm getting a decided deja vu, but 2012 when this conversation should be taking place between C++ zealots and C# adherents (or maybe Java, Python, Ruby, erlang programmers et al). I have worked on large scale projects in both C++ and C and prefer C however misguided you may feel that makes me. On the other hand there are projects for which I prefer to use other languages. C++ isn't on my goto list, pun intended. Horse for courses I guess. I'm quite fond of erlang for instance though I don't believe you should learn it as I'm sure you can accomplish what you need to do in C++, however, there are a whole lot of things it does very well and with a fraction of the effort required by C++. Still, I don't suppose the sky will fall in on comp.lang.c++ any more then it has on comp.lang.c.
[toc] | [prev] | [next] | [standalone]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2012-10-23 15:44 +0000 |
| Message-ID | <slrnk8dero.1d3.grahn+nntp@frailea.sa.invalid> |
| In reply to | #19180 |
On Sun, 2012-10-21, Greg Martin wrote: > On 12-10-21 12:33 PM, Jorgen Grahn wrote: >> On Thu, 2012-10-18, William Ahern wrote: >>> In comp.lang.c Stuart <DerTopper@web.de> wrote: >>>> On 10/18/12 James Kuyper wrote: >>>> [snip] >>>>> I'm primarily a C programmer, so I may be >>>>> missing out some elegant C++ way of doing that, but the following >>>>> inelegant (and untested) code should do the job: >>>> [snip] >>> >>>> I'm intrigued. I have never ever met someone who described himself as a C >>>> programmer. May I ask what kind of business you are in? My guess is your >>>> line of work includes either device drivers, embedded devices, kernel code >>>> or something else that forces you to write C instead of C++. In all these >>>> years I have never met someone who used C instead of C++ unless he was >>>> forced to do so. >>> >>> Well, you have now. I've worked in several shops (both small and billion >>> dollar companies) which were C only by choice. The consensus was that the >>> cost/benefit of C++ didn't pan out, particularly for backend, non-GUI work. >> >> I've worked in those places too. Unlike you I believe they are >> misguided, but I agree they exist and aren't unusual. >> > > What seems to be the real irony here is that it isn't 1992, though I'm > getting a decided deja vu, but 2012 when this conversation should be > taking place between C++ zealots and C# adherents (or maybe Java, > Python, Ruby, erlang programmers et al). I don't quite get your point here. It's obviously not "C should have died some time after 1992". (For what it's worth, if I had a time machine I'd go back to 1992 and tell people to stay off C++ for a few more years until the standard library was in place, and templates widely understood. I have a feeling many bad practices and much bad reputation came in that time frame.) > I have worked on large scale projects in both C++ and C and prefer C > however misguided you may feel that makes me. ... > I'm quite fond of erlang for instance though > I don't believe you should learn it as I'm sure you can accomplish what > you need to do in C++ I just stated that I prefer C++ to C, not that C++ is better than all other languages at everything! /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o .
[toc] | [prev] | [next] | [standalone]
| From | Dombo <dombo@disposable.invalid> |
|---|---|
| Date | 2012-10-23 20:01 +0200 |
| Message-ID | <k66ltd$mv6$1@dont-email.me> |
| In reply to | #19215 |
Op 23-Oct-12 17:44, Jorgen Grahn schreef: > On Sun, 2012-10-21, Greg Martin wrote: >> What seems to be the real irony here is that it isn't 1992, though I'm >> getting a decided deja vu, but 2012 when this conversation should be >> taking place between C++ zealots and C# adherents (or maybe Java, >> Python, Ruby, erlang programmers et al). > > I don't quite get your point here. It's obviously not "C should have > died some time after 1992". > > (For what it's worth, if I had a time machine I'd go back to 1992 and > tell people to stay off C++ for a few more years until the standard > library was in place, and templates widely understood. I have a > feeling many bad practices and much bad reputation came in that time > frame.) It would probably also have prevented many C++ libraries from implementing their own string and container classes. This is one thing I dislike about C++.
[toc] | [prev] | [next] | [standalone]
| From | Stuart <DerTopper@web.de> |
|---|---|
| Date | 2012-10-24 12:01 +0200 |
| Message-ID | <k68ea2$p33$1@dont-email.me> |
| In reply to | #19217 |
On 23-Oct-12 Jorgen Grahn wrote: [snip] >> (For what it's worth, if I had a time machine I'd go back to 1992 and >> tell people to stay off C++ for a few more years until the standard >> library was in place, and templates widely understood. I have a >> feeling many bad practices and much bad reputation came in that time >> frame.) On 10/23/12 Dombo wrote: > It would probably also have prevented many C++ libraries from > implementing their own string and container classes. This is one thing I > dislike about C++. +1. I took an immediate dislike to qt because it seemed as if they had to reinvent the wheel not only once but many times. Later I realized that they wanted to have a copy-on-write semantics for their strings, which could not be achieved with std::string at that time. Now that std::string supports copy-on-write, too, noone on the qt team seems inclined to remove the superfluous qtString class. Even Microsoft still uses CObject as base class for all classes of their MFC library, even though the whole purpose of this class was to provide run-time type information. I guess that is just the way large projects are. Regards, Stuart
[toc] | [prev] | [next] | [standalone]
| From | Dombo <dombo@disposable.invalid> |
|---|---|
| Date | 2012-10-24 20:31 +0200 |
| Message-ID | <k69c3a$kg1$1@dont-email.me> |
| In reply to | #19225 |
Op 24-Oct-12 12:01, Stuart schreef: > On 23-Oct-12 Jorgen Grahn wrote: > [snip] >>> (For what it's worth, if I had a time machine I'd go back to 1992 and >>> tell people to stay off C++ for a few more years until the standard >>> library was in place, and templates widely understood. I have a >>> feeling many bad practices and much bad reputation came in that time >>> frame.) > > On 10/23/12 Dombo wrote: >> It would probably also have prevented many C++ libraries from >> implementing their own string and container classes. This is one thing I >> dislike about C++. > > +1. > > I took an immediate dislike to qt because it seemed as if they had to > reinvent the wheel not only once but many times. Later I realized that > they wanted to have a copy-on-write semantics for their strings, which > could not be achieved with std::string at that time. > > Now that std::string supports copy-on-write, too, noone on the qt team > seems inclined to remove the superfluous qtString class. > > Even Microsoft still uses CObject as base class for all classes of their > MFC library, even though the whole purpose of this class was to provide > run-time type information. Though there were valid reasons at the time for libraries to provide their own string and container classes, it is a shame many C++programmers still have to deal with this unfortunate legacy. The main thing I hate is that when you use multiple libraries each with their own string and container classes (and naming conventions, idioms...etc), you have to write code to convert between various classes. This is a waste of both programmer- and execution time.
[toc] | [prev] | [next] | [standalone]
| From | Nick Keighley <nick_keighley_nospam@hotmail.com> |
|---|---|
| Date | 2012-10-20 06:13 -0700 |
| Message-ID | <6eb7c9a9-1241-4a14-901d-9900626db251@w2g2000vbc.googlegroups.com> |
| In reply to | #19041 |
On Oct 18, 8:55 am, Stuart <DerTop...@web.de> wrote: > On 10/18/12 James Kuyper wrote: > [snip]> I'm primarily a C programmer, so I may be > > missing out some elegant C++ way of doing that, but the following > > inelegant (and untested) code should do the job: > > [snip] > > I'm intrigued. I have never ever met someone who described himself as a > C programmer. May I ask what kind of business you are in? My guess is > your line of work includes either device drivers, embedded devices, > kernel code or something else that forces you to write C instead of C++. > In all these years I have never met someone who used C instead of C++ > unless he was forced to do so. seriously? I know quite a few people who are C programmers. Most are embedded but not all. I can see the appeal. I know pretty much all of C. I only know a large percentage of C++. I haven't got round to the new C++ standard. I don't know every little corner of the standard library and I certainly don't know boost! Do you write exception safe code? Please don't mention template-meta-programming...
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2012-10-21 07:25 +0000 |
| Message-ID | <k60822$jc9$2@speranza.aioe.org> |
| In reply to | #19125 |
In comp.lang.c++ Nick Keighley <nick_keighley_nospam@hotmail.com> wrote: > I can see the appeal. I know pretty much all of C. I only know a large > percentage of C++. I haven't got round to the new C++ standard. I > don't know every little corner of the standard library and I certainly > don't know boost! Do you write exception safe code? That last question is really odd at the end of the paragraph that's otherwise talking about something else entirely. Care to explain?
[toc] | [prev] | [next] | [standalone]
| From | Nick Keighley <nick_keighley_nospam@hotmail.com> |
|---|---|
| Date | 2012-10-27 05:54 -0700 |
| Message-ID | <2ab9be4f-397f-47b9-b71b-3225f805add3@y6g2000vbb.googlegroups.com> |
| In reply to | #19153 |
On Oct 21, 8:25 am, Juha Nieminen <nos...@thanks.invalid> wrote: > In comp.lang.c++ Nick Keighley <nick_keighley_nos...@hotmail.com> wrote: > > > I can see the appeal. I know pretty much all of C. I only know a large > > percentage of C++. I haven't got round to the new C++ standard. I > > don't know every little corner of the standard library and I certainly > > don't know boost! Do you write exception safe code? > > That last question is really odd at the end of the paragraph that's > otherwise talking about something else entirely. Care to explain? I wondered how good a C++ programmer he was. I see a fair amount of C+ + code that news multiple items and deletes them in the destructor. That defines non-trivial destructors but not assignment or copy construction. Code that sprinkles try-catch about seemingly at random. Writing *good* C++ isn't hard but it requires some basic knowledge.
[toc] | [prev] | [next] | [standalone]
| From | Old Wolf <oldwolf@inspire.net.nz> |
|---|---|
| Date | 2012-11-11 14:58 -0800 |
| Message-ID | <aef78c59-a4a2-43c0-b874-c507ecc83124@lg12g2000pbb.googlegroups.com> |
| In reply to | #19041 |
On Oct 18, 8:55 pm, Stuart <DerTop...@web.de> wrote: > I'm intrigued. I have never ever met someone who described himself as a > C programmer. May I ask what kind of business you are in? I describe myself as a C programmer too, and am available to field questions :) I write application code for payment terminals. You have to use the toolset that the hardware vendor provides for developing code that can interface with its OS, typically this is some arcane modification of C with fairly stringent memory requirements.
[toc] | [prev] | [next] | [standalone]
| From | gof@somewhere.invalid (Adam Wysocki) |
|---|---|
| Date | 2012-11-12 10:33 +0000 |
| Message-ID | <gof.1352716351.10919@somewhere.invalid> |
| In reply to | #19572 |
In comp.lang.c Old Wolf <oldwolf@inspire.net.nz> wrote: > I write application code for payment terminals. What vendor and platform? -- Gof http://www.chmurka.net/
[toc] | [prev] | [next] | [standalone]
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Date | 2012-10-18 12:19 +1300 |
| Message-ID | <ae8sobFo8jlU7@mid.individual.net> |
| In reply to | #19034 |
On 10/18/12 10:47, gus gassmann wrote:
>
> myStruct = new MyStruct[ndim];
> for (int i=0; i< ndim; i++)
> {
> myStruct[i] = {{(const)(get_str().c_str()), 0,
> get_int()}};
> }
As others have correctly pointed out, the mistyped cast from std::string
will end in tears. You need to convert the string to an char array and
keep track of that data for later disposal.
Something like this my help:
struct FromString
{
static std::vector<char*> stash;
char *p;
FromString( const std::string& s )
: p(new char[s.size()])
{
s.copy(p, s.size());
stash.push_back(p);
}
operator char*() const { return p; }
};
std::vector<char*> FromString::stash; // *free these later!!*
Then you could write:
for (int i=0; i < ndim; i++)
{
MyStruct temp = {FromString(get_str()), 0, get_int()};
myStruct[i] = temp;
}
Note I kept the temporary variable to avoid the use C++11 extended
initialiser lists.
--
Ian Collins
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2012-10-18 07:06 +0000 |
| Message-ID | <k5o9q9$i1t$1@speranza.aioe.org> |
| In reply to | #19027 |
In comp.lang.c++ Noob <root@127.0.0.1> wrote:
> If the size of the array is not known at compile-time, then you
> need dynamic memory allocation.
Incorrect. In C you can use a variable-length array, such as:
void foo(int n)
{
SomeStruct s[n];
...
}
However, that's probably not what the OP meant because he explicitly
wanted to use an initializer list to initialize the array. Therefore
he probably didn't mean to imply that the size of the array is only
known at runtime.
[toc] | [prev] | [next] | [standalone]
| From | Noob <root@127.0.0.1> |
|---|---|
| Date | 2012-10-18 11:36 +0200 |
| Message-ID | <k5oiig$k8n$1@dont-email.me> |
| In reply to | #19038 |
Juha Nieminen wrote:
> In comp.lang.c++ Noob wrote:
>
>> If the size of the array is not known at compile-time, then you
>> need dynamic memory allocation.
>
> Incorrect. In C you can use a variable-length array, such as:
>
> void foo(int n)
> {
> SomeStruct s[n];
> ...
> }
VLAs have automatic storage duration. They are therefore not appropriate
for the OP's purpose.
> However, that's probably not what the OP meant because he explicitly
> wanted to use an initializer list to initialize the array. Therefore
> he probably didn't mean to imply that the size of the array is only
> known at runtime.
Right, except for the fact that he wrote:
"I need to set dynamic values [...] where both the values and the number
of values are only known at runtime."
[toc] | [prev] | [next] | [standalone]
Page 7 of 8 — ← Prev page 1 2 3 4 5 6 [7] 8 Next page →
Back to top | Article view | comp.lang.c++
csiph-web