Is c++ just syntex?

Pages: 12
hi at my robotics club i had an argument with a friend of mine.I asked him if he knew c++...he said no...i asked do you want to learn it and he said theirs no need to learn a second programming languages because its all just syntex and at the end of the day they turn into ones and zeros.(he programs in python) is this true?? is it just syntex??
Before anybody else responds, I'd like to point out that the person who said this to learningtocode14 is probably just a kid.

Anyways no, it is not just syntax.
If you learn one programming, then the CONCEPTS of that language you can apply to any other languages, and ultimately, it does boil down to syntax. However, every language has its own set of unique tips/tricks and that is why there are a plethora of languages.

At the end of the day, it comes down to application. Certain languages are better for certain tasks than others. Right now, I'm programming in PHP for a web-application but the concepts I learned while programming in C++ (data structures for example), i'm applying to PHP.

All languages will give you loops, if-else statements, and other constructs that are fundamental for programming. Where changes might occur might be with memory allocation, if the language is interpreted or compiled, pointers, etc.
Python is an interpreted language. It doesn't "turn into ones and zeroes" nearly as directly as a language like C, C++, C#, compiled Perl, JIT-ed Java, any Assembly, or Objective-C does. Sorry. :)

All languages will give you loops, if-else statements

What about certain non Turing-complete declarative languages? Hmm? >_>

-Albatross
Last edited on
ur friend is dead wrong syntax is not 1's and 0's. that is what you are compiling it into. syntax dictates the proper way to write a program and while they are usually similar they are not the same
A language is composed of syntax, semantics, and pragmatics.

The syntax is the most obvious part of a language, but also the least important. It's the definition of which character strings are valid programs in the language and which aren't. For example, "a=b" can appear in a C++ program given the right conditions, but "a===b" can't.

The semantics define the meaning of a character string, possibly depending on the context in which it appears. For example, in the BASIC strings
 
a=b
and
 
IF a=b THEN
the "a=b" substrings take on the meanings of assignment and comparison.
The semantics of a language is what gives it expressive power and what places the language in one paradigm or another.

The pragmatics are implementation details, pertaining mostly to how a program is translated to executable code (compiled? JIT compiled? Ran on a VM? Interpreted? Interpreted in hardware?). It's technically not part of a language definition because any compiled language can be interpreted and vice versa, but some languages have only one implementation or are implemented almost exclusively in one way.
The pragmatics of a language often, but not always, determine what a language is suitable for. The semantics also are a major factor, though. On the other hand, the syntax is only a matter of convenience.

Anyway, that's just the theory. The proper answer to
its all just syntex and at the end of the day they turn into ones and zeros.
is "program in Malbolge, then".
The three components above interact to make a language more or less appropriate to a given task. Just because you could use Python for absolutely everything (Turing-completeness is a property of most programming languages. A program written in one Turing-complete language has at least one equivalent program in another Turing-complete language) doesn't mean you should.
no need to learn a second programming languages because its all just syntex and at the end of the day they turn into ones and zeros.


The conclusion (underlined) is wrong even though the hypothesis is correct.
Everything is 1 and 0 inside a regular modern computer.

The purpose of a programming language is to make it easier for the user to tell the computer what to do.
Some languages are better than others for certain projects.
C++ has a big fan base because it's supposed to be good for everything.
Catfish wrote:
C++ has a big fan base because it's supposed to be good for everything.

Last I checked I could not pour my self a cup of coffee by programming in C++. I guess that's one of those things it falls short on :D
what if you made a bot arm that moved a cup to under the pot that was preset and had another bot that allocated the amount of beans being put in and a belt that carried it to the table? overkill but it works
Could I make the bot with C++?
Yep. Usually it is done with C, but it should be no different with C++ (it should actually be easier). The only problem would be finding a compiler for the job...
yeah, would be very hard but you can do it
No I mean, can I physically manifest a bot arm using C++?
Program a robot in C++ to build the arm.

-Albatross
even better
I want someone to invent a printer that can print real-life objects. There are already 3D printers but you can't print food with them (well you can, but you can't eat it).
So.. Like a Star Trek: TNG style synthesizer?
@chrisname you mean like atom-by-atom assemblers? Jeez, they'd have to remember the locations of the electrons even! And they'd have to keep all the atoms in a suspended state until it finished! Can you imagine!?
Yeah it should be atom-by-atom.

All you'd need are protons, electrons and a lot of energy. To make any element all you have to do is get the correct number of protons, add extra protons so that some of them become neutrons, and then add the electrons. I don't know how you'd get them to stay together but if it was possible you'd be able to make any object you wanted.
more than that, it is as of right now impossible to make electrons stop. The British are close, but haven't yet done it.
Pages: 12