I agree with Ian Collins. This is madness.
"Madness?! This! Is! c.l.c++!!!"
jumping in here, as some of this seemed interesting...
what world do you live in? I mostly code in C++. The guy at the next desk codes in C (he's an embedded guy). I don't treat him like a moron.
well, to be fair, in my case people have been condescending towards me
using a lot of C (though, most of this has been from Java and C#
developers).
a lot has been of the sort of thing like.
a lot has been defense, like "yeah, in fact you *can* do OO stuff in C,
and it isn't even really all that difficult". well, along with defending
that it is also possible to do GUI / network / multithreaded / ... code
in C as well, and use a GC (Garbage Collector) if so desired, ...
apparently a lot of stuff I am doing is "impossible" according to some
people, grr...
but, in a way, given that C is a language where pretty much nothing
really comes out looking pretty, how pretty it is to use a feature (or
how much of a hack it is to implement it) isn't really a good measure of
how possible it is to use a feature.
this is, after all, part of why people build abstractions.
AOL. me too.
me, for one.
I am primarily a C programmer who also does some C++, if this counts...
idiomatic? probably not.
apparently my C code probably isn't terribly idiomatic either.
(someone recently used the term "hopelessly strange" to describe it...).
I guess another person had described it as "down the rabbit hole".
but, oh well, whatever...
quite a bit
define "large". Previous project 750 KLOC, current 400 KLOC. Multi-year development.
my current project is around 1 Mloc, and the codebase has (more or less)
been in development / in-use for around 12 years.
note that, for the most part, there has been no particular "end-goal" or
up-front design, so the codebase is more of an amorphous multi-tool
(with smaller sub-goals or use-cases).
then some people complain that such a project is never "completed", but
the thing is, projects of this sort never are "complete" in the
traditional sense (only particular features get "completed", or
something can be "reasonably complete" WRT a particular use-case).
and, for the most part, its goal hasn't been "to make money" or similar,
rather it has been more like "giving me something to do" (with money
more as a side thing: one needs money to live off of and to continue
doing what one is doing).
note that "changing the world" hasn't really been much of a goal either.
(as I see it, the world goes on either way... I just try to live my life
and do my thing, ...).
which probably explains why much Perl is shit. Do most Perl "programmers" even know Perl has functions?
who knows sometimes?...
probably reasonable for 30 lines. (Though you can do an awful lot in 30 lines of Perl...). But if it's a significant application it would pay to buy (or grow) some Perl experience.
my case: almost no personal experience with Perl.
you ain't gonna learn Perl in a few hours. I'm a mediocre Perl programmer and I've invested more than a few hours.
yep.
in my case, it takes a while to really learn new things all that well
(and apparently I am fairly mediocre intelligence-wise), so I mostly
prefer things which are tried and true.
very. Exceptions, templates, STL, that whole OO thingy...
well, OO can sort of be done in C.
fair enough for the rest.
bollocks. There's lots of people who call themselves C++ programmers that can write C++ that compiles and runs. But look inside and it's C. Little use of the STL. Mounds of procedural code stuffed into God Antipatterns. No exception safety. "What's exception safety?"
yeah.
can probably describe most of what little C++ code I have written thus
far. it mostly wasn't meant to be idiomatic though, more because in this
case I had considered using a library which itself presented a C++ only
interface. I ended up not using the library, but the code in question
remained as-is.
note that the code in question presents a C friendly external interface,
and the tools in use with it were modified to accept the C++ subset in
use (basically, excluding the use of namespaces).
I'm trying to learn Haskell at the moment. I'm not finding it easy! And its my Nth programming lanaguage.
my experience with Haskell:
looked at it some;
tried to mess with it some;
gave up never to look at it again...
The hard bit about C++ (IMHO) is OOP (and OOD) rather than syntax.
possibly, or at least this a bigger mental jump.
I don't think that OOP vs non-OOP is really a matter of C vs C++, since
technically, OOP can be done in C (pretty or not), and non-OOP code can
be written in C++.
a person can also write procedural style code in Java as well.