News for hackers. Stuff that matters.
Re:Why Are So Many Developers Hating on Object-Oriented Prog... by kerkeslager on Friday August 23, 2019 @05:48PM (#20782993)
"You can write bad code in any language" is fairly proven.

Can you write good code in any language, though? At least, good enough? It's quite hard to study objectively, but my subjective opinion is "no". Trivially, brainfuck certainly doesn't cut it, but even if you're only looking at serious languages geared toward general, production-quality programming, there's a lot of programming languages that are much easier to make mistakes in or abuse than others.

Re:Why Are So Many Developers Hating on Object-Oriented Prog... by akira2501 on Friday August 23, 2019 @05:55PM (#20783062)
> Can you write good code in any language, though?

Yes, absolutely.

> At least, good enough?

I think the better question is, can you write good code in a particular language and still make deadline?

Re:Why Are So Many Developers Hating on Object-Oriented Prog... by fgonzag on Saturday August 24, 2019 @05:08AM (#20786111)
I don't see how anything written in brainfuck could ever be called good code.
Re:Why Are So Many Developers Hating on Object-Oriented Prog... by coldtea on Saturday August 24, 2019 @07:55AM (#20786621)
That's because you focus on surface syntax.

In the end brainfuck is just a fancy assembler.

You could very well write nicely formatted, structured etc brainfuck. It will just look weird because the (otherwise very simple operations) have a weird sigil syntax.

Re:Why Are So Many Developers Hating on Object-Oriented Prog... by jstimpfle on Sunday August 25, 2019 @05:49AM (#20792149)
Come on, that's as objectively false as it gets.

Brainfuck doesn't give you macros, function calls, function structures. It doesn't have names for anything. In other words there is zero syntactic and physical abstraction. The programmer must assemble everything on their own, with extreme repetition, making it extremely hard to see structure, or to change it.

You can't even write efficient code in it since basic arithmetic operations (like addition, indexing) are O(n).

Re:Why Are So Many Developers Hating on Object-Oriented Prog... by kerkeslager on Friday August 23, 2019 @06:45PM (#20783468)
I'd say you can't write good enough code in any language. The most high-profile, extensively tested C networking code still has security vulnerabilities, for example--the best C code isn't good enough. And broadly speaking, I'd say good code meets deadlines, but I guess that's a bit of semantics on my part.
Re:Why Are So Many Developers Hating on Object-Oriented Prog... by ncmncm on Friday August 23, 2019 @07:13PM (#20783697)
Donald Knuth is quite fond of C. He writes checks to people who find bugs in his code. They are quite valuable, because they are very rare.
Re:Why Are So Many Developers Hating on Object-Oriented Prog... by pjmlp on Saturday August 24, 2019 @01:56AM (#20785510)
Tex was implemented in Pascal and uses web2c to generate C code.

https://en.wikipedia.org/wiki/TeX

Had he implemented it directly in C he would be sending checks every day.

Re:Why Are So Many Developers Hating on Object-Oriented Prog... by jstimpfle on Sunday August 25, 2019 @05:59AM (#20792175)
> Had he implemented it directly in C he would be sending checks every day.

He used Pascal maybe not for the reasons you think. Remember it was the early 70s. If you actually look at the TeX source code, I'm pretty sure you won't find the kind of Pascal you envision.

Nowadays, Knuth does use C directly. (FWIW)

Re:Why Are So Many Developers Hating on Object-Oriented Prog... by ahhhhhhhhhhb on Friday August 23, 2019 @09:30PM (#20784554)
so rare, industry defining geniuses can avoid fucking up too much with unquantified effort and no real deadlines or pressure to produce. got it
Re:Why Are So Many Developers Hating on Object-Oriented Prog... by ncmncm on Sunday August 25, 2019 @03:10PM (#20794857)
If you were as productive as Donald Knuth, you would have reason to be very proud.
Re:Why Are So Many Developers Hating on Object-Oriented Prog... by kerkeslager on Sunday August 25, 2019 @10:49AM (#20793296)
Not networking code.
Re:Why Are So Many Developers Hating on Object-Oriented Prog... by akira2501 on Friday August 23, 2019 @07:06PM (#20783645)
> extensively tested C networking code still has security vulnerabilities

Are you familiar with Daniel J Bernstein?

> the best C code isn't good enough

Are you sure _you've_ seen the _best_ code? Are you sure you understood the constraints of those writing that code when you evaluated it?

> I'd say good code meets deadlines

I'm trying to say there's an obvious compromise between the two, which explains the wide spectrum of code quality.

Re:Why Are So Many Developers Hating on Object-Oriented Prog... by mantap on Saturday August 24, 2019 @12:33AM (#20785226)
If you have to be DJB or Bellard to write good code in a programming language, that programming language probably has a problem. I used to write a lot of C back in the day, but I have to admit that C++ code is far more reliable and maintainable, which is a damning thing to say about any programming language.
Re:Why Are So Many Developers Hating on Object-Oriented Prog... by kerkeslager on Tuesday August 27, 2019 @05:16PM (#20814467)
I am somewhat familiar with Daniel J. Bernstein, but you'll have to enlighten me on why you've brought him up.

If you're referencing programs where half the source code is written in a theorem proving language like CoQ, that's not really "written in C", now is it?