Knowledge of C necessary for well-roundedness?

Please compose all posts in Emacs.

Moderators: phlip, Moderators General, Prelates

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Knowledge of C necessary for well-roundedness?

Postby 0xBADFEED » Sat Jan 17, 2009 9:17 pm UTC

I was wondering if people think that knowledge of C (or C++) is necessary for someone to be a well-rounded programmer?

I would have said "yes", but now I'm not so sure. I recently learned that Jeff Atwood does not know C. I really enjoy his blog postings and consider him to have a fairly good handle on lots of different aspects of programming problems.

Note: I would consider 'well-roundedness' and 'good' to be largely orthogonal concepts, even if they do tend to have some correlation.

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: Knowledge of C necessary for well-roundedness?

Postby Area Man » Sat Jan 17, 2009 11:31 pm UTC

Judging by his post on January 14th, it looks like he does know C - or at least the concepts.
And, yes, I do think awareness of low-level happenings in the computer will make you a better programmer.
Bisquick boxes are a dead medium.

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: Knowledge of C necessary for well-roundedness?

Postby 0xBADFEED » Sun Jan 18, 2009 12:12 am UTC

Area Man wrote:Judging by his post on January 14th, it looks like he does know C - or at least the concepts.
And, yes, I do think awareness of low-level happenings in the computer will make you a better programmer.


The C section of that post is a quote from someone else talking about that particular piece of code.

I'm sure he knows the concepts and can read small snippets of it without too much trouble. I don't know VB, but I can read snippets of a VB program without much trouble (or at least as much trouble as could be expected).

But with C (as with most things) the devil is in the details. So I think being able to read a small snippet of it is not the same as knowing it.

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: Knowledge of C necessary for well-roundedness?

Postby Area Man » Sun Jan 18, 2009 2:29 am UTC

Imagine a "non-rounded" vb or java programmer looking at that malloc() call; someone with no concept of stack, heap, or pointers hasn't much idea how computers really work, imo.

Let me ask it another way: would you rather hire a java programmer and let him dive into a C project, or get a C programmer and let him loose in your java app?
Bisquick boxes are a dead medium.

User avatar
OOPMan
Posts: 314
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: Knowledge of C necessary for well-roundedness?

Postby OOPMan » Mon Jan 19, 2009 9:01 am UTC

I think some knowledge of C is good. I haven't really done much C in years and the C I did was relatively basic. Still, learning how to build a linked list in C is probably more pointer experience than most people get at university nowadays and something I consider valuable.

C++, not so sure. To be honest, I think it's the Java of yesteryear. Big, bad, the tool of choice for managers and corporates and lacking in much of anything really interesting...
Image

Image

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: Knowledge of C necessary for well-roundedness?

Postby Berengal » Mon Jan 19, 2009 11:31 am UTC

I wouldn't say knowledge of C is necessary. In fact, I'd argue that the vb and java monkeys would have much more to gain from learning functional programming than C. Knowledge of what exactly happens when the computer executes your code is even more important, and learning C is an excelent way of learning that, but the language in itself is rather dull.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

User avatar
Xanthir
My HERO!!!
Posts: 5413
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: Knowledge of C necessary for well-roundedness?

Postby Xanthir » Mon Jan 19, 2009 4:29 pm UTC

Berengal wrote:I wouldn't say knowledge of C is necessary. In fact, I'd argue that the vb and java monkeys would have much more to gain from learning functional programming than C. Knowledge of what exactly happens when the computer executes your code is even more important, and learning C is an excelent way of learning that, but the language in itself is rather dull.

I'm with Berengal. C is a means to an end, in that becoming halfway decent at C requires you to learn a good bit of how your computer works internally. It's that latter bit that's valuable, though, not the C knowledge per se.

Similarly, learning Lisp isn't valuable in and of itself, but only insofar as it teaches the skills of functional programming and the strength of a rewritable language.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

Two9A
Posts: 194
Joined: Sat Jul 26, 2008 11:22 pm UTC
Location: The smogbound wastes of northern England
Contact:

Re: Knowledge of C necessary for well-roundedness?

Postby Two9A » Mon Jan 19, 2009 5:28 pm UTC

Thirded, if I may. As Xanthir says, it's knowledge of the internals of the computer that count more than the syntax of C. Even though C-derived languages abound in the world, it's not a complicated piece of knowledge to pick up.

Personally, I learned everything I know about the insides of a computer from the C64: binary (sprite design), pointers (indirect addressing), machine code (6502 assembly). Hell, the Programmer's Reference had the computer's circuit diagrams in the back. As long as you've got access to something sufficiently low-level, it doesn't matter what language you use to talk to it.

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: Knowledge of C necessary for well-roundedness?

Postby Area Man » Mon Jan 19, 2009 8:50 pm UTC

So we all agree that knowing low-level is important, though C isn't the only option.
But, what better way to get to know the internals of programming than with the "portable assembly language"? esp. one which is so widely used (has been and will be), and is the basic common denominator of programming. If ever you want to find the inner workings of something, you can bet that sooner or later you'll be reading C, not brainfuck. Kernels, filesystems, libraries, interfaces, example code, ...; learn C/C++.
Like to use python but need parts to be fast? guess what you should know.

(There was a thread before asking if you should learn C before learning C++ - definitely not, but learning C before assembly would help for sure)
Bisquick boxes are a dead medium.

User avatar
0xDEADBEEF
Posts: 284
Joined: Wed Jan 30, 2008 6:05 am UTC
Location: Austin, TX
Contact:

Re: Knowledge of C necessary for well-roundedness?

Postby 0xDEADBEEF » Mon Jan 19, 2009 9:15 pm UTC

0xBADFEED wrote:I was wondering if people think that knowledge of C (or C++) is necessary for someone to be a well-rounded programmer?


0xBADFEED? Are we related? :lol:

I think a good low-level knowledge of OpCodes, Assembler, C, and C++ makes me a better Computer Scientist more than it does a better programmer.

There are plenty of good programmers that don't know any of this...especially web programmers.

If you are doing something low level, like writing the next great high-level language specification and/or compiler, operating system, database engine, or something like that, you really need the low-level knowledge.

Nothing will give you an understanding of how Object-Oriented programming should work like coding in C++, where you specify every single behavior of your classes. Then, if you code in Java, Python, or some other language, you'll better understand how things ought to work.

But you can make a good living, writing code that people will actually use, without knowing any of these.

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: Knowledge of C necessary for well-roundedness?

Postby Area Man » Mon Jan 19, 2009 10:14 pm UTC

0xDEADBEEF wrote:I think a good low-level knowledge of OpCodes, Assembler, C, and C++ makes me a better Computer Scientist more than it does a better programmer.

I don't want to see this as a symantics issue (despite being in RW), but "making a good living" and "web programming" is different from a "well-roundedness" question.

I agree that one should know functional (as well as declarative, OO, event, and so on) programming in order to be "well rounded".
You should also know different data structures and algorithms, and when to use which. Just as you should know SQL to talk to databases.

Learning the syntax of a language is not the hard part (regardless of how dull or sexy you think it is), it's the concepts of what can be done with it that you have to understand.

The difference between C++ and java is that java forces everything to be object-oriented, whether it's the right paradigm or not, where C++ allows you various approaches.
Some "big and bad" parts of C++ I like - where you get more or less abstraction, better error reporting, type safety, and code generaged for you using templates rather than using a bunch of preprocessor magic or function overloading; let the compiler do a lot of hard work for you! (i.e. Let the compiler be complex, rather than my code.) There's usually no extra run-time cost to it.

Again, you have to wrap your head around what can be done with this power (and limitations). As a programmer you will also have to talk to other people about how to best get the job done; arguing why a doubly-linked list is a horrible idea compared to a static array (or vice-versa) requires depth of knowledge beyond the abstract.

PS: this is bleeding into language-knowing and best language.
Bisquick boxes are a dead medium.

User avatar
0xDEADBEEF
Posts: 284
Joined: Wed Jan 30, 2008 6:05 am UTC
Location: Austin, TX
Contact:

Re: Knowledge of C necessary for well-roundedness?

Postby 0xDEADBEEF » Mon Jan 19, 2009 10:36 pm UTC

I should say, in fairness, that I learned C++ "pre-STL." I learned to write my own classes, set "public" and "private" members, declare inheritance, etc., all by hand.

The STL is more usefull in "real life" programming than it is in education. It's like learning arithmetic first before you ever pick up a calculator. Then, in your Algebra and Calculus classes, you simplify the equations, and just use your calculator to do the arithmetic.

User avatar
OOPMan
Posts: 314
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: Knowledge of C necessary for well-roundedness?

Postby OOPMan » Tue Jan 20, 2009 10:45 am UTC

0xDEADBEEF wrote:Nothing will give you an understanding of how Object-Oriented programming should work like coding in C++, where you specify every single behavior of your classes. Then, if you code in Java, Python, or some other language, you'll better understand how things ought to work.


Really? I don't think that's true at all. I'll be up front and admit that my level of experience with languages in general lags behind a lot of people on this forum (I'm still learning LISP ;-) ) so my opinion on this may not be that valid but I'd have to say that I don't see C++ as being a very good example of OO at all.

Last time I checked, C++ is a very multi-paradigm language. A result of this, however, is that whille it may support OO, its idea of OO is not very pure.

I think possibly a better example of something that will teach you what OO means is a lang like Ruby or that old stalwart, Smalltalk.
Image

Image

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Knowledge of C necessary for well-roundedness?

Postby ash.gti » Tue Jan 20, 2009 4:16 pm UTC

OOPMan wrote:Last time I checked, C++ is a very multi-paradigm language. A result of this, however, is that whille it may support OO, its idea of OO is not very pure.

I think possibly a better example of something that will teach you what OO means is a lang like Ruby or that old stalwart, Smalltalk.


C++ doesn't support reflection, message forwarding, metaclasses and it has limited support for run time information on things.

It is a pretty decent OO language, but its a do it yourself language. If you want to do some of the more complex OO things in C++ you end up using a lot of templates (which dynamic languages don't need) and anything the STL doesn't provide (or Boost seems pretty popular these days too) you have to implement yourself, which may or may not be a lot of work.

C++ OO is really designed after Simula's style OO where as other languages (like Ruby) are designed after Smalltalk style OO, which really is just 2 different ways of looking at the same problem. I personally prefer Smalltalk style to Simula, which has resulted in me also preferring languages like Ruby over say C# or Objective-C over C++.

I'd suggest trying at least a little bit of both types of OO (hey you can even use Objective-C++ and mix them together)
# drinks WAY to much espresso

User avatar
segmentation fault
Posts: 1770
Joined: Wed Dec 05, 2007 4:10 pm UTC
Location: Nu Jersey
Contact:

Re: Knowledge of C necessary for well-roundedness?

Postby segmentation fault » Tue Jan 20, 2009 9:21 pm UTC

0xDEADBEEF wrote:
0xBADFEED wrote:I was wondering if people think that knowledge of C (or C++) is necessary for someone to be a well-rounded programmer?


0xBADFEED? Are we related? :¡This cheese is burning me!:


i....i thought you 2 were alts this entire time...

anyway, again, its the concepts that matter more than the language. however, a good way to learn the concepts is learning the language.
people are like LDL cholesterol for the internet

User avatar
Xanthir
My HERO!!!
Posts: 5413
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: Knowledge of C necessary for well-roundedness?

Postby Xanthir » Wed Jan 21, 2009 3:43 pm UTC

Area Man wrote:So we all agree that knowing low-level is important, though C isn't the only option.
But, what better way to get to know the internals of programming than with the "portable assembly language"? esp. one which is so widely used (has been and will be), and is the basic common denominator of programming. If ever you want to find the inner workings of something, you can bet that sooner or later you'll be reading C, not brainfuck. Kernels, filesystems, libraries, interfaces, example code, ...; learn C/C++.

Indeed, C is, in general, the best way to get a handle on that sort of thing. I (and I think others) just object to knowledge of C being a necessary condition, when it is in reality a sufficient condition.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
Ptolom
Posts: 1559
Joined: Mon Mar 24, 2008 1:55 pm UTC
Location: The entropy pool
Contact:

Re: Knowledge of C necessary for well-roundedness?

Postby Ptolom » Wed Feb 04, 2009 5:43 pm UTC

OO kind of scares me. It seems like unnecessary complication, although this maybe becaus I've never written a program more than a few hundred lines long. To be honest I never really used it in C++, and now I've switched to C, I'm much happier.

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Knowledge of C necessary for well-roundedness?

Postby ash.gti » Wed Feb 04, 2009 6:41 pm UTC

Ptolom wrote:OO kind of scares me. It seems like unnecessary complication, although this maybe becaus I've never written a program more than a few hundred lines long. To be honest I never really used it in C++, and now I've switched to C, I'm much happier.


If you ever have to write something over say.... 30k lines you'll probably see why OO was created. Its really more about organizing code, re-using code, and maintaining it than anything else. You can work on a project that big without OO, just doing straight C, but it can get pretty difficult to manage.
# drinks WAY to much espresso

User avatar
Brooklynxman
Because I'm Awesome
Posts: 609
Joined: Tue Jan 20, 2009 4:27 pm UTC
Location: Here
Contact:

Re: Knowledge of C necessary for well-roundedness?

Postby Brooklynxman » Wed Feb 04, 2009 6:45 pm UTC

How about just C++?
We figure out what all this means, then do something large and violent

The thing about changing the world...once you do it the world's all different.

I'm Angel. I beat the bad guys.

Spoiler:
Image

sakeniwefu
Posts: 170
Joined: Sun May 11, 2008 8:36 pm UTC

Re: Knowledge of C necessary for well-roundedness?

Postby sakeniwefu » Fri Feb 06, 2009 11:34 am UTC

ash.gti wrote:
Ptolom wrote:OO kind of scares me. It seems like unnecessary complication, although this maybe becaus I've never written a program more than a few hundred lines long. To be honest I never really used it in C++, and now I've switched to C, I'm much happier.


If you ever have to write something over say.... 30k lines you'll probably see why OO was created. Its really more about organizing code, re-using code, and maintaining it than anything else. You can work on a project that big without OO, just doing straight C, but it can get pretty difficult to manage.


Object orientation is useful, but C++ isn't the best platform to learn about OO. A real world Java application will make it easier to see why OO exists in the first place.
OO is a convenient way of modularizing software and once you know it you will use some of its concepts in your standard C apps. In the end its all CALLs and GOTOs but structured programming has been shown as a superior design strategy and OO is just an evolution of that.
Some nonsensical features like multiple inheritance are rarely useful, but it seems that when you invent a new paradigm, it is easy to get too excited.
The two main obstacles people have to understand object orientation are the lame object, animal and lemming examples and C++.

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Knowledge of C necessary for well-roundedness?

Postby ash.gti » Fri Feb 06, 2009 2:42 pm UTC

haha, well, I do more Objective C than C++. C++ is something very rarely work with these days. And I'd argue something like Ruby or Smalltalk could help a novice understand real world applications of objects better than Java. In both of those languages, everything is an object, more truly than in Java. Everything can accept or send a message to something else. There are cases in both languages were you get a nil object but you can still send messages to that, or redirect message from it to something else. But I never really liked Java to begin with and as a human I tend to fall back on the knowledge I am familiar with (see Ruby, Smalltalk and Objective C).
# drinks WAY to much espresso

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: Knowledge of C necessary for well-roundedness?

Postby 0xBADFEED » Fri Feb 06, 2009 2:56 pm UTC

sakeniwefu wrote:Some nonsensical features like multiple inheritance are rarely useful...


Multiple inheritance can be extremely useful in C++. And I don't think it's as dangerous as people seem to think if your class hierarchy is sane and you understand the limitations. It can be especially useful when you're dealing with templates and you use traits classes or policy classes.
Last edited by 0xBADFEED on Fri Feb 06, 2009 4:01 pm UTC, edited 1 time in total.

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Knowledge of C necessary for well-roundedness?

Postby ash.gti » Fri Feb 06, 2009 3:41 pm UTC

The thing about multiple inheritance is it can make things unnecessarily complicated. There are no design concepts (I am aware of) that require multiple inheritance to work and be effective. Most people don't use it simply because of the complications it *can* introduce. Multiple inheritance breaks the KISS (keep it simple stupid) concepts.
# drinks WAY to much espresso

User avatar
Xanthir
My HERO!!!
Posts: 5413
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: Knowledge of C necessary for well-roundedness?

Postby Xanthir » Fri Feb 06, 2009 6:53 pm UTC

ash.gti wrote:The thing about multiple inheritance is it can make things unnecessarily complicated. There are no design concepts (I am aware of) that require multiple inheritance to work and be effective. Most people don't use it simply because of the complications it *can* introduce. Multiple inheritance breaks the KISS (keep it simple stupid) concepts.

This is a lie told by people who have never worked with a language that makes multiple inheritance easy. Now, granted, many times inheriting at all is a bad idea, but multiple inheritance *is* easy. Lisp's CLOS is very simple.

Of course, even when multiple inheritance would be useful, I think that most of the cases could be accomplished by proper support for wrapping methods. Frex, when hacking in PHP I like to use a library that gives me c#/ruby-like getters and setters, so I expose plain variables on my objects and hide implementation details behind them. The library does this by overriding __get and __set, which are magic functions that PHP calls when you try to get or set a variable that doesn't exist. This requires me to have my class inherit from the library class.

Unfortunately, this also prevents me from using __get or __set for my own purposes. The library patches around this by letting you define _get and _set and calling them if it can't handle something, but what the library *really* wants to do is just set a :before function on __get and __set. Whenever __get or __set would be called, the :before function is called first, giving the library a chance to intercept the call and run my code on variables I've specified as having a getter or setter. It can then choose to pass the call onwards to the real __get or __set if it finds that it doesn't apply. I can even have multiple different libraries doing this, as :before methods layer over each other.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Knowledge of C necessary for well-roundedness?

Postby ash.gti » Fri Feb 06, 2009 8:38 pm UTC

Xanthir wrote:This is a lie told by people who have never worked with a language that makes multiple inheritance easy. Now, granted, many times inheriting at all is a bad idea, but multiple inheritance *is* easy. Lisp's CLOS is very simple.


So... CLOS does:
By default, the method with the most specific argument classes is chosen; then in the order in which parent classes are named in the subclass definition. However, the programmer can override this, by giving a specific method resolution order or stating a rule for combining methods.


I still don't see how this makes it 'easy'.

Why add the complexity?
# drinks WAY to much espresso

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: Knowledge of C necessary for well-roundedness?

Postby 0xBADFEED » Sat Feb 07, 2009 12:24 am UTC

ash.gti wrote:I still don't see how this makes it 'easy'.

Why add the complexity?


The crux of your argument is that you're basically assuming any use of multiple inheritance is adding unnecessary complexity.

Just because the CLOS system allows you to build an extremely complex resolution scheme for multiple inheritance doesn't mean you're going to. In languages that allow custom resolution strategies most of the time you just do what's "natural" and go with the default resolution strategy. You only use multiple inheritance when it reduces complexity and makes the system more intuitive. This is true of any language that supports multiple inheritance.

For instance, a lot of the time in something like Java that doesn't allow multiple implementation inheritance you end up doing silly things like:

Code: Select all

public interface Interface {
   public void foo();
   public void bar();
}

public class DefaultImpl implements Interface {
   public void foo(){...}
   public void bar(){...}
}

public class ClassA extends ClassB implements Interface {
   private DefaultImpl impl;
   public void foo() {impl.foo();}
   public void bar() {impl.bar();}
}

What you really want here is just some very simple multiple inheritance.

Something along the lines of:

Code: Select all

public class ClassA extends ClassB, DefaultImpl {
    ...etc.
}

I don't think something like this is going to make my head explode from the "complexity".

It's quite obvious what's going on, and if you design your classes in a sane way to prevent unwanted naming collisions then you're fine.

When you start making classes that extend from 8 different superclasses you know you have a problem. But then that's just stupid. Any person that did that would probably fuck up a single-inheritance design also.

Most of the time single inheritance is fine, but, when used appropriately, multiple inheritance can make things less complex.

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: Knowledge of C necessary for well-roundedness?

Postby Area Man » Sat Feb 07, 2009 9:18 pm UTC

C++ gives you the option. You would rarely use multi-inheritance or RTTI, but it's there should you want it. Ability & flexibility to solve new problems in various ways. Not everything should be a square peg if you have a round hole.
This is in contrast to, say, java, where even if all you want to do is write "hello, world" you HAVE to make it a class !?
Bisquick boxes are a dead medium.

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: Knowledge of C necessary for well-roundedness?

Postby 0xBADFEED » Sat Feb 07, 2009 9:48 pm UTC

Agreed.

The policy or trait-based use-case is even more compelling for the use of multiple inheritance. For instance, implementing a less-than and is-equal operation for a class and then getting all the other relational operators for free by inheriting all the other operators implemented in terms of less-than and is-equal. Or, for just for really useful utility classes like boost::noncopyable.

These types of cases are the bread-and-butter of multiple-inheritance in C++. When you use multiple inheritance in C++ it's usually as a way to specify implementation traits and policies of your class rather than combining two disparate object hierarchies into one super-complex object.

Scala has taken this idea of implementation traits to the next level and formalized it. It's pretty interesting and worth checking out.

User avatar
0xDEADBEEF
Posts: 284
Joined: Wed Jan 30, 2008 6:05 am UTC
Location: Austin, TX
Contact:

Re: Knowledge of C necessary for well-roundedness?

Postby 0xDEADBEEF » Sun Feb 08, 2009 4:07 pm UTC

Area Man wrote:C++ gives you the option. You would rarely use multi-inheritance or RTTI, but it's there should you want it. Ability & flexibility to solve new problems in various ways. Not everything should be a square peg if you have a round hole.
This is in contrast to, say, java, where even if all you want to do is write "hello, world" you HAVE to make it a class !?


Exactly. I can write an entirely procedure-oriented app in java, wrapped in the single classfile of the app itself. I could even use Java classes as "structs," only accessing members through dot-notation, and not writing any methods in the "class."

It takes more than being forced to use classes to be "object-oriented."

User avatar
OOPMan
Posts: 314
Joined: Mon Oct 15, 2007 10:20 am UTC
Location: Cape Town, South Africa

Re: Knowledge of C necessary for well-roundedness?

Postby OOPMan » Mon Feb 09, 2009 7:02 am UTC

I have to say that even though I am not a huge fan of C++, I don't see multiple inheritance as being inherently evil. In fact, it stems rather logically from the idea of inheritance itself.

Many is the time I've found myself wishing Java or PHP had true multiple inheritence. It sure would make my life a whole lot easier ;-)
Image

Image

User avatar
b.i.o
Green is the loneliest number
Posts: 2519
Joined: Fri Jul 27, 2007 4:38 pm UTC
Location: Hong Kong

Re: Knowledge of C necessary for well-roundedness?

Postby b.i.o » Mon Feb 16, 2009 7:37 pm UTC

Area Man wrote:This is in contrast to, say, java, where even if all you want to do is write "hello, world" you HAVE to make it a class !?

That's because Java is an object oriented programming language through and through.

If you want to program procedurally, use another language, because Java is not a good tool for that job.

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Knowledge of C necessary for well-roundedness?

Postby ash.gti » Mon Feb 16, 2009 11:04 pm UTC

I will give Java some props for its crazy large standard library that takes care of almost everything you'd need.

I still don't like the language though... But JRuby, and Groovy have helped me in that respect some. These days I am willing to tolerate using the JVM mainly because I can use a different syntax and still flex most of Java's muscles (the standard library for one).
# drinks WAY to much espresso

0xBADFEED
Posts: 687
Joined: Mon May 05, 2008 2:14 am UTC

Re: Knowledge of C necessary for well-roundedness?

Postby 0xBADFEED » Tue Feb 17, 2009 3:38 am UTC

ash.gti wrote:I will give Java some props for its crazy large standard library that takes care of almost everything you'd need.

Besides the ubiquity and high-quality of the JVM this is its one saving grace.

Java is the ultimate batteries-included language.

Philwelch
Posts: 2904
Joined: Tue Feb 19, 2008 5:33 am UTC
Location: RIGHT BEHIND YOU

Re: Knowledge of C necessary for well-roundedness?

Postby Philwelch » Tue Feb 17, 2009 5:54 am UTC

For well-roundedness you need both C and assembly.

Well-roundedness, however, may be overrated.
Fascism: If you're not with us you're against us.
Leftism: If you're not part of the solution you're part of the problem.

Perfection is an unattainable goal.

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: Knowledge of C necessary for well-roundedness?

Postby Area Man » Tue Feb 17, 2009 7:41 am UTC

b.i.o wrote:
Area Man wrote:This is in contrast to, say, java, where even if all you want to do is write "hello, world" you HAVE to make it a class !?

That's because Java is an object oriented programming language through and through.

If you want to program procedurally, use another language, because Java is not a good tool for that job.

Uhhhhhm, yeaaah.... hence my support of learning something like C or C++ for "well-roundedness".
It's also good to be able to understand and work with pointers, since that's how the CPU works.
Bisquick boxes are a dead medium.

FatPhil
Posts: 3
Joined: Tue Feb 17, 2009 3:23 pm UTC

Re: Knowledge of C necessary for well-roundedness?

Postby FatPhil » Tue Feb 17, 2009 6:49 pm UTC

Philwelch wrote:For well-roundedness you need both C and assembly.

Well-roundedness, however, may be overrated.


For well-roundedness, you probably need lisp, Forth and VB too. And therefore your second sentence kicks in with a vengeance. There's no way I'm tainting any part of my brain with VB. Then again, if you're not actually going to exercise the wider range of programming skills that you once learnt, you will forget them. I know I'm probably useless at Forth now, and my lisp is back to newb-level. Having said that, I managed to program (proper OO, not just stricter C) C++ for the first time in about 6 years today, so one doesn't nead to exercise too often.

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: Knowledge of C necessary for well-roundedness?

Postby ash.gti » Tue Feb 17, 2009 7:25 pm UTC

FatPhil wrote:For well-roundedness, you probably need lisp, Forth and VB too.


I don't know if you can qualify VB for programming 'well-roundedness'...

I mean, I certainly don't know it and haven't ever used or even seen any dialects of Basic... But maybe I just haven't come across what it was designed for yet.

Lisp is very useful to know. I don't know Forth either so I can't really comment on that.
# drinks WAY to much espresso

Philwelch
Posts: 2904
Joined: Tue Feb 19, 2008 5:33 am UTC
Location: RIGHT BEHIND YOU

Re: Knowledge of C necessary for well-roundedness?

Postby Philwelch » Tue Feb 17, 2009 7:51 pm UTC

FatPhil wrote:
Philwelch wrote:For well-roundedness you need both C and assembly.

Well-roundedness, however, may be overrated.


For well-roundedness, you probably need lisp, Forth and VB too. And therefore your second sentence kicks in with a vengeance. There's no way I'm tainting any part of my brain with VB. Then again, if you're not actually going to exercise the wider range of programming skills that you once learnt, you will forget them. I know I'm probably useless at Forth now, and my lisp is back to newb-level. Having said that, I managed to program (proper OO, not just stricter C) C++ for the first time in about 6 years today, so one doesn't nead to exercise too often.


VB doesn't teach you anything useful: it's like COBOL or Pascal, trivia for historians of programming languages at best: at worst, knowledge for the poor saps who have to code in those languages at worst. C and assembly show you how your upper-level-language programs actually execute at the lower level. And by "both C and assembly", I should have said "C and assembly linked together", since you want to understand that

Code: Select all

foo()
{
  //do stuff
}


is equivalent to

Code: Select all

_foo:
    push bp
    mov bp, sp
    !do stuff
    pop bp
    ret


(but sometimes you don't need to do anything with the stack and base pointers, especially for assembly one-liners)
Fascism: If you're not with us you're against us.
Leftism: If you're not part of the solution you're part of the problem.

Perfection is an unattainable goal.

FatPhil
Posts: 3
Joined: Tue Feb 17, 2009 3:23 pm UTC

Re: Knowledge of C necessary for well-roundedness?

Postby FatPhil » Wed Feb 18, 2009 7:20 am UTC

Philwelch wrote:
FatPhil wrote:For well-roundedness, you probably need lisp, Forth and VB too.


VB doesn't teach you anything useful ...


Absolutely, this isn't just about paedagogy. Sometimes it's useful to have a skill not for it's paedagogical potential, but simply for its market potential. I've managed to survive with a bold indicatation that I just don't do MS Windows or anything related to it, on my CV, but in tougher times I may be forced to rethink that.

Philwelch
Posts: 2904
Joined: Tue Feb 19, 2008 5:33 am UTC
Location: RIGHT BEHIND YOU

Re: Knowledge of C necessary for well-roundedness?

Postby Philwelch » Wed Feb 18, 2009 4:01 pm UTC

FatPhil wrote:
Philwelch wrote:
FatPhil wrote:For well-roundedness, you probably need lisp, Forth and VB too.


VB doesn't teach you anything useful ...


Absolutely, this isn't just about paedagogy. Sometimes it's useful to have a skill not for it's paedagogical potential, but simply for its market potential. I've managed to survive with a bold indicatation that I just don't do MS Windows or anything related to it, on my CV, but in tougher times I may be forced to rethink that.


Yes, but VB isn't going to get you any jobs you actually want unless you're an MIS major.
Fascism: If you're not with us you're against us.
Leftism: If you're not part of the solution you're part of the problem.

Perfection is an unattainable goal.


Return to “Religious Wars”

Who is online

Users browsing this forum: No registered users and 4 guests