views:

1968

answers:

19

I have been developing for about 8 years, and mainly come from a Web Background. I have extensively used the .Net Framework for development the last 5 odd years, including Web, Windows and Mobile. I have a good understanding of C# and VB, VB.Net

I am thinking of learning a new language, and based on the interest I have understanding how things work, I have been looking at C, C++ or Delphi. I would also like to know where there is a good online resource to get me started, preferably in the form of a tutorial or something similar?

A: 

Learning C will provide the most benefit as it is the closest to the machine.

Martin OConnor
A: 

Subjective question, but here goes.

Learn C and Python. C++ is not so friendly to other languages (in terms of binding to it) as C, and Python is way bigger a community then Delphi.

Florian Bösch
+1  A: 

I'd suggest diving into C first. I personally wouldn't bother with Delphi, it's a nice implementation but there's not as much to be gained from it as from C.

C++ is an "OO" bolt-on to C, and it would probably be easier to start with C if what you are looking for is a basic understanding of lower level programming, pointers and memory management, etc.

Guy Starbuck
+4  A: 

Learn:

  • C, then C++. It's like Latin, everything comes from these.
  • Python or Ruby. These are very practical, easy and fun. Ruby is my side projects language.
  • C# or Java. These are not quite as practical, but more entrenched and faster. Java is my at-work language.
  • Brainfuck, if you just can't get enough :)
Kevin Conner
+9000 for brainfuck. Favorite language, hands down.
Chris Lutz
A: 

I would start with C, but not stop there. I would try to learn some basic things about C++ too and then learn some more about Delphi.

C gives you a nice way of understanding programming at a basic level and Delphi is nice because it lets you build standalone GUI programs that don't need a framework to run (I also don't like the syntax and the editor very much, but that might be just a matter of taste).

I'd also learn some scripting language like Python or Perl.

rslite
+1  A: 

(shudder)

C/C++ is sort of a must, but in fact, it would just be a pain in the *** to learn after developing in C# & .NET. You might want to play with pointers a bit for the curiosity or if you want to switch to hardcore realtime development, but otherwise, I wouldn't.

If you're intent on learning a new language, I would go for something less painful, like maybe LISP or Prolog (I think the educational benefits of these are probably greater than of learning C)

ripper234
A: 

Delphi is slowly phasing out of mainstream. Sure, there is a lot of software to maintain, but new software is rarely written in Delphi. Delphi keeps you on the Windows platform only. There are open source implementations like Lazarus + Free Pascal, but they are nowhere near Delphi in terms of stability. The VCL is not even fully implemented.

IMHO it is better to learn C before you learn C++. C++ is a superset of C (although not strict) but OOP is not the same as procedural programming. In my opinion you need to know both well, and learning OOP before procedural programming can lead to bad programming practices, while learning OOP after procedural programming usually leads to more productive programmers.

Terminus
Terminus, I'd make this a community wiki as this appears that this is somewhat controversial.
Arafangion
+11  A: 

It depends what you want to do.
If you need to be able to develop quickly and efficiently strong, reliable native application try Delphi.
As a bonus, you'll find a lot of similarities with C#, except the Pascal (begin end) syntax instead of the C-like one (curly braces). And the learning curve will be so much easier....

François
+1  A: 

How about D. It's much like C++ except it has got proper garbage collection, which can make your life so much easier.

Oh, and the general mantra is: learn to learn new languages. Once you learn one or two programming languages in a relatively short time, you'll find it's so much easier to learn a third one.

bart
+2  A: 

If you are planning on taking any college courses, you'll end up learning C. Learning C is more than just learning a programming language. Part and parcel of being a successful C programmer is having a feel for how computers work (the stack, the heap, pointers, memory allocation, types of parameter passing, etc.).

Besides, the K&R book is just a great work. I've never read such a succinct, useful, or handy book since. I find myself referring to it all the time.

twopoint718
A: 

If you're thinking to learn a language just for the sake of it, go for C++. It will keep you busy for months/years. If/When you get bored by C++, learn Ruby. It takes just a couple of days to become familiar with it and it's incredibly fun.

radu_c
+25  A: 
gabr
But 64-bit should be coming in the next version!!
lkessler
I'm counting on that.
gabr
The impression I got from the Delphi folks was that concurrency and improvements in the way programmers deal with threads was going to become a priority for the next version - rather than 64-bit support?
Arafangion
"delphi" is the 46th most popular tag on SO.
postfuturist
+11  A: 

This all is very subjective. But that 'c is closer to the machine' then pascal is simply not true. Pascal is a language just like c, in which you can learn using the stack, the heap, pointers, memory allocation, types of parameter passing, etc. Only the syntax is different and pascal is strongly-typed. Those are the only two differences between C and pascal.

Further there are not two different compilers for 'pascal' and 'object pascal' as you have with c and c++. Nowadays all Pascal-compilers can do both. You may mix object-oriented code with plain pascal-code, but you don't have to.

With Delphi you have pascal, object pascal, and an easy way to click the basics of your program together.

So with Delphi (or fpc/lazarus) you can do it all: learn the basics with some console-based applications. Learn the basics of object-oriented programming. And develop very quickly your win32/qt/gtk/aqua programs using the broad range of components which are available.

You can even build .NET applications, but that's not my personal favourite...

It is one tool, which you can use for all problems. (well....)

But, well, it doesn't have Microsoft's marketing machine behind it. (And that from Codegear didn't perform well, especially a few years ago...)

Loesje
+5  A: 

Delphi is not really dead, although it's going through difficult times recently. I think it's all about positioning: smaller teams and single-developers, who choose tools on they own (not forced by MS biased management) often choose Delphi. Cost of changing development foundation for small teams/single developers are much less than for larger companies.

So, if you are "one-man show", take whatever feels better for you personally (pick Delphi pick Delphi...grin), but if you plan to search for a job, it could be better to learn C/C++, although I wouldn't advise it. :) If I were you, as you are already familiar with desktop development, I would get into web (PHP, Ruby on Rails, ...). I think that learning new platform would bring you more gain than simply learning another way to do same thing.

vrad
+1  A: 

I've asked myself the same question, but due to the nature of our work .NET of Java is not an option. So that would mean C++.

However while I don't like C++, I could live with C++ as language.

However I can't live with MFC, and in general I prefer standalone binaries. And I hate even more the fact that there is no good cross platform GUI. (IOW native on all platforms)

So I continue with Delphi, with keeping a bit of Lazarus compatibility in mind, and do a small percentage crossplatform with Lazarus now and then.

Plain C is only sensible for microcontrollers. On the heavier microprocessors (the multi hundred MHz ARMs) C++ or FPC is not even an issue.

Your comment on cross-platform libraries is completely wrong IMHO - wxWidgets is the perfect way to create cross-platform applications with C++, applications that do not only look like native, but behave like native as well.
mghie
and if you don't like wxWidgets, you can always got with the very well documented, supported and powerful QT - it may not use 'native widgets', but they get drawn so they look exactly like them.
gbjbaanb
And now that Qt is LGPL, you can use that in commercial applications. Qt is IMO, much better that wxWidgets.
Zifre
The point is that the cross-platform aspirations are spinoffs. Not a carte blanche to go on a total redesign based on a portable toolkit.
Marco van de Voort
+4  A: 

Delphi pros:

  • fast compiler gives you fantastic turnaround times
  • great GUI builder
  • great readability compared to C++
  • Object Pascal is a great language: header/implementation section gives you a great overview over the code, no splitting into header and implementation files

C++ pros:

  • Availability: C++ is available on just about any platform there is
  • RAII is a great way to manage memory and ressources (btw. this possible in Delphi too, using records. Check Marco Cantu for that one).
  • Free tools: No need to spend money on C++, great tools are available for free

I'd say in the long run it's probably worth learning C++. Nowadays it's not a good idea to restrict yourself to Windows only.

(That said I still would use Delphi for a Windows Client/Server type application. It's just so much faster to get something out the door).

A: 

C++ and Delphi are not far away from what you know. You just need to learn some minor syntactic differences. There are no new concepts involved. Just to exaggerate, C++, Delphi, C#, VB.NET, Java are essentially dialects of the same language, give or take some minor details.

C is much closer to the machine. It is in some ways almost just a glorified assembler with a thin layer of abstraction. This is not bad, as you have a lot of control, and there is not much hidden "under the hood". This kind of micromanagement may actually be something new for you.

Now, to break out of this box, you could do worse than look at a language that actually goes to a higher level. Python or Ruby are on the right track. Haskell and Erlang come from totally different viewpoints. The defining feature of what I call "higher level" languages is that they allow you to express new concepts, build other concepts on them, and talk in these concepts. Lisp takes this to the extreme.

Svante
"C++ and Delphi are not far away from what you know. You just need to learn some minor syntactic differences. There are no new concepts involved." - You apparently didn't yet dive into the shallows of C++, such as template metaprogramming ;)
Moritz Beutel
You have absolutely no idea what you are talking about. Both C++ and Delphi and significantly closer to the machine than .NET or Java. C++ is much closer to C than to a properly managed language; anyone coming from a .NET background who expects proper compile-time checks, proper type safety, proper garbage collection, proper assembly metadata, and all those other modern programming language design mantras, will be sorely disappointed in C++ and Delphi.
Timwi
I don't think that's very accurate Timwi, Delphi has very strong type-safety and compile-time checks (are they not the same thing?) and the latest version, Delphi 2010, has lots of metadata in the form of run-time type information (RTTI). No garbage collection admittedly, but that's a matter of taste.
Alan Clark
+1. Perhaps a touch of hyperbole in "essentially dialects of the same language" but they're certainly from the same group. Unlike, say, PROLOG, or Smalltalk, or the Lisp languages, or Erlang, or Haskell, or ...
Frank Shearar
+2  A: 

I have programmed in Delphi, C++ and c#. Of the 3, c++ is the hardest to learn, most painful to develop in, and the most ubiquitous.

You certainly should try a non garbage collected language. Much as I love gc's, I think it is important to learn to program without one. After that, it is a matter of taste and utility.

C++ has the same syntax as C#, but delphi has a very similar 'feel' to c# due to having the same architect.

If you want to do cross platform stuff, c++ is the way to go. If you want to develop windows apps, then delphi will be faster and easier to develop in.

SeanX
A: 

Okay.

As this question is subjective and depends more only simple logics and a little bit of unknown, here is my thinking about this topic.

C is w/o any Object-Orientation and the main milestones - abstraction, virtualization, generalization, etc.

C++ and Delphi was designed and developed in the same manner. C++ took C as basis. Delphi took Win32 API as basis.

You ask - what is better? I rather ask - what has more potential! This is the right question!

The potential for Delphi has VERY VERY BIG. C++ in its recent standardization changes just takes same things and places them in other places. Google for latest changes on "Auto" ...

Why Delphi has this potential over C / C++ ?

Simple as logics are! - Microsoft already are forced to develop some software for non-WIndows ( Like *.nix OSes ). In Linux, there is software called Wine / Cedega / etc. Google ;)

Yeah, you did google and now shout that many apps does not work jet. My answer is - so what? If you develop game ( for example ) or any other commercial product, you will be forced to go to C ( as it is pretty assembler - like with shell ) to do optimizations or at least perform advanced memory management in Delphi.

In the end - don't ask clarification from me in the paragraphs you don't understand. Just google ... ;)

HX_unbanned