3 ms·
You're describing a general problem in general terms... Does a program that has no side effects even exist?? ooOOOoh, spooky.... BTW, yes I know what you're g
by TickleSteve 10y ago
You're describing a general problem in general terms...
Does a program that has no side effects even exist?? ooOOOoh, spooky....
BTW, yes I know what you're getting at... optimisers are allowed to perform any transformation as long as they're semantically equivalent. This applies to all languages.
- MichaelBurge 10y ago> This applies to all languages. Sure, but it's common for C programmers to think C is a low-level language with concepts that map straightforwardly to the target machine. You can't simultaneously think that C is a low-level language "close to the machine" and that your program can be freely rewritten into an eldritch horror. That's the only reason it would be a good "lie". Contrast that with something like Perl, where people accept that an array is whatever Larry Wall wants it to be.
- lisivka 10y agoC programmers are not thinking that C is low level language. ;-) Assembler language is low-level language, because it is not portable between architectures. C is high-level language, because it's portable. It's means that one C language statement can be translated into many statements of assembler language, hence C has higher level of abstraction than assembler language.
- goatlover 10y agoC is low level for everyone using a programming language other than C (excluding assembly). That even applies to languages created in the early 60s, prior to C.
- lisivka 10y agoC is one of first high level languages. If someone is not educated well, it is his problem. It's possible to do low-level stuff in C, e.g. by inline assembler, but it does not makes C low level. Low level languages lacks abstractions, i.e. they tied to machine, while high level languages are not.