C++ as first language

Just in case you might want to try Haskell. It's a purely functional language, very different from all this C/Java/every other mainstream language crap. It has an extremely good book online, too: Learn You a Haskell for Great Good! - Chapters

If you feel like it, have a try. It will not make you better programmer in other languages (just kidding, it will), but it's much fun and I think educational. And nothing's preventing you from having a cup of Haskell every now and then while learning something more mainstream primarily.
Most functional languages are pretty much equivalent in their basic ideas, and with a general enough language one can construct any modern functional (or even procedural) language. The original paper on LISP is excellent. Everyone should read it.

The entire history of LISP is hilarious. It was created as a mathematical tool by McCarthy, an example that with a few operators and functional notation, you can create a turing-complete language to describe algorithms; completely theoretical. Russell then realized "oh hey, I can code eval in assembly" and voila, LISP interpreter was born. Fundamentally, though, computers are "procedural". LISP is not as powerful/abstract as pure assembly, but it divorces you from limitations in most procedural high level languages and teaches you that the structure of your language is just as important as anything else, that ideology of how to write programs is invaluable.

Reading SICP isn't a bad step.
 
Don't learn C# until you've done the following:

1. Learned C (and written code in it, read K&R and read some OSS code, write something, write a basic compiler/interpreter, get your hands dirty in linux programming messing with file descriptors, etc).
2. Learned a functional or a functional-like language to broaden your understanding of how the structure of a program can simplify a problem and make code more readable and maintainable (not C++/C#/Java, that will ruin you for life at this point).
3. Learned at least the basics of x86, played with olly/ida, done some keygenmes, crackmes, and understand the basics of how operating systems running on x86 processors work (there's a lot more here).
4. Learned COM and enough about the win32 api to understand how to use it (perhaps read the nt internals book).

And most importantly, when you are ready to learn C#, learn about the .NET framework, its internals, and IL at the same time.

The point of all of this is to completely divorce you from the concept that knowing & using a programming language = programming. It's so you understand that C# is just a language that MSVC will compile for you into IL and run within the .NET framework to do all of the stuff you learned how to do before. This makes it easier for you, it makes it less likely that you'll make an error (this is good for development), and so on and so forth.

I bet you didn't do all that. Anyway C# is only similar to C++ by syntax, I'd recommend that you learn something easy(such as C#) and move on down to a lower level each new language. For example PHP(scripting)->C#(compiled into il, il compiled on runtime)->c/c++(compiled into native code - when not using .net) ~ assembly(good for debugging, private server development, optimization(knowing what your C++ code will compile to before it compiles), etc)
 
I would NEVER learn C# to move to C++.

memory managent is VEEERY different from C# to C++.

When you set a buffer in c#, it is set to null by default, while in C++, when using structs etc, you have to ZeroMemory(&pointer,sizeof(pointer)) it.
This is just the minor problem. there are several other things that in C# for example is default, while in C++ you have to do it all by yourself, specially memory management.
(I know what I'm talking about, since I know/use C# for almost 3~4years)

So, if you want to learn C++, go directly to C++.

Learning a easiest language just to move to C++ because it is more difficult is just lazyness. In c# you dont know for sure how things are done, since .net frame does all the dirty work. in c++ you have to be smart, you will have to do the wokr by yourself. thats why pple that love C++ dont usually move to .net languages because, in a certain way, they dont "know" what they're doing.

There is no such a thing like a difficult language.
 
Last edited:
I bet you didn't do all that. Anyway C# is only similar to C++ by syntax, I'd recommend that you learn something easy(such as C#) and move on down to a lower level each new language. For example PHP(scripting)->C#(compiled into il, il compiled on runtime)->c/c++(compiled into native code - when not using .net) ~ assembly(good for debugging, private server development, optimization(knowing what your C++ code will compile to before it compiles), etc)

Thank you for the Explanation but well I don't really like website programming (such as html/php) although I'll end up learning them someday but I am more into C/C++, I don't know why but I really like the way it written and the way you doing things there.
I heard from some people that Assembly help a lot to understand the C language, but I don't know how to learn that and how its work.

I would NEVER learn C# to move to C++.

memory managent is VEEERY different from C# to C++.

When you set a buffer in c#, it is set to null by default, while in C++, when using structs etc, you have to ZeroMemory(&pointer,sizeof(pointer)) it.
This is just the minor problem. there are several other things that in C# for example is default, while in C++ you have to do it all by yourself, specially memory management.
(I know what I'm talking about, since I know/use C# for almost 3~4years)

So, if you want to learn C++, go directly to C++.

Learning a easiest language just to move to C++ because it is more difficult is just lazyness. In c# you dont know for sure how things are done, since .net frame does all the dirty work. in c++ you have to be smart, you will have to do the wokr by yourself. thats why pple that love C++ dont usually move to .net languages because, in a certain way, they dont "know" what they're doing.

There is no such a thing like a difficult language.

I think I'll start with C first and then go to C++ so it would be easier to understand, I have seen in sources that there is use of both C (like strings,output/input such as strcpy,printf,scanf) and some of C++ and thats why I think it would be better to start off C and then go to C++ :).
 
Something I believe no one else mentioned, and is something you should most certainly consider is: learn the logic behind programming first.

If you're going to be taking programming seriously this is most certainly the way to go. You'll learn what the business field is looking for. Some of those things are: writing pseudocode (developing the logic beforehand), logic flow-charts, understanding of arithmetic operators, variable naming standards, modularization, understanding of AND, OR, XOR, loop structures, arrays, and the handling of open files within the program.

A book that teaches all of the above: Amazon.com: Programming Logic and Design, Introductory (9781423901952): Joyce Farrell: Books@@AMEPARAM@@http://ecx.images-amazon.com/images/I/41zu9oW9fXL.@@AMEPARAM@@41zu9oW9fXL .

If you first learn the logic and design behind programming, you'll find it much easier to learn any programming language you want. After learning the logic and design, all that's left to learn is the syntax and the syntax is very easy to grasp. Once you've learned one program language and fully understand the behind-the-scenes, you'll find it easy learning another ten programming languages.

If you would like to dive into a programming language while learning the logic and design behind programming, then I would recommend a very basic language. Though it won't help you in the industry or designing any games, it'll give you the grasp you need on programming. One language that I would suggest for such a start would be something like FreeBASIC.
 
My suggestion is to learn a low level language first (such as assembly). that way, it'll be easier to learn higher level languages.

People these days consider C as a low level programming language too, so do you can learn that as a first option as well
 
ASM may be different from C/C++ but its help to understand how C/C++ works,knowing what your C++ code will compile to before it compiles like KrYpT0n said. Its more for understand what you codding than learn how to code which is kinda nice I think. Well I don't know if its true or not, but that's what I've understand.I don't really know how to learn ASM, I checked a lot of guides most of them explain it completely different and it kinda confused me.

Uhm do you guys know some good tutorials for C,C++,ASM ?
 
you dont need to learn asm to learn c++, FFS.

I know, well I'll just start with C/C++ basic then move to ASM and then back to C/C++ to the advanced parts. It won't help me learn C++ but it will help me later when I get debug errors and some other **** well in general understanding the codes(C/C++) and understand what they actually does when you compile them (ASM).
 
lol?

assembly is very different from C++. I would not learn asm just to learn c++.
it just doesnt make any sense to me.

I don't even...

Do you learn the alphabet to learn English because it's similar to English words? No, you learn it because English words are made up of the letters in the English alphabet. You could also think of it as why it's easier to learn English/Spanish/French after learning Latin.


ASM may be different from C/C++ but its help to understand how C/C++ works,knowing what your C++ code will compile to before it compiles like KrYpT0n said.

QFT
 
I don't even...

Do you learn the alphabet to learn English because it's similar to English words? No, you learn it because English words are made up of the letters in the English alphabet. You could also think of it as why it's easier to learn English/Spanish/French after learning Latin.




QFT
assembly was one of the lastest languages I learned. after C++ indeed.
it did not make any difference to me.
 
assembly was one of the lastest languages I learned. after C++ indeed.
it did not make any difference to me.

You probably "learned" C++ without fully understanding how the asm instructions are processed by the machine, which would have helped form your coding practices better. It's not really important if you're coding small apps like cmdline tools etc, but when coding a large application that has high performance requirements, it's important to understand how the machine reads the code so you can conserve clock cycles and reduce excessive memory allocation.

I would say that if you ever plan to code something large and performance intensive, you should learn ASM first. You can learn ASM after, but then you probably will need to reform your practices afterwards which wastes time.

If you want to code small apps only, I would say start with C/C++ to learn some basics then go into C# after. C# is a powerful language, but it was never built to compete with C/C++ in performance.
 
lol?

assembly is very different from C++. I would not learn asm just to learn c++.
it just doesnt make any sense to me.

I wouldn't consider it understanding if you are just trying to learn a language, i consider it 'memorizing' because you aren't really learning the language, you are simply just memorizing certain things, blinded by the underlying code.

Like jMerlin said,
The point of all of this is to completely divorce you from the concept that knowing & using a programming language = programming.
 
I don't even...

Do you learn the alphabet to learn English because it's similar to English words? No, you learn it because English words are made up of the letters in the English alphabet. You could also think of it as why it's easier to learn English/Spanish/French after learning Latin.




QFT

ASM is like learning the alphabet, yes. Using a high level language is like teaching you how to talk.

Who learns their ABCs before they learn to speak any words?

Python3 code:
Code:
# Hello World for Python 3000

print("Hello, World!")
vs
Code:
	;; Hello World for the nasm Assembler (Linux)
	
	SECTION .data

	msg	db	"Hello, world!",0xa ; 
	len	equ     $ - msg

	SECTION .text
	global main

main:
        mov     eax,4		; write system call
        mov     ebx,1           ; file (stdou)
        mov     ecx,msg         ; string
        mov     edx,len         ; strlen
	int     0x80		; call kernel

	mov	eax,1		; exit system call
        mov     ebx,0      
        int     0x80		; call kernel

.. or ..

Code:
; Hello World for Intel Assembler (MSDOS)

mov ax,cs
mov ds,ax
mov ah,9
mov dx, offset Hello
int 21h
xor ax,ax
int 21h

Hello:
  db "Hello World!",13,10,"$"

.. or maybe..
Code:
; Hello world in Assembler for the Win32 architecture

TITLE Hello world in win32. Tasm

VERSION T310
Model use32 Flat,StdCall

start_code segment byte public 'code' use32
begin:
 Call MessageBox, 0, offset sHallo, offset caption, 0
 Call ExitProcess, 0
start_code Ends

start_data segment byte public 'data' use32

sHallo  db 'Hello world',0
caption	db "Hi",0

start_data Ends
End begin
 
I don't see what's wrong in directly learning C++? I mean, as long as you know how C++ works and why it works, the commands you'll be giving will work fine, it's all about logic really.
If you just simply disagree with me, the best advice I could give you is at least learn C to understand basics then you can begin OOP with C++, learning a language is not a big deal, and let's be honest coding in the Flyff source do not require professional programming knowledge so you'll just JUST FINE.
 
Back