Live data from Hacker News

Why I Always End Up Going Back to C

deplet.ing

61–70 of 76 posts

Re: Why I Always End Up Going Back to C

#61
post #24
post #21

Earlier quoted context omitted.

Yet another myth, plenty of languages since JOVIAL in 1958 offer similar capabilities.

I am curious, what was it I said that you consider to be a myth? If I have some misunderstanding I would like to know. I looked at JOVIAL on wikipedia quickly but I can't see exactly how it would be thinner than C or if it's compiler would output something vastly different to a C compiler. Or did you mean it's as thin as C but it came out earlier?

Both, the properties that UNIX crowd assigns to C aren't unique.

Most think that way because they never learnt anything other than C and C++.

Re: Why I Always End Up Going Back to C

#62
post #21

Earlier quoted context omitted.

Yet another myth, plenty of languages since JOVIAL in 1958 offer similar capabilities.

Ok, if you insist on ultra precise description - "C is is the lowest level language among widely used".

Not even that, because C compilers nowadays are written in C++.

Re: Why I Always End Up Going Back to C

#63
post #31
post #7

> The language shows you the machine, a machine which is not forgiving to mistakes. Assembly does that, C not really, it is a myth that it does.

I'm being pedantic, but on modern hardware, the ISA is an abstraction over microarchitecture and microcode. It's no longer a 1-to-1 representation of hardware execution. But, as programmers, it's as low as we can go, so the distinction is academic.

Still one layer below C, and with plenty of features not available on C source code.

Re: Why I Always End Up Going Back to C

#64
post #61
post #24

Earlier quoted context omitted.

I am curious, what was it I said that you consider to be a myth? If I have some misunderstanding I would like to know. I looked at JOVIAL on wikipedia quickly but I can't see exactly how it would be thinner than C or if it's compiler would output something vastly different to a C compiler. Or did you mean it's as thin as C but it came out earlier?

Both, the properties that UNIX crowd assigns to C aren't unique. Most think that way because they never learnt anything other than C and C++.

I see, you thought I meant that C was the only language with this property. No there are plenty of others, I was fully aware of that. I on the other hand thought you meant that JOVIAL in some way was even thinner or more tuned to underlying architecture in some way that made it thinner than C.

Re: Why I Always End Up Going Back to C

#65
post #62

Earlier quoted context omitted.

Ok, if you insist on ultra precise description - "C is is the lowest level language among widely used".

Not even that, because C compilers nowadays are written in C++.

It is unrelated to the point.

Re: Why I Always End Up Going Back to C

#66
post #59

Earlier quoted context omitted.

The control flow is explicit; there is no language "magic" here. Non-local gotos in the former case and asynchronous callbacks from the OS in the latter case are pretty well known.

Except knowing where the jump lands, very explicit.

These are low-level api and hence if you know the caveats to follow, then using them correctly is not difficult; Eg. keep the context of the function calling setjmp active, don't use jmp_bufs allocated on a stack etc.

Not knowing how to do something is the fault of the programmer and not the language/tool.

Re: Why I Always End Up Going Back to C

#67
post #58

Earlier quoted context omitted.

That is not an argument. ANSI/ISO C standardizes hardware-independent parts of the language but at some point you have to meet the hardware. The concept of a "implementation platform" (i.e. cpu arch + OS + ABI) is well known for all language runtimes. All apps using the above-mentioned are written in standard ANSI/ISO C. The implementation themselves are "system level" code and hence have Language/HW/OS specific exte…

It is, because C is nothing special, those features are available in other languages. Proven before C was even a dream at AT&T, and by all other OS vendors outside Bell Labs using other systems languages. Then people get to argue C can X, yeah provided it is the Compiler XYZ C dialect.

Not quite.

C took off because system programmers could not do with other languages what they wanted, with the ease and flexibility that C offered.

Having a feature in a language is not the same as how easy it is to span hardware, OS and application in the same language and runtime.

Re: Why I Always End Up Going Back to C

#68
post #60

Earlier quoted context omitted.

Nope, you are just generalizing your opinion which is not quite true. My (and my colleagues) experience studying/programming C/C++ from the beginning-90's has been pretty good. When the PC explosion happened, a lot of programmers without any CS background started with C programming and hence of course there is a lot of code (usually not long lasting) which do not adhere to software engineering principles. But quite a…

Each one is their own anecdote. I have also all those books and magazines, pitty most coders of the code I have seen on my lifetime don't. The regular developers, those that don't give a shit online forums exist, other than Stack Overflow, and go home to do non computer related stuff after work.

As i said, you cannot generalize from your experiences alone.

You have to look at the programming community as a whole and industry practices developed and adopted over time in the real world.

There is enough data here to show that C does not deserve the negativity that i often see here on HN.

Re: Why I Always End Up Going Back to C

#69
post #63
post #31

Earlier quoted context omitted.

I'm being pedantic, but on modern hardware, the ISA is an abstraction over microarchitecture and microcode. It's no longer a 1-to-1 representation of hardware execution. But, as programmers, it's as low as we can go, so the distinction is academic.

Still one layer below C, and with plenty of features not available on C source code.

Compiler intrinsics do give you C/C++ api access to relevant ISA subsets as platform-specific extensions.

Re: Why I Always End Up Going Back to C

#70

I wound up going back to C in a big way about five years ago when I embarked on Scheme for Max, an extension to Max/MSP that lets you use s7 Scheme in the Max environment. Max has a C SDK, and s7 is written in 100% ANSI C. (Max also has C++ SKD, but is far less comprehensive with far fewer examples and docs). I was, coming from being mostly a highlevel language coder, suprised at how much I like working in this combo…

Nice.

Reminds me of optimizations done in the early days of Erlang and BEAM using C for performance reasons - https://www.erlang.org/blog/beam-compiler-history/

Post reply on HN