C encourages gurus who spout false wisdom on obscure subjects. Writing programs in C is often referred to as coding. Coding is writing obscure encryptions that will later have to be decoded, by none else than a guru! C also encourages programming by guesswork. [1992 vintage jerk]

modulaware.com/mdlt28.htm
modulaware.com

Posted Jul 6, 2020, 10:20 AM UTC

5613
cutetyOPI've never used generics and I’ve never missed it.•

Saw this on HN while I was looking for some mornin' jerk material, and stumbled upon this primo vintage piece. The majority of it actually technical, and I would assume fairly reasonable criticism at the time, but this guy was a programmer so you already know he had to aggressively tell you his very 100% fact based and correct opinions about why the ${LANGUAGE}'s and ${PARADIGM}'s he didn't like were complete and utter shit not as good as the one's he preferred. I know it's long, and skimming through all that to get to the good stuff is a hassle for the 100xers tryna jerk before they go get shit done. So, I'll just provide the highlights:

I believe that Object-oriented technology has a lot to offer in helping with the problems faced by modern and complex software systems. However, to many object-oriented people, C++ is the biggest disappointment of all, bringing all the bad old ways and a lot of unnecessary complexity to object-orientation. You do not need a language so riddled with low level constructs. The correct way is to use a pure OO language, and only interface to C, or other low level languages through external mechanisms. That way will ensure maintainability, portability, and quality.

Yeah, just wait until he gets his hands on Java! Unnecessary complexity gone thanks to a strict pure OO implementation! Right...?

I wish you success in your quest for building quality software cost effectively, and I think you will find part of the answer to the goal in Object-orientation, but not in C++. Critics of C++ are not religious fanatics and cranks as many C++ proponents would make out. We realise the shortcomings of C++, and advise looking into some of the better ways that are available.

Java will be the savior OO needs certainly, they should check it out.

The role of a compiler is twofold. Firstly, to generate code for the target machine. The role of the machine is to execute the produced programs. A compiler has to check that a program conforms to the language syntax and grammar, so it can understand the program in order to translate it into an executable form. Secondly, and more importantly, the compiler should check that the programmers expression of the system is complete, valid and consistent. A compiler should perform semantics checking. This is checking that a program is internally consistent. Generating a system that has detectable inconsistencies is pointless.

Uhh... That's doesn't sound like Java... That's almost sounds like something else, what is that language that it sounds like?

Semantics checking is done by ensuring that a specification conforms to some schema. For example, the sentence The boy drank the computer and switched on the glass of water is grammatically correct. But the sentence is nonsense. It does not conform to the mental schema we have of computers and glasses of water. A programming language should include techniques for the detection of similar nonsense. The language definition provides the framework that makes this role of the compiler possible.

I really wish I could remember the language that apparently has a compiler that will make sure your boy doesn't drink the computer! Where is someone to tell me about them about it when you need them!

The compiler is another such tool. The role of a compiler is twofold. Firstly, to generate code for the target machine. The role of the machine is to execute the produced programs. A compiler has to check that a program conforms to the language syntax and grammar, so it can understand the program in order to translate it into an executable form. Secondly, and more importantly, the compiler should check that the programmers expression of the system is complete, valid and consistent. A compiler should perform semantics checking. This is checking that a program is internally consistent. Generating a system that has detectable inconsistencies is pointless.

This guy is really onto something here I think.

It is a misconception that consistency checks are training wheels for student programmers, and that syntax errors are a hindrance to professional programmers. Languages that exploit techniques of schema checking are often criticised as being restrictive and therefore unusable for real world software. This is nonsense and misunderstands of the power of these languages. It is an immature conception; the best programmers realise that programming is difficult. As a whole, the computing profession is still learning to program.

Yes, of course, what is that language with the training wheels??/

Another example of consistency checking comes from the user interface world. Instead of correcting a user after an erroneous action, a good user interface will not offer the action as a possibility in the first place. It is cheaper to avoid error than to fix it. Most people drive their cars with this principle in mind. Smash repair is time consuming and expensive.

I swear I just heard someone the other day telling me about how their compiler just straight up told them their code was not going to work and just refused to run it. What a good guy that compiler, why didn't they think of making one like that?

Program development is a dynamic process. A program description is constantly modified during development. Modifications often lead to inconsistencies and error. Languages and compilers that provide consistency checks help prevent such bugs, which can creep into a previously working system. These checks help verify that as a program is modified, previous decisions and work are not invalidated

That's really smart, I bet all the languages of the future will detect inconsistencies before you even run them!

It is interesting to consider how much checking could be integrated in an editor. The focus of many current generation editors is text. What happens if we change this focus from text to program components? Such editors might check not only syntax, but semantics. Alerting programmers of potential errors earlier and interactively will shorten development times. Future languages should be defined very cleanly in order to enable such editor technology.

Man, once someone builds one of those, everyone is saying bye to plain old editors.

Future programming languages will be an implementation extension of the high level notations used for requirements analysis and design. This will lead to improved consistency between analysis, design and implementation. Object-oriented techniques emphasise the importance of this, as abstract definition and concrete implementation can be separate, yet provided by the same syntax.

A good OO language will only permit routines in an object to change its state.

Could you imagine using an OO language that does that, pfft, that'd be crazy.

A traditional system is assembled by combining modules. An object-oriented system is assembled by combining classes. Modules are a primitive form of classes. Classes are more sophisticated.

Inheritance over composition is the name of the game baby, they knew back then just as we know it today!

In the future, Unix could be replaced by object-oriented operating systems, that are indeed open to be tailored to best suit the purpose at hand. By the use of pipes and flags, Unix software elements can be reused to provide functionality that approximates what is desired. This approach is valid and works with efficacy in some instances, like small in-house applications, or perhaps for research prototyping, but is unacceptable for widespread and expensive software, or safety critical applications. In the last ten years the advantages of integrated software have been acknowledged. Classic Unix systems don't provide those advantages. Integrated systems are more ambitious, and place more demands on developers. But this is the sort of software now being demanded by end users. Systems that are cobbled together are unacceptable.

Man, when I upgraded to OOP Linux it was a game changer, couldn't imagine that a unix OS written using pipes and flags would worth using today. Thank you OOP.

In C++ the programmer must manually manage storage due to the lack of garbage collection. This is a difficult bookkeeping task that leads to two opposite problems. Firstly, an object can be deallocated prematurely, while valid references still exist (dangling pointers). Secondly, dead objects might not be deallocated leading to memory filling up with dead objects (memory leaks). Attempts to correct either problem can lead to overcompensation and the other problem occurring. A correct system is a fine balance.

Yeah, if only someone just designed a language to fix memory leaks... If there was a language like that, I surely would've heard about it from someone.

27
cutetyOPI've never used generics and I’ve never missed it.•

In order to use a software component, you must be able to understand it. The writer must communicate the purpose, intent, and correct usage of the component to the client.

In the real world of reusability, the ideal of trusting programmers is inappropriate. Trusting programmers results in less trustworthy software.

I'd never trust another programmers code without understanding it, nope not gonna happen, you'd have to be insane to that right!!

If you do not have confidence in a software component, then it is difficult to consider it for reuse. There could be doubt that the software component provides enough functionality, or correct functionality. There could be doubt that the component is efficient enough, or worse it might crash. The C/C++ philosophy of not building checks into the language and compiler because programmers can be trusted, works against trust and reusability.

Ok, I really at this point, I just want to know if this guy is/was still alive and has/had heard of NPM

Since true OOP ensures that objects are loosely coupled to the external environment, portability to diverse environments is possible. C is tightly coupled to the Unix environment, and as such is not particularly portable to diverse environments.

C is definitely the least portable language I know, that thing doesn't run on anything. And unix? Please.

A language can be judged like a wine connoisseur judges wine, by holding it up to the light to judge for clarity and colour. Ultimately, it is the taste that matters, but good colour and clarity suggests that the taste is more likely to be good. Clear programming language definition helps in the goal of the production of quality software.

There it is, glad to see they were still making these kinda weird comparisons on the elegance of software.

A programming language should contain no unnecessary constructs. This is the root of my dissatisfaction with C++. Much of it is unnecessary, even for the most complex systems. Its syntax is ugly. C++ has become what the C world has constantly criticised in languages like PL/1 and Ada. Only C++ is worse. We need to regain artistic elegance and simplicity.

Good thing that stopped adding things to C++ years ago.

C++ is overly complex. C is widely recognised as being a simple language. But even this is doubtful, as it has many operators, and a difficult precedence system. Its pointer style of programming is difficult. Overall, C has many traps that lead to difficult to detect errors in software. Object-oriented languages should provide sophisticated concepts in the simplest possible framework. Where the framework is not simple, the concepts are obscured. OOP addresses many issues in order to facilitate the production of complex and sophisticated programs. Many of these issues are addressed in implicit and subtle ways, but are lost in C++. Subtle errors can be introduced into C++ software in many ways, and furthermore, the combination of these will cause even further problems. C++ has devices for petty convenience, while sacrificing major conveniences and long-term correctness and safety. C++ forces the programmer to perform many administrative bookkeeping tasks that a compiler can easily do.

Yeah, since OOP frameworks came into the came, complexity just practically vanished with them.

But for what applications is C relevant? C is relevant for low level Unix systems programming. It is not a generally applicable language in view of its low level nature, and its flaws. C is not applicable for large scale production. Hence C++'s attempt to improve it. C++, however, has not solved C's flaws, as I once hoped it would, but painfully magnified them.

This guy is onto something, if only we had a language to rewrite all this shitty C code in...

Object-oriented techniques provide a method of simple division and management of such state spaces. Managing such state spaces requires the simplest techniques, in order to guard against detectable inconsistencies that lead to errors in executable systems. C and C++ do not implement the simple management of a large state space, and allow many potential errors to go undetected. The role of a language as a tool cannot seriously be regarded as some authoritarian that stops us doing what we want or need to do, as many languages with type safety and consistency checks are often viewed. Programming languages should embody the collective wisdom of common sense practices that have been learnt over many years, by common and painful experience. C++ lacks the implementation of much of this wisdom. [Sakkinen 92] observes that much of the C++ literature has few references to external work or research. It fails to draw on the insights and progress made by many researchers. This leads me to believe that C++ is parochial and removed from the many advances that will make production of systems easier and more cost effective.

RUST! That's it he's been describing RUST this whole time! Don't you see, it's been RUST all along!

It is better to detect and avoid errors than to fix them. The fixing of errors happens many times during the development process. This slows down the development process, and is therefore costly. Good programmers in this context (often called gurus), are those who recognise symptoms, and recommend fixes. Good programmers in the better sense (often called impractical idealistic dreamers) adopt better practices (programming languages being a subset of these), that avoid error in the first place.

Ok, nobody show this to the rusteceans, we'll never hear the end of it.

C encourages gurus who spout false wisdom on obscure subjects. Writing programs in C is often referred to as coding. Coding is writing obscure encryptions that will later have to be decoded, by none else than a guru! C also encourages programming by guesswork. C programmers often solve bugs by adding extra ()s, *s and &s, without understanding the problem. People who attain proficiency at this guesswork, are known as, well you guessed it, gurus!!

(The full quote wouldn't fit)

Many disciplines have techniques to ensure correctness. For example, the metronome in music is not just for students, but will help an advanced musician ensure that the tempo of a piece is correct, and since playing to a metronome is more difficult, will help sharpen the musicians performance of the piece. The musician does not just view the metronome as an aid for beginners, or as something that restricts him to a set beat, but as a tool that helps produce a polished and professional performance. C should not be seen as a language to which you graduate after you have learnt to program in languages with safety checks. In fact changing to C or C++ is a great step backwards. Languages with consistency and semantic checks are essential aids to the production of professional software.

Fuck. Please don't see this r/rust. Please don't see this r/rust.

18
mo_al_•

RUST will protect the boy from switching the computer and from drinking the glass of water since both of these operations are unsafe. The computer could blow up, and the boy could choke on the water.

22
iroflmaowtfDo you do Deep Learning?•

whack a crab, hide a bug

2
cdmistman•

You made me laugh so hard, I almost choked on my computer

2
ProfessorSexyTimelisp does it better•

damn king. go off

11
skulgnomeCyber-sexual urge to be penetrated•

100xers tryna jerk before they go get shit done.

Witness a mere 100xer, ignoring a solution for the problem it presents.

2
iroflmaowtfDo you do Deep Learning?•

In C++ the programmer must manually manage storage due to the lack of garbage collection.

cout << make_unique<Unjerk>();

I never understood this issue, after a few years you get pretty good at managing memory, the problem isn't necessarily related to competence, but tied more to the work environment that constantly throws obstacles and turns competent people in "CodeFactories"

we have memory related bugs, people are not able to properly manage memory manually, let's add garbage collection, now we're still leaking memory, harder to detect, but hey, we solved the other issue, haven't we?

1
Yoodae3oWRITE 'FORTRAN is not dead'•
std::declare_reachable(unjerk);

well, it's not like you don't have garbage collection support in c++ either.

you have garbage collector support (e. g. under "garbage collector support" here: https://en.cppreference.com/w/cpp/memory)

and then you have things like RAII, unique_ptr, shared_ptr, etc. but I guess tracing garbage collection is the only one true garbage collection in this day and age.

2
bmarkovicrips off entrepreneurs with useless JS skills•

I don't see a jerk here. Just an uninterrupted stream of praying for a more moral time to come.

13
FascinatedBoxlanguage master•

anyone who's ever written c knows that if you're guessing you're going to get a segfault. like, there's literally no room for screwing up. off by one? screw you, segfault. touch memory that's not yours? have a segfault. call gets()? your program can now call system stuff or whatever.

2
jasoncmnot even webscale•

Well if you were a C guru you just added parens or * or & or add/subtract 1 until it stopped crashing.

I'm glad to say that we now live in a more moral and enlightened time and no one does things like that anymore because our programming languages are more moral and enlightened.

4
iroflmaowtfDo you do Deep Learning?•

moral and enlightened

printf goes brrrrr

3