Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Languages a programmer should know
Index -> General Programming
Goto page Previous  1, 2, 3, 4  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mirhagk




PostPosted: Thu Aug 16, 2012 6:41 am   Post subject: RE:Languages a programmer should know

Haskell's alreday in there, and actually so is C. I need to rewrite this to include reasoning behind all of the languages, which I'm in the process of doing. Afterwards would a mod be able to update this?
Sponsor
Sponsor
Sponsor
sponsor
btiffin




PostPosted: Mon Aug 27, 2012 3:12 am   Post subject: Re: RE:Languages a programmer should know

mirhagk @ Tue Aug 14, 2012 2:01 pm wrote:
Yeah actually that's true wtd. It's not something that you should really be using, but it's good to see why most people prefer OOP or functional programming.


Given that I take the above statement as a reference to C. I protest. Wink

Umm, NOT REALLY BE USING???

Know C, it is the root source of almost all internet generation programming tools. Almost ALL.

Know C, at least to be able to read it. Do, there is no try.
mirhagk




PostPosted: Mon Aug 27, 2012 7:25 am   Post subject: RE:Languages a programmer should know

Your first point it being the root of all most modern programming languages is correct, which is why I agree you should learn it a little. But you really shouldn't be using C in any actual applications, if you're going that low level, might as well go all the way to assembly, otherwise stay with languages that encourage developer productivity. If your system absolutely needs every clock cycle, and you need C level control over it, you might as well take assembly level control and get that much more control over it. There are AMAZING tricks that can be done with assembly, it's just that the performance increase usually doesn't even matter.
Insectoid




PostPosted: Mon Aug 27, 2012 8:02 am   Post subject: RE:Languages a programmer should know

But there's a lot of great stuff available for C! You can still write games in it pretty easily, especially coming from Turing. Maintaining cross-platform compatibility is straightforward as long as you use cross-platform libraries. Of course, these libraries won't be as optimized as the equivalent platform-dependant libraries so you'll take a speed hit.

Linux is still written in C too, isn't it? Or did they just switch to C++? I don't remember if I read that somewhere or not.
mirhagk




PostPosted: Mon Aug 27, 2012 8:51 am   Post subject: RE:Languages a programmer should know

Yeah you can also write games in assembly if you really want. (roller coaster tycoon 1 was written in 98% assembly). Doesn't mean you should lol.
DemonWasp




PostPosted: Mon Aug 27, 2012 11:46 am   Post subject: RE:Languages a programmer should know

Linux is written in a whole lot of things. The kernel is entirely C (no C++ allowed). The stuff that sits on top of the kernel (including all the programs you run, the desktop environment, etc) are written in whatever. Most of them are C++, Python, Perl, Tck, C#, Java, etc; C++ and Python are probably the two most common ones.
mirhagk




PostPosted: Mon Aug 27, 2012 12:03 pm   Post subject: RE:Languages a programmer should know

It makes sense that the linux kernel is in C. There's no sense trying to upgrade something to a new language and break compatibility as well alienate programmers who are masters in C.
btiffin




PostPosted: Thu Aug 30, 2012 9:42 am   Post subject: Re: Languages a programmer should know

Quote:
But you really shouldn't be using C in any actual applications, if you're going that low level, might as well go all the way to assembly, otherwise stay with languages that encourage developer productivity.


old guy rant
Umm.

As a GNU/Linux developer I'll reiterate that C is the thing. THE thing. If you can wield C you are rarely going to get lost in the age of internet computing.

As a caveat; as a superset of C, learning C++ means C code won't look overly foreign.

C will be around for a very long time and is well worth the time spent, if only to be in a position to explore the vast world of open source projects.

I completely disagree with the statement "shouldn't be using C in any actual application".

One more caveat. The software development field is vast, wide and moving. You could very well make a life long career programming in Prolog and never set foot in C land. Maybe a career moving a virtual turtle pen around in Logo, but knowing C and being able to develop with the C application binary interface can't hurt.

Cheers
Sponsor
Sponsor
Sponsor
sponsor
mirhagk




PostPosted: Thu Aug 30, 2012 11:46 am   Post subject: RE:Languages a programmer should know

Exactly, since C++ is a superset of C, you should use C++ in any application that you might use C, unless it's legacy code, or a legacy platform. OOP provides a way to make much cleaner and more manageable code, and you can always write a function as C code if you want speed in a couple critical sections of your application.
DemonWasp




PostPosted: Thu Aug 30, 2012 12:48 pm   Post subject: RE:Languages a programmer should know

There are a lot of valid reasons to avoid using C++ when you really just want to use C. Linus Torvalds covers a lot of them in detail in his rants, so I'll just go over the ones I remember briefly:
- no operator overloading (what does foo += 5 mean? is it the same as foo = foo + 5? In C you can always answer that, in C++ you have to know implementation details)
- no inheritance (and with it, no multiple inheritance, no 'hiding', less complexity in general)
- no templates (helps a LOT with compilation times, compiler error messages)

Basically, all the reasons boil down to: no magic. Say what you mean, mean what you say: code does what it says.

Remember that C isn't any faster than C++ in general. There are some specific cases where C++ code compiles into a faster executable (there was a pretty famous one about an object-oriented sort being faster than invoking a function pointer).

The results seem to be pretty good: the Linux kernel is the one piece of software I can't recall ever crashing on me (personal experience; I'm sure people have seen a few kernel panics).
btiffin




PostPosted: Thu Aug 30, 2012 4:00 pm   Post subject: RE:Languages a programmer should know

Ditto demonWasp.

mirhagk; It's mostly meaningless (scientifically) but interesting none the less, so you might like to check out

http://hammerprinciple.com/therighttool

That site will let you compare languages from a variety of (personal opinion) angles. COBOL, one of my favourites, and the one I spend most of my volunteer time on nowadays, scores very poorly on personal opinion but still manages to run the world's banks. Go figure.

Cheers
mirhagk




PostPosted: Thu Aug 30, 2012 4:16 pm   Post subject: RE:Languages a programmer should know

Basically the reasons to use C over C++ is that C has less features? May be a valid reason still, but it also means you have no ability to take advantage of those features. And I think most of those problems could be solved by having a consitent design principle, and clear documentation, something that can done very well, and easily with an IDE that supports something like VS's XML documentation. Don't know what something is going to do, just look at the popup
2goto1




PostPosted: Fri Aug 31, 2012 2:26 pm   Post subject: RE:Languages a programmer should know

A list of languages will differ depending on the framing of the question, i.e. job marketability, programmer productivity, etc.
wtd




PostPosted: Tue Sep 04, 2012 1:53 am   Post subject: RE:Languages a programmer should know

C has the advantage that because there are relatively few features to the language there is A) less of a learning curve to the language itself, and B) fewer debates about the best approach to any given problem.

Now, this can be a disadvantage when one loses out on a great solution to a problem because it just isn't possible.

However, C's advantages can outweigh the disadvantages when one considers that 90% of ay large software project is not coding, but rather communication between the people working on it.

And as a final thought on the subject, the debate is somewhat silly since it does not happen in a vacuum. There certainly are languages which balance the power/simplicity formula better than either C or C++.
mirhagk




PostPosted: Tue Sep 04, 2012 9:54 am   Post subject: RE:Languages a programmer should know

C has less of a learning curve than other languages? I hope you mean only in the context as a 2nd language and not in the context of learning programming, because C would be a terrible choice for learning programming, something like python, pascal, C#, Java, Small Basic or nearly anything else would be a better first language.

I would argue that 90% of any large software project is not the communication between people working on it, but rather the breakdown would look more like this:

15% - Communication of specs and point of project
5% - Creating core framework
15% - Adding functionality to existing project
15% - Testing project
25% - Debugging project
25% - Trying to understand the code that someone else wrote who no longer works there

Understanding the code is probably the most important thing, and other languages that are clearly defined and have specific features for each purpose, even if each feature must be google searched is a lot easier to learn than the convoluted way that people write C code. OOP was invented because it produces cleaner code, sure there's more features to google, but that means there's clear documentation on the features rather than custom rolled code that would fulfill the same purpose.

One VERY important rule to remember in programming is that it's easier to learn a new library or framework than it is to learn what someone is doing with some code. The less code, and the more libraries you can use, the better it will be for others trying to understand it , because libraries (at least good ones) are clearly documented, have entire forums devoted to them, and have lots of support, while custom rolled code is left on it's own.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 4  [ 47 Posts ]
Goto page Previous  1, 2, 3, 4  Next
Jump to:   


Style:  
Search: