Talk:C++

From Wikiversity
Jump to navigation Jump to search

Choice of topics for lessons[edit source]

You have a lesson dedicated to multithreading, for which there is no consistent cross-platform standard (yet), but nothing on C++ templates (arguably C++'s biggest feature) or the STL? Apart from piping cin/cout examples, it looks like you're teaching "C with Classes" rather than modern C++. Please forgive my bluntness, this is a wonderful resource, and I am a fanatical programmer :) 153.111.226.201 03:21, 7 February 2007 (UTC)[reply]

I haven't reviewed the lesson contents, but do remember this is a wiki, and it's everyone's job to help improve. If there is a lesson missing, just add a placeholder like so: [[Lesson Name]]. Don't feel shy, a small edit can spur someone else into action. Historybuff 06:08, 7 February 2007 (UTC)[reply]

Not to cut in, but I don't think that there is any course material that covers the topics of pointers, constructors, destructors, etc. I'm not sure how you guys want to introduce that, but it could probably fall in the 'data structures' heading. Hampshire2004 11:06, 24 May 2007 (UTC)[reply]


I agree with Hampshire. I believe that a lesson demonstrating use of Pointers and References is required as they are fundamental to C++ programming and for people using this resource since they will no doubt encounter them when using third-party code. Also need some examples of inheritance and possibly briefly covering structs even though they resemble classes almost identically. 64ByteKiller 13:27, 9 April 2009 (UTC)[reply]

using visual c++ is _NOT_ a must for serious developping[edit source]

Although it might have been for some time some years ago for Windows development, Visual Studio is not the only serious C++ development tool. Many huge and extremely popular projects are developed with other tools.

Try wxDev-C++ it's a lot like vs c++ --203.59.87.196 10:28, 27 April 2007 (UTC)[reply]


For Windoze, Visual C++ or Dev-C++ is the best IDE to use to learn C++.

  • Keyword "LEARN!!!"

GUI programming in C++ comes much much later, and on top of that not very many people use wxWidgets. 24.174.116.158 06:14, 24 February 2008 (UTC)[reply]

There is a branch of Dev-C++ that's still under active development and I want to reccomend it over Bloodshed because of the many known bugs in Bloodshed that will never be fixed because the developer stopped maintaining it, you can find Orwell Dev-C++ here. Zenware (discusscontribs) 03:54, 17 May 2013 (UTC)[reply]

Template Lesson Added[edit source]

I've recently written a new lesson about templates, which is still under maintenance, please check it out for feedback. - Vitor 07:58, 16 August 2007 (UTC)[reply]

I am writing a new lesson on references and pointers. This is my first lesson and I have not merged it with the other lessons unless all contributors are in agreement. Please feel free to contribute to this lesson and provide me with feedback. 64ByteKiller 14:29, 9 April 2009 (UTC)[reply]

Pros & Cons[edit source]

"Does not come with a ready-made "library" of useful code, and so requires a vast amount of effort to create a relatively simple GUI program, for example"

That's just total bull. First off, the standard library that "comes with" C++ is INCREDIBLY useful! Much can be learned, in the way of design, from its implementation. Second of all, even though C++ doesn't "come with" a GUI library there are many that are available and each meets the needs of a different kind of developer. There is no vast amount of effort required to create a simple GUI program, unless you consider typing "C++ GUI library" into Google incredibly difficult. Furthermore, there's a library for almost every need out there. See boost, Blitz, etc...

Whoever wrote this section of this article, or department front page or whatever, seems to be very biased against the language and maybe doesn't actually know a whole lot about it. There are a gazillion C++ GUI libraries; even more if you add the C libraries, which you can.

A better section might be:

There are pros and cons to every language. Different developers consider different things to be a pro or a con. It is much a matter of taste. This is why you'll see some of the following listed as both a pro and a con.

PRO:

  • no garbage collection - objects are known to be deleted at a specific time. This is known as deterministic deletion and can be used to clean up any resource through the use of RAII objects.
  • static typing - this can provide strength and safety by refusing to compile when types do not match. Static typing can be extended through template meta-programming.
  • multi-paradigm - many people consider C++ to be object oriented but it is actually a multi-paradigm language. Paradigms offered include: modular, object oriented, and generic (other languages offering generic programming include Haskel).
  • template metaprogramming - seems to be unique to C++.
  • the standard library is incredibly powerful, extensible, and illustrates what many consider top-notch design choices. Many problems normally solved by a loop con be expressed in a single line of code.
  • boost - a peer reviewed library that is free to download and extends the language to be even more powerful and expressive. Commonly used libraries in boost include the smart pointers, more powerful binders, and the function library. The combination of these tools greatly simplifies code and increases developer productivity.
  • very expressive.
  • large supplies of libraries and other code chunks for downloading.
  • A compiler for every OS.

CONS:

  • no garbage collection - this can introduce memory leaks because of programmer error. Tracking pointers can be difficult. Use of RAII and smart pointer templates can greatly reduce this as a con but many feel it still is.
  • static typing - The interaction between dynamic, run-time overloading and static name resolution and typing can be confusing.
  • multi-paradigm - many developers feel that the only valid paradigm to work in is OO. Since C++ offers much more than this some object to the language and the freedom it allows. Other languages force a style upon the developer and in some teams this is considered good.
  • templates can be confusing. There are some basic rules that can be learned to make understanding templates very easy, but learning those rules can be difficult and are based on semantic details difficult to grasp for a beginner.
  • no do-it-all library - C++ comes with a standard library that includes many basic algorithms and generic interfaces but provides nothing to do GUI work or scientific programming for two examples. There are many libraries that do offer these things, and specific to specific needs, but many feel this is a con since other languages offer GUI frameworks in their standard libraries. These things would make no sense in a C++ standard library.
  • The syntax of the language is incredibly complex. Unless you're writing a parser this isn't a direct problem but it is still a problem since writing a parser that parses C++ correctly is incredibly difficult and so most compilers have many bugs in them. It's not often that you run into such a bug but when you do it can be a show stopper.
  • NOT very popular in the marketplace. C++ is considered by many to be a "legacy" language and many managers attempt to port C++ code to other languages, such as Java or C#, for many reasons both good and bad. Not many new jobs become available that require C++ development (even if it is listed as a requirement in the description). Other languages, such as Java or C#, are more popular in the marketplace and employment is likewise more readily available if you know such languages. There is much code written in C++ but many employers consider it "legacy" code base that is left alone or ported to some other language, with a few C++ developers hired to maintain it or help understand it for porting.

The material under lessons seems very unnecessary.[edit source]

First, it's available in much greater depth and detail at wikibooks already: C++ Programming/TOC1. It just doesn't make sense to replicate it if it's all just text that's going to be read. It would make much more sense if the lessons consisted of reading assignments, decomposing program source code and programming assignments. --V2os 00:49, 14 November 2008 (UTC)[reply]

Redoing lessons[edit source]

As stated before, they are replications of work that should be focused in wikibooks. I'm going through them and changing it to the format of:

Reading assignments
Program source code decomposition
Programming Assignments

Since the work is replicated and not nearly as complete as the wikibooks reference I will be deleting a lot of it, mainly since the history indicates there is no primary editor of this section. (wikiversity was started for hands on stuff, keep the major reading on wikibooks is my opinion.)--V2os 03:00, 14 November 2008 (UTC)[reply]


I agree with you V2os. Perhaps we should highlight in the introduction that this is a learning tool designed to help the reader use what they have learnt from wikibooks and other sources. Perhaps we should be writing the lessons with an end goal or end project in mind? i.e. rather than having lessons with small, individual applications each lesson contains subsections of code that by the end of the lessons forms one or two larger programs that shows the use of many of C++ features?

Reason I suggest this is that it helps the user to keep their focus on one particular path with an end goal in mind. Then, as additional exercises, each lesson could suggest possible assignments for the reader to try themselves so that they are not forced to just create code for one or two programs continuously developed through each lesson.

64ByteKiller 09:12, 16 April 2009 (UTC)[reply]

Examples[edit source]

I have started this site: http://programmingexamples.net Feel free to draw from it when writing lessons. Daviddoria 14:16, 23 June 2010 (UTC)[reply]

Enrollment List[edit source]

The enrollment list is getting long (and probably outdated). I think it probably should be moved to its own seperate page and then referenced from the main page instead of its current layout. --Travis Northrup 22:00, 8 December 2010 (UTC)[reply]