Click here to Skip to main content
15,888,803 members

Survey Results

What is the best starting language for a new developer?   [Edit]

Survey period: 7 Apr 2008 to 14 Apr 2008

Some developers start with scripting and move to high level languages, while other start with ASM and continue from there. What do you think is best way to start? (Suggested by Christiaan Rakowski)

OptionVotes% 
Assembler (any flavour)512.43
C30614.59
C++28713.68
C# / Java69633.17
Lisp150.71
Pascal / Modula / Delphi1266.01
Python361.72
VBScript241.14
Visual Basic26912.82
The first language will depend on what area the developer will want to work24111.49

View optional text answers (93 answers)


 
GeneralRe: Sacrilege! Pin
chaiguy13376-Apr-08 19:38
chaiguy13376-Apr-08 19:38 
GeneralRe: Sacrilege! Pin
leonej_dt6-Apr-08 20:01
leonej_dt6-Apr-08 20:01 
GeneralRe: Sacrilege! Pin
backSlashZero6-Apr-08 20:30
backSlashZero6-Apr-08 20:30 
GeneralRe: Sacrilege! Pin
chaiguy13377-Apr-08 4:15
chaiguy13377-Apr-08 4:15 
GeneralRe: Sacrilege! Pin
chaiguy13377-Apr-08 4:21
chaiguy13377-Apr-08 4:21 
GeneralRe: Sacrilege! Pin
leonej_dt7-Apr-08 4:31
leonej_dt7-Apr-08 4:31 
GeneralRe: Sacrilege! Pin
chaiguy13377-Apr-08 5:51
chaiguy13377-Apr-08 5:51 
GeneralRe: Sacrilege! Pin
leonej_dt7-Apr-08 6:24
leonej_dt7-Apr-08 6:24 
There is a BIG difference between templates and generics.

Templates works like this:

0. Programmer writes generic function/class/whatever. Example:

// this is C++
// compiler won't generate any code from this
template <class T>
class CLinkedList
{
private:
T m_tValue;
CLinkedList<T> *m_plltNext;

public:
//...
};

1. At compile time, whenever the compiler finds an instance of the template, the program replaces all instances of the template parameters with its actual values. Example:

int main()
{
// compiler will create a class called CLinkedList<int>
CLinkedList<int> lliExample;
// compiler will create ANOTHER class called CLinkedList<double>
CLinkedList<double> lldAnotehrExample;
return 0;
}

2. At run time, the program doesn't know ANYTHING about the templates. It only knows about its specific instances (the actual functions/classes/whatever).

Generics work like this:

0. Programmer writes generic function

' this is VB.NET
' in .NET, generic classes have metadata that tell the runtime that they have parameters.
Public Class LinkedList(Of T)
Private Value As T
Private NextNode As LinkedList(Of T) ' the implicit pointer... yuck!
' ...
End Class

1. At compile time, the compiler doesn't create new classes from the generic definition.

Module Test
' I don't remember very well, but I think the VB.NET equivalent of static is Shared
Public Shared Sub Main()
' compiler will generate code that tells the runtime to replace
' the generic metadata with the actual generic parameters
Dim LLOfInt As LinkedList(Of Integer), LLOfDouble As LinkedList(Of Double)
End Sub
End Module

2. At run time, the JIT/interpreter only knows about the generic class until it finds a request to create/use an instance of a specialization of the generic.

---

Are generics more powerful than templates? No. You can do this in C++:

template <class T>
class CBox
{
public:
T content;
};

int main()
{
CBox<int> a;
CBox<double> b;
a.content = 10;
b.content = 15;
b.content += a.content; // C# equivalent can't do this
}

Are generics safer? If you can't program, yes. But we're supposed to know how to program.

To those who understand, I extend my hand.
To the doubtful I demand: Take me as I am.
Not under your command, I know where I stand.
I won't change to fit yout plan. Take me as I am.

GeneralRe: Sacrilege! [modified] Pin
chaiguy13377-Apr-08 6:37
chaiguy13377-Apr-08 6:37 
GeneralRe: Sacrilege! Pin
leonej_dt7-Apr-08 7:35
leonej_dt7-Apr-08 7:35 
GeneralRe: Sacrilege! Pin
chaiguy13377-Apr-08 10:02
chaiguy13377-Apr-08 10:02 
GeneralRe: Sacrilege! Pin
leonej_dt7-Apr-08 10:43
leonej_dt7-Apr-08 10:43 
GeneralRe: Sacrilege! Pin
chaiguy13377-Apr-08 10:49
chaiguy13377-Apr-08 10:49 
GeneralRe: Sacrilege! Pin
chaiguy13379-Apr-08 17:44
chaiguy13379-Apr-08 17:44 
GeneralRe: Sacrilege! Pin
chaiguy13377-Apr-08 6:41
chaiguy13377-Apr-08 6:41 
GeneralRe: Sacrilege! Pin
chaiguy13377-Apr-08 6:47
chaiguy13377-Apr-08 6:47 
GeneralRe: Sacrilege! Pin
leonej_dt7-Apr-08 7:37
leonej_dt7-Apr-08 7:37 
GeneralRe: Sacrilege! Pin
chaiguy13377-Apr-08 7:42
chaiguy13377-Apr-08 7:42 
GeneralRe: Sacrilege! Pin
PIEBALDconsult7-Apr-08 14:00
mvePIEBALDconsult7-Apr-08 14:00 
GeneralRe: Sacrilege! Pin
chaiguy13377-Apr-08 14:11
chaiguy13377-Apr-08 14:11 
GeneralRe: Sacrilege! Pin
PIEBALDconsult7-Apr-08 14:15
mvePIEBALDconsult7-Apr-08 14:15 
AnswerRe: Sacrilege! Pin
SalarSoft6-Apr-08 19:53
SalarSoft6-Apr-08 19:53 
GeneralRe: Sacrilege! Pin
leonej_dt6-Apr-08 20:03
leonej_dt6-Apr-08 20:03 
GeneralRe: Sacrilege! Pin
gygabyte7-Apr-08 1:54
gygabyte7-Apr-08 1:54 
GeneralRe: Sacrilege! Pin
chaiguy13377-Apr-08 4:16
chaiguy13377-Apr-08 4:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.