It's 2019, people!
C is obsolete, we gotta learnLISPSmalltalkJavaHaskellIntercalRust
It's 2019, people!
C is obsolete, we gotta learnLISPSmalltalkJavaHaskellIntercalRustwhy in the 2019, if they have to invent a new language, why they have to bring the fucking ";" as linefeed along? chr(13) and chr(10) have been used for millenia as linefeed and carriage return, a relic brought down from C/C++everything else is a good thing in C/C++ except this (this make C is 99.99% my favourite language) why?
The use of a statement delimiter predates C by a long way. It was introduced because of problems found in early languages, like Fortran, where the end of the line meant the end of the statement. Fortran fixed this with...
It's 2019, people!
C is obsolete, we gotta learnLISPSmalltalkJavaHaskellIntercalRustwhy in the 2019, if they have to invent a new language, why they have to bring the fucking ";" as linefeed along? chr(13) and chr(10) have been used for millenia as linefeed and carriage return, a relic brought down from C/C++everything else is a good thing in C/C++ except this (this make C is 99.99% my favourite language) why?
The use of a statement delimiter predates C by a long way. It was introduced because of problems found in early languages, like Fortran, where the end of the line meant the end of the statement. Fortran fixed this with...for new language... no excuse, regardless... many new languages such as Phyton dont require ";", the cute, lovely and sweety Basic never requires this since decades... any OS will use some sort of CR and/or LF that can be interpreted as ";". for end of statement that can be fixed with a single "END" syntax (or whatever) for a unit program, not thousands of ";" in each line we have to type... real inefficient... i can accept ";" as separator between "lines" of code in a single line of text editor, or clarity if anybody chooses to... but not ";" + CR/LF requirement when i dont want it. ";" + CR/LF can easily interpreted as few extra empty line(s)...
ps: currently programming in RobotC for something serious...
.
one can use ADA or maybe even FORTRAN if one really wants, but not many do that

I don't like C very much, but it's an common evil one has to live with, just like windows or x86. Still around though technically full of![]()
![]()
.

For the hobbyist, C was the first higher level language available on early 8080 and Z80 machines. So, no, I didn't learn it in the last few years. I have been using it for nearly 40 years (starting around '80). I preferred Pascal but that came along a bit later.
I would still be inclined to use C as a language for embedded programming simply because I don't believe in dynamic memory allocation (heap) on memory limited embedded processors. I can avoid the standard string functions (that use a heap) and everything works out fine.
C and Fortran are the only languages I actually use. I have tried, off and on, over the last 20 years of so to develop an interest in C++ and I just can't quite 'get it'. It's not the mechanics of the language (well, ok, it is), it's the 'why' I can't wrap my head around. Same with Python. I want to like it, I admire the built in structures, but then they bastardize the syntax with indent levels. Not that I don't indent code levels, I just want some kind of delimiters like '{' and '}'.
I'm just too old to learn new stuff and, given that the old stuff is still in use, have no real desire to push beyond my comfort zone. It's not like I need (or even want) a job.
For the hobbyist, C was the first higher level language available on early 8080 and Z80 machines. So, no, I didn't learn it in the last few years. I have been using it for nearly 40 years (starting around '80). I preferred Pascal but that came along a bit later.
...
...
If you consider BASIC, FORTH high level languages, both were available for CPM on 8080. z80 was a cloned (functional clone, not hardware clone) of 8080 with much enhancement over the 8080, so 8080 predates z80. I had BASIC on my SOL20 (8080) in 1977 before C was available for the 8080, CPM BASIC was the standard then.
I don't rule out that C was out there for 8080 before 77, but I was religiously reading the main available computer magazine at the time - "Byte Magazine" and I don't recall any advertisement of C compilers out there. Anything available on CPM would likely be before DOS.
Altair BASIC was used by Microsoft to make Altair-Microsoft BASIC in 1975 before DOS existed. Microsoft did not make MS-DOS until IBM contracted them to create DOS for the IBM-PC (which was 8088 a mixed 8/16 bit improvement of 8080 which was 8 bit only). That was the time when MS purchased OS from Seattle Computer Products and made it into DOS for IBM-PC. IBM PC with PC DOS was introduced in 1981. So Microsoft BASIC pre-dates MS-DOS and PC-DOS.
Running with under 64K ram that the PC can use for DOS, any C compiler back than were primitive. You cannot consider C then to be anything like C later when "extended memory" came into play. I think the Greenleaf C compiler was the first "real" industry standard C compiler for PC. It later was purchased by Microsoft as the first version of Microsoft C which then became the industry standard.
Now if you are talking about "Structured Language", I agree with you. BASIC and FORTH are high level languages, but not Structured Languages. Borland Pascal came much later than C.
Well, not to get into yet another fruitless language war, but I don't really see the point in "still around'. It's a tool and it does the job.
Forks are still around as eating utensils, should we use connected bluetooth things instead to put food inside our mouth?

Long live C! Long live buffer overflows!
Long live C! Long live buffer overflows!and the lazy bunch of programmers aka codewarrior speed demon wannabe. which can easily be overcomed with custom array/linked list/tree class. python or java just have overbloated version of that... 2 transactions per second on 6GHz 4-12 cores CPU cough cough. as people ask for more power due to their simulation and graphics lagging, and the programmer gives excuse that its a math intensive algorithm... long live the CPU
I just joined a new company as a mixed hw / embedded firmware guy, and I was disappointed to find out their codebase is 100% straight C.
I've been using C++ for embedded projects for years, and though I don't really are for C++ as an application programming language, it's actually pretty great for embedded. The key is to restrict yourself in what parts of C++ you use. Stay way from most of the STL and dynamic memory allocation in general. But templates instead of macros? Heck yeah. Default function arguments? Yes. Classes? Sure, when it is helpful. consts rather than defines? For sure.
I just joined a new company as a mixed hw / embedded firmware guy, and I was disappointed to find out their codebase is 100% straight C.
If you have picked up plain old ANSI C in the last few years, how and why did you learn it?
I originally learnt C as it was the standard compiled 3GL for PC programming during the 16-bit era, (along with with maybe Pascal). I still use it often and respect it as being the swiss army knife of programming languages.
What would drive people to take the leap from the highly abstracted world of things like Python to the 'madness' of C today?
It can't just be Arduino and embedded development...
(I'm currently writing a REST API service in C for only one reason - performance. Python gave 2 transactions per second, my C implementation gives 200... Most likely with a bug count to match!)
I just joined a new company as a mixed hw / embedded firmware guy, and I was disappointed to find out their codebase is 100% straight C.
I've been using C++ for embedded projects for years, and though I don't really are for C++ as an application programming language, it's actually pretty great for embedded. The key is to restrict yourself in what parts of C++ you use. Stay way from most of the STL and dynamic memory allocation in general. But templates instead of macros? Heck yeah. Default function arguments? Yes. Classes? Sure, when it is helpful. consts rather than defines? For sure.
I mostly agree with the "C with a few helpful bits from C++" philosophy - what are your thoughts on using virtual functions, virtual classes and base clases/inheritance in general for embedded work? I flipflop between liking and hating it.
Dynamic memory allocation is pretty hard to avoid if you get passed external data to process (e.g. my current joy is JSON files). My own view is you are better off developing a nice "the way we do things here" standard, so everybody is in agreement of what patterns are good, and what patterns are bad, allowing oversights to be spotted quickly. Also having tools to see what is going on is good - e.g. a custom wrapped malloc()/free() that lets you know everything during development is a good idea, IMO.
I just joined a new company as a mixed hw / embedded firmware guy, and I was disappointed to find out their codebase is 100% straight C.I would be glad to read your reasons for this. I usually read the assembly output from my code to "trust but verify" it is correct. How do you verify that your C++ output is correct? Is it your experience with the compiler that helps you see the patterns that you see as good code?
My limited experience with embedded C++ is with KDE, where one of our programmers had a performance issue. I looked into the code, and there were several similar, but slightly different code paths, and they busted the I-Cache. A simple C function with ONE code path would have reduced the cache problem.
In the embedded world,. LOOK AT YOUR ASSEMBLY CODE when time is an issue. Of course, before writing embedded code, READ AND KNOW the architecture.
...
The first high level language available on most early microprocessors was a stripped down form of PL/1. PL/1 was really gaining traction in the early 70s, but was too big and complex a language to be fully implemented on small machines. So, Motorola, Intel and a number of others came up with MPL, PL/M and various other names for their own stripped down PL/1 dialect.
All of the above in the context of microcomputers. For mainframes: PL/I was introduced in 1964, COBOL in 1959, Algol in 1958 and FORTRAN in 1957. C is a newcomer, first released in 1972. Just a "johnny come lately" entry to computer languages. Let's not give it more credit than it's due.
Buffer overflows are literally the #1 cause of vulnerabilities, have been for decades, and C is literally responsible for it. We can do a lot better and still be fast, e.g. Rust.
I'm not saying C is all bad, but when you start composing complex systems out of it (such as an OS kernel), you are asking for trouble.
programmers [...] are humans
Well, not to get into yet another fruitless language war, but I don't really see the point in "still around'. It's a tool and it does the job.
Forks are still around as eating utensils, should we use connected bluetooth things instead to put food inside our mouth?They both work but one has surely done more accidental damage than the other

Because programmers, even the best ones...and this might blow your mind...are humans.
I'm not saying C is all bad, but when you start composing complex systems out of it (such as an OS kernel), you are asking for trouble. Because programmers, even the best ones...and this might blow your mind...are humans.
Sometimes you have to wonder: How did the fellows at Bell Labs ever create Unix and C at the same time (more or less)?