Jump to content

i want to start programming

Prokart2000

Even though it may be the most dramatic exception, it is still syntactically C-like. Something can be the most dramatic exception and still not be that different. I quote Wikipedia not because I do not use the languages myself but because it is the simplest way of proving my point.

 

Aside from functional programming, I would argue that most languages are very C-like in syntactic nature even if they are not C-based (which we have determined Python is) because C changed the way programming worked and we haven't really had a second revolution in language design since then. You could argue that OOP was that revolution however syntax wise not a lot changed.

 

Python may exchange square brackets and curly braces for indentation, however on all other levels the syntax is still very reminiscent of C. There are several StackOverflow threads on this topic, I suggest you read them.

 

I'm surprised you disagree with this, I'm not saying it's the scripting version of C, but honestly, most programmers agree that it is directly inspired syntactically and structurally by C. 

 

You seem to use the same word to describe different things. Python and C do not have similar syntax, nor is Python's syntax C-like, period. There is not even a debate here.

Sometimes when you speak of syntax you seem to be talking about semantics.

 

I'd like to see proof that most programmers agree that Python has syntax like C's. Again, you're changing the topic a bit. We're talking about syntax, not semantics or language design itself.

If we're talking about language design then, like I said, I agree that a lot of languages are indeed "inspired" by C, in the sense that they are semantically similar and have equivalent constructs, but that doesn't make them C-like syntactically.

Want to solve problems? Check this out.

Link to comment
Share on other sites

Link to post
Share on other sites

You seem to use the same word to describe different things. Python and C do not have similar syntax, nor is Python's syntax C-like, period. There is not even a debate here.

Sometimes when you speak of syntax you seem to be talking about semantics.

 

I'd like to see proof that most programmers agree that Python has syntax like C's. Again, you're changing the topic a bit. We're talking about syntax, not semantics or language design itself.

If we're talking about language design then, like I said, I agree that a lot of languages are indeed "inspired" by C, in the sense that they are semantically similar and have equivalent constructs, but that doesn't make them C-like syntactically.

No, I'm directly referring to syntax.

 

http://stackoverflow.com/questions/3615122/how-similar-are-python-jquery-c-syntax-wise

 

Third answer:

 

"For Python and C, the answer from a high-level point of view is also very simple: Python's syntax is directly inspired by C's syntax. (Or more precisely, both Python's and C's syntax are inspired by ALGOL's syntax.) There is really only one significant difference from a high-level point of view: C uses opening and closing curly braces to delimit blocks, Python uses indentation."

 

http://mathsci.unco.edu/ClassSites/hoppercourse/CS102/S08/syntaxcompar.html

 

Pretty self explanatory. Granted it's C++ but the changes aren't really exposed here.

 

On top of my other previous sources, I'd say its pretty conclusive that Python's syntax is directly inspired by and uses much of C's syntax. I'm not saying they're identical, I believe I've reiterated on that point several times now, but to act like Python's syntax is not much derived from C is a bit strange. Again, there are major syntactical differences with the two, but they mostly lie within the indentation vs curly braces. Python was designed to be a language with as few braces as possible, however its syntax in many other respects is undoubtedly similar to C. You can talk to any programmer about this, they will agree.

"You have got to be the biggest asshole on this forum..."

-GingerbreadPK

sudo rm -rf /

Link to comment
Share on other sites

Link to post
Share on other sites

No, I'm directly referring to syntax.

 

http://stackoverflow.com/questions/3615122/how-similar-are-python-jquery-c-syntax-wise

 

Third answer:

 

"For Python and C, the answer from a high-level point of view is also very simple: Python's syntax is directly inspired by C's syntax. (Or more precisely, both Python's and C's syntax are inspired by ALGOL's syntax.) There is really only one significant difference from a high-level point of view: C uses opening and closing curly braces to delimit blocks, Python uses indentation."

 

http://mathsci.unco.edu/ClassSites/hoppercourse/CS102/S08/syntaxcompar.html

 

Pretty self explanatory. Granted it's C++ but the changes aren't really exposed here.

 

On top of my other previous sources, I'd say its pretty conclusive that Python's syntax is directly inspired by and uses much of C's syntax. I'm not saying they're identical, I believe I've reiterated on that point several times now, but to act like Python's syntax is not much derived from C is a bit strange. Again, there are major syntactical differences with the two, but they mostly lie within the indentation vs curly braces. Python was designed to be a language with as few braces as possible, however its syntax in many other respects is undoubtedly similar to C. You can talk to any programmer about this, they will agree.

 

Alright, we've stretched this discussion long enough. You clearly have one view, and I have another. I'm not sure what your background is on this topic, but I know mine is strong enough to make my own conclusions. Your "conclusive" sources are not conclusive at all when you don't understand the definition of syntax itself, and what it means in the context of language design.

Like I've been saying.. Python's syntax is not C-like. The simple fact that it has the same kind of constructs doesn't make it C-like. You're pulling a group of arguments from a topic (inspiration) to argue against a different one ("like" syntax). This is where I end this discussion (on my part). Happy coding.

Want to solve problems? Check this out.

Link to comment
Share on other sites

Link to post
Share on other sites

Alright, we've stretched this discussion long enough. You clearly have one view, and I have another. I'm not sure what your background is on this topic, but I know mine is strong enough to make my own conclusions. Your "conclusive" sources are not conclusive at all when you don't understand the definition of syntax itself, and what it means in the context of language design.

Like I've been saying.. Python's syntax is not C-like. The simple fact that it has the same kind of constructs doesn't make it C-like. You're pulling a group of arguments from a topic (inspiration) to argue against a different one ("like" syntax). This is where I end this discussion (on my part). Happy coding.

I do understand the definition of syntax myself. I think it is you here that is convinced that Python is not at the very least heavily influenced by C syntax. I've coded enough Python and enough C to know that they are syntactically very similar, I have given you syntax comparison sheets, and quotes from respected architects of the field. I'm not sure how much more you want, but when you start saying I don't understand syntax and language design it starts pissing me off. I could go onto freenode right now and find a chorus of voices that will agree with me, but I still don't think that will shake your opinions. You seem to have a sort of fanatical zeal to claiming that Python does not have C-inspired syntax, however thankfully that does not make your opinion correct.

 

I hope that this does not interfere too much with your understanding of programming, and have a nice day. 

"You have got to be the biggest asshole on this forum..."

-GingerbreadPK

sudo rm -rf /

Link to comment
Share on other sites

Link to post
Share on other sites

I do understand the definition of syntax myself. I think it is you here that is convinced that Python is not at the very least heavily influenced by C syntax. I've coded enough Python and enough C to know that they are syntactically very similar, I have given you syntax comparison sheets, and quotes from respected architects of the field. I'm not sure how much more you want, but when you start saying I don't understand syntax and language design it starts pissing me off. I could go onto freenode right now and find a chorus of voices that will agree with me, but I still don't think that will shake your opinions. You seem to have a sort of fanatical zeal to claiming that Python does not have C-inspired syntax, however thankfully that does not make your opinion correct.

 

I hope that this does not interfere too much with your understanding of programming, and have a nice day. 

 

I don't think you understand the difference between syntax and language design either. Python's syntax is very different from C's.

Link to comment
Share on other sites

Link to post
Share on other sites

I don't think you understand the difference between syntax and language design either. Python's syntax is very different from C's.

I do understand the difference. I've probably programmed in around four times as many paradigms as you have, and I've been doing Python work for the past six years alone.

 

It takes a lot of its syntax from C. There's simply no denying it, you can say I don't know what I'm talking about all you want, but at the end of the day a lot of the core syntax is taken from C. Granted, they tried to remove braces as much as possible, which is why Python has indentation instead. This is getting to be a very tired argument though, I see a lot of C in it because I've done a lot more C coding than I have Python and I'm C-biased. 

 

As long as we all know how to use the tools it doesn't matter where we see the most influence from in them, does it?

"You have got to be the biggest asshole on this forum..."

-GingerbreadPK

sudo rm -rf /

Link to comment
Share on other sites

Link to post
Share on other sites

I do understand the difference. I've probably programmed in around four times as many paradigms as you have, and I've been doing Python work for the past six years alone.

 

It takes a lot of its syntax from C. There's simply no denying it, you can say I don't know what I'm talking about all you want, but at the end of the day a lot of the core syntax is taken from C. Granted, they tried to remove braces as much as possible, which is why Python has indentation instead. This is getting to be a very tired argument though, I see a lot of C in it because I've done a lot more C coding than I have Python and I'm C-biased. 

 

As long as we all know how to use the tools it doesn't matter where we see the most influence from in them, does it?

 

You seem to have trouble deciding whether you are arguing that Python is C-inspired or C-like... the two are not the same thing.

C-inspired I would totally agree with since most modern languages are inspired heavily by C. Not all of those languages are necessarily like C, in the way that they have turned out, though. I can very much appreciate the similarities to C in Python... but I disagree that it, the syntax specifically, is very C-like. Python's syntax is missing some pretty important components from C. Preprocessor directives (Python has them in some sort of form but it's not the same), pointers (again, python can implement them but not in the same way and only with a special module), and in Python struct refers to a very different kind of concept. Python also introduces tuples, OOP, and bits of syntactic-sugar mostly in the form of functional-programming-like statements.

The syntax is like C, and has various similarities, but very like C? I'm afraid I have to disagree.

Link to comment
Share on other sites

Link to post
Share on other sites

Thenewboston on Youtube is pretty good. I have learned a lot from his tutorials. You know, sometimes books and looking up the language's documentation is nice, but there are some times that watching a video and see the stuff you're being taught in action is a lot easier and faster. I would also reccomend you start with java or c++. I personally started with c++, despite being told that it is very hard for a beginner, but I didn't really find it that hard. Python is also an easy language to learn.

MacBook Pro 15' 2018 (Pretty much the only system I use)

Link to comment
Share on other sites

Link to post
Share on other sites

Poor OP, he asked for advice on how to get started but what he got instead was a train wreak... :(

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

You seem to have trouble deciding whether you are arguing that Python is C-inspired or C-like... the two are not the same thing.

C-inspired I would totally agree with since most modern languages are inspired heavily by C. Not all of those languages are necessarily like C, in the way that they have turned out, though. I can very much appreciate the similarities to C in Python... but I disagree that it, the syntax specifically, is very C-like. Python's syntax is missing some pretty important components from C. Preprocessor directives (Python has them in some sort of form but it's not the same), pointers (again, python can implement them but not in the same way and only with a special module), and in Python struct refers to a very different kind of concept. Python also introduces tuples, OOP, and bits of syntactic-sugar mostly in the form of functional-programming-like statements.

The syntax is like C, and has various similarities, but very like C? I'm afraid I have to disagree.

You're entirely right.

 

I've been flipping between C-inspired and C-like this whole time, (as if they're the same, I can see your confusion with my points) though I definitely realize the difference. I would clarify that I do intend to say it's C-inspired, C-like would be something along the lines of Java or C++ or C#.  You get tuples from the ML-family languages, specifically Haskell in Python. Haskell is gorgeous too, but that's a different story. I think OOP is a bit of an outdated paradigm these days but it's here to stay for at least awhile.

 

Like I said, I'm C-biased (not exactly a purist but close, at least as far as low level work goes) and I like to think I see more of C (C what I did there?) than there actually is a lot of the time. I wouldn't be using Python if it was very C-like, nor do I think would a lot of other people, so it doesn't make sense for me to be saying it's C-like. I use Python because of its gorgeous readable syntax and maintainability. Having the REPL is nice too but for me I fell in love with the syntax.

 

I apologize for my unacceptable language blunders and can ensure you that they will not happen again. :ph34r:

 

These days it's almost impossible to find an imperative language that doesn't structure similarly at least on some level to C, simply because C was so revolutionary and paradigm-shifting. Literally paradigm-shifting. We might still be using COBOL (at least more of it ;)) today and COBOL-style languages if not for C.

"You have got to be the biggest asshole on this forum..."

-GingerbreadPK

sudo rm -rf /

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×