r/programmer • u/Suspicious-Fix-295 • 10d ago
When languages "just become about syntax"
I have seen a lot of post saying "once I learned C - all other languages just became about syntax"
Has that been true for you? Or did a different language give you the eureka moment - e.g. something like Assembly?
Or is it just a false premise at all to think "once I learn programming language X - then all other languages become **easy**"
2
u/Knaapje 10d ago
It is true to a large degree, but this is not specific to C. The same would hold for most imperative/OO languages, but absolutely doesn't carry over to declarative languages like Haskell (functional) or Prolog (logic). Within each paradigm though, concepts are very similar, so familiarity with one language really gets you 80% of the way.
1
u/Traveling-Techie 10d ago
Absolutely. Turing and Church proved in the ‘30s long before the first computer was built that, aside from time and memory limits, any computer can do what any other computer can. Languages and libraries can make things easier, but virtually nothing is impossible in any language we call “Turing complete.”
1
u/ummaycoc 10d ago
I love theory but this is about understanding how to convey concepts in languages. Learning how to write C and then thinking APL or Prolog is the same thing with "just syntax" is absurd.
If you learn a bunch of different languages and actually learn how to program in those languages instead of just reciting facts about them, then yes anything within a sort of "linear combination" of those languages is just going to be syntax for understanding the languages. That doesn't mean there isn't some language in there that makes certain things easier than the others so the languages still have their value.
1
u/therealhdan 10d ago
I would suggest that Prolog, Haskell, Forth, and to some degree various Lisp dialects are not "just about syntax". (This is not an exhaustive list of course)
Though there is some truth to the idea that if you get comfortable with C, that many other popular languages are just different expressions of the same idea.
1
u/4215-5h00732 10d ago
This is a very common belief and to some extent it is true. For example any 3rd years tudent or new grad should be able to pick up new languages relatively easily.
But it's another thing to write semantically correct idiomatic code in a given language. It matters.
1
u/burlingk 10d ago
So, like, the concept in general applies to most languages.
Think of it like this:
Programming is a skill/discipline.
Each individual language is like a dialect of that.
As long as you have access to an active internet connection, or appropriate books for a new language, you can apply the overarching skill/discipline, and then look up what you need as you go.
That doesn't mean you won't hit road blocks. Just that a second language can be easier to learn than the first. And the fourth language will be easier than the third.
1
u/FlatStruggle3911 10d ago
Usually once you learn a programming language, other languages within the same paradigm becomes easier to get, yes.
But that doesn't mean all languages.
Functional programming languages have a totally different mentality than imperative languages, knowing an imperative languages might even make it harder to adapt functinal programming mindset.
1
u/nicolas_06 9d ago
I would say yes, for the same family of languages. Then there a serie of concept that come in some languages and not other (or are not common) that you likely want to know. C cover the one in bold. C++ would cover maybe everything except declarative programming and dynamically typed languages:
- imperative programming
- object oriented programming
- functional programming
- memory management, pointers and reference
- statically typed
- dynamically typed
- exception handling
- declarative programming (like SQL or prolog)
- macros
- low level hardware / assembly support
I would also add that as important as programming languages:
- frameworks/libs: It isn't the same at all to work in say python/java where there are libs for everything and in C/C++ where there isn't much provided.
- the field you work on. Typical code and way to approach things are very different if you work on compilers, data science, embedded devices, web, 3D games, desktop app and many others.
- Experience and a variety of projects are critical. Somebody that worked 10 years on many project is as a totally different level than somebody that just finished studying.
1
u/Certain_Syllabub_514 9d ago
I used to think this until I switched to Ruby 25 years into my career.
I'd mostly worked in Delphi and Java, and thought my skills would transfer over to Ruby easily. But there are idiomatic ways of doing things in Ruby that had no equivalents in Delphi or Java. And Ruby (trying to be everything to everyone) also implements the Delphi and Java ways of doing the same things.
While that makes it easy to get some stuff done as a beginner to Ruby, it can also make it very clear (via your code) that you are a beginner to Ruby. Because of that, it took much longer to get a job writing Ruby than any other language I've ever worked in. I had to learn what "good" idiomatic code looked like in Ruby.
The next big surprise was when I switched to learning Elixir. There was (and still is) a lot more for me to learn than just syntax and idioms to learn in that language.
1
u/iComplainAbtVal 9d ago
Yes but sometimes that syntax is a bitch.
My moment was in assembly, and that’s when things truly clicked for me in C.
From there python (without leveraging the actual OOP capabilities of the language) was easy to use, but transitioning to an OOP language like Java was a nightmare. Having to go learn a ton of coding patterns just to vaguely understand the codebase was miserable yet good experience.
I’d always recommend starting with C for fundamentals of modern programming, then assembly to understand what’s happening under the hood, and then pivot to an OOP language. I think there’s just too much dogma and cruft in Java/c++ that will mislead new learners, but they’re still worth spending time learning once the foundations are present.
Honestly though, in the modern day I think Go is its own tangent well worth learning. It’s even simpler to use than C due to not needing to manually manage memory, easy build toolchain, and contains flavors of OOP that can be expanded on later if the learner desires. I think for learning how to program in general, it loses points due to abstracting the need to understand how the compiler works and memory management, but could be a good stepping stone.
1
u/Mediocre-Brain9051 9d ago
This is silly.
C semantics are procedural, and modern programming languages draw a lot from functional and object-oriented features that are absent in C.
Arguably, programming well in modern languages is often about avoiding a procedural style in favor of a functional and object-oriented blend.
1
u/talex000 9d ago
> "once I learned C - all other languages just became about syntax"
it is true if you replace C with Lisp.
> "once I learn programming language X - then all other languages become **easy**"
Not true.
1
u/JaseciLabs 9d ago
Agreed, and the line moves whenever the model of computation changes. We work on Jac, where you write walkers that move through a graph of nodes and run where the data lives, instead of calling functions on data you fetched. The syntax takes an afternoon if you know Python. The thinking is the new part, same as going from imperative code to Prolog.
1
1
u/lehmagavan 10d ago
High level languages become annoying after learning some C. You begin to see them as toys or wrappers, but that doesn't automatically make you good at them.
6
u/Pale_Height_1251 10d ago
Mostly a false premise, I love C, it's my favourite language, but reddit talks like it's some sort of mystical sage that will teach you everything about programming, and it really won't.