Unbounded strings have much more complex and potentially less optimal semantics than bounded strings, need to be allocated in different ways, etc. C makes tight resource control possible, and to do that it sacrifices a lot of ease. You have to think about resources when programming. In many scenarios, this is a good thing.
I'm not a C programmer (yet), but I would say that depends on what you define as "easy" or "simple". What I am is an Arch Linux user, and I embrace KISS - Keep It Simple, Stupid. Arch understands "simple" as "technically elegant and uncomplicated", but that doesn't mean it's easy to understand or foolproof to use - for the inexperienced user, that is. C is an incredibly powerful tool exactly because it is this kind of simple.
What I also am is someone who learned programming with Python, and I initially couldn't understand the appeal of C-oid languages either. But I've since realized it's all about using the right tool for the job. A programmer is a mechanic, and a mechanic that only knows how to use a hammer is a pretty useless mechanic (in general, of course. If all you deal with are nails then it's not an impediment to your abilities).
But I agree we need various tools to cover the necessary ground.
Why do you feel the need to think about the variable's type on every line though? Since they're typed, you should pretty much know exactly what they are, instead of trying to figure it out. Since they're not dynamic, they're never changing.
So i need to stop and think how can i input a variable from user, which function should i use. I was just defending js. I don't oppose C, i am just saying its about perspective. C is as much crazy to me as is JS to some other people. this does not make C evil.
- 004412......... and 4412..... are completely different things. You care also about how you annotate base of integers, because anything starting with "0" might be an 8-base integer.
- Even if we assumed local numbers don't start with 0, there are some places where such number doesn't fit into an integer. 32b int is only 10 digits in dec base.
So yes - whether it's C or JS you should very much care what the actual type is. This isn't very theoretic either. Some time ago, twitter started using id which were larger than 32b fields. Even though people should've been treating those ids simply as opaque strings, some used integers, leading to twitter client update panic.
Again using phones example:
country + area + ending
is different depending on what the actual types are. This is simply an issue we cannot ignore. In this case I'm expecting the concatenation and the result cannot depend on "contents of the string".
It's not laughable. Most implementations of JS and PHP are probably written in C or C++. While using dynamically allocated strings in higher level languages like these are indeed easier than null terminated strings in C, at some point someone somewhere had to write code at a lower level to support this.
Yes that is something i totally agree with. In fact that's why i only supported js and not hate c. Because somewhere it has to be done and c is efficient in dealing with memory allocations whereas js deals with front-end mechanics. But to say that js is 'crazy' is something beyond me. every language has its ways and it depends on what 'level' (high, low, machine) that language works in computer hierarchy.
Comparing high level language like js to lower level language (like c++, java, etc) on their syntax or how it deals with objects/arrays makes no sense.