Hacker Newsnew | past | comments | ask | show | jobs | submit | t420mom's commentslogin

Is it fair to blame all of OOP for C++?


yes, because java and c# (and others, python to a certain extent) basically copied it. even ruby, which at its core is about "message passing" sure does a hell of a lot to hide that and make it feel c++ ish. i would bet at least 25% of ruby practitioners arent aware that message passing is happening.


at least python gives the flexibility to opt out of OOP, whereas in java, literally everything is an Object


The main issue I have with Java is that the JVM was built to be portable and then we got a superior kind of portability using containers, which makes the JVM totally redundant and yet whenever I point that out, I get funny looks from people!

I guess I have a lot of other problems with Java--jar hell, of course, but also the total inability for corporations to update their junk to newer versions of Java because so many libraries and products were never kept up with and then you get security people breathing down your neck to update the JVM which was LITERALLY IMPOSSIBLE in at least two situations I became involved with. We even tried to take over 3rd party libraries and rewrite/update them and ended up at very expensive dead ends with those efforts. Then, to top it all off, being accused of lacking the skill and experience to fix the problem! Those a-holes had no idea what THEY were talking about. But in corporate America, making intelligent and well-documented arguments is nothing. That's when I finally decided I needed to just stop working on anything related to Java entirely. So after about 15 years of that crap, I said no more. But I'm the under-skilled one.


So redundant that the WASM folks are redoing application servers using kubernetes with WASM containers.


You do realize that it's time to sunset a codebase if you can't find anyone to maintain it, right? "LITERALLY IMPOSSIBLE" means the code is dead. It's worthless garbage dragging the company down. There is no nothing else to do except shut it down. Software written in the last century isn't something like an irreplaceable artifact from an ancient technologically superior civilization that can never be replicated.

If humanity's technological progress depended on impossibly rare events that never happen again, then humanity would miss the vast majority of them. It would be as if those events never existed in the first place.


you realize the person you’re responding to didnt make this decision on what to use in their stack at all and this is likely what eventually happened anyway?


If only! Java gives you just enough non-objects to make pass-by-value or pass-by-reference something you need to be aware of, likewise with == and equals.


Everything is an object in Python as well


Literally everything is not an object - to whit: literals. And other things that weren't in your sentence.


What do you mean by this? Because everything in Python is object, even classes and functions are objects.

Do you just mean that Python lets you write functions not as part of a class? Because yeah there's the public static void main meme but static functions attached to a class is basically equivalent to Python free functions being attached to a module object.


OOP is not shoved down your throat with Python, though. With Python, I can choose what taxonomies deserve an OOP treatment and which do not. Spoiler: Almost nothing is a taxonomy of any remarkable nature.


you also can get away with completely ignoring the underlying oop semantics in tons of cases whereas java and similar languages dont give you that option


If I call something a function does that mean I'm "doing functional programming" any time I use it?

I use both C++ and Python but I wouldn't describe any of what I write as "object oriented".


No. Functional programming is quite a bit more involved than just writing "functions"--it is taking advantage of the fact that functions are first-class "objects" that can be passed as arguments to other functions, which allows for a far more intuitive and flexible form of programming. But FP is even more than that.


In Python everything is an object as well, unless you are still using Python 1.x, or the legacy mode in Python 2.x.


that's why i said "to a certain extent" for python!!


Maybe not fair, but it’s pretty normal for people to assess paradigms based on their most popular implementations.


I don't hate C++ as much as I hate Java, though. That probably has more to do wit the time I was working with C++ and the kinds of projects versus the mind-numbing corporate back-end garbage I worked on with Java.


Not charity - they are paying tribute


Even that argument is starting to fall apart. What are the theatres where the US is supposed to be able to put on a strong showing? It doesn't seem to be Europe, they've got war on their doorstep and if anyone thinks the US is helping they should reflect on their reasoning. It doesn't seem to be the Middle East, the US has made the region less safe. They're not going to be able to act effectively against China given the trouble Russia has been giving them.

The US can't afford to extract tribute from people. It isn't powerful enough, relatively speaking.


> Even that argument is starting to fall apart.

Yes, that's what's happening. They were paying tribute, based on a mutually beneficial status quo. Now they're asking if they should continue to.


They weren't (for the most part) paying tribute. They were putting their money somewhere safe - somewhere where the risks of default, inflation, and devaluation were lower than other places.

But I agree, now they're asking if they should continue, because those assumptions are starting to look invalid.


> What are the theatres where the US is supposed to be able to put on a strong showing? It doesn't seem to be Europe, they've got war on their doorstep and if anyone thinks the US is helping they should reflect on their reasoning

I think you have this backwards: the US was helping considerably, and then got taken over by pro-Russian conspiracy theorists.

But the bond stuff isn't "tribute" or nationalism; remember, it's being made by private sector investors, not national governments. Fairly straightforward calculation: which way is the exchange rate expected to move? Interest rate? Risk of default?

Up till now the US offered moderate interest rates, favourable direction of exchange rate movement, and imperceptible risk of default. There's still no reason to default other than madness and a desire to strap on the suicide vest and become Argentina.


> But the bond stuff isn't "tribute" or nationalism; remember, it's being made by private sector investors, not national governments.

Are you sure about that? Back in 2022 the US Treaury reckoned that most holdings were foreign governments [0] - they had Foreign Official at ~3.9 trillion and foreign total at ~7.5 trillion. That has been shifting towards the private sector since then but the market has heavy sovereign involvement.

> and imperceptible risk of default.

The US clearly has quite a high risk of default - there isn't a reasonable path to them paying the money back. It takes imagination to even come up with scenarios where they try. In real terms they are going to default, in nominal terms there is still a high chance that they call it a default. There is no guarantee that they'll print money for foreigners; it is already going to be farcical claiming that they're not defaulting as they devalue like mad; it is quite possible they won't bother with the act and just do the honest thing.

[0] https://ticdata.treasury.gov/resource-center/data-chart-cent...


> there isn't a reasonable path to them paying the money back

Indefinite rollover is completely fine! Yes there are problems if the total interest payment gets too large, and there's scope for discussion about that, but there's no hard cutoff, it just becomes more and more uncomfortable.

People saying there will be a default: deadline please. Or is this just a general assumption that mortality is inevitable for states? The UK has never defaulted, for example.


It isn't completely fine and the interest payments are too large.

Sure the US can afford its debts if it avoids paying fair interest and never returns the principle. The idea that is reasonable from a lender's perspective is fantasy and we live in reality.

> The UK has never defaulted, for example.

The UK has traditionally not been in a state of running up debts; they borrowed money for things like world wars then spent most of their time paying loans down. The US isn't behaving like a creditworthy country because they borrow to consume and they aren't attempting to shrink the debt.

If the US tended to be repaying the money it borrowed then it'd be plausible that they intend to avoid a default.


> never returns the principle

But it does! All the bonds pay out after X years, and everyone is completely fine with this.

> The UK has traditionally not been in a state of running up debts; they borrowed money for things like world wars then spent most of their time paying loans down. The US isn't behaving like a creditworthy country because they borrow to consume and they aren't attempting to shrink the debt.

You've not looked at the numbers, have you.


> But it does! All the bonds pay out after X years, and everyone is completely fine with this.

I'm happy to argue with you but you're going to have to read the entire sentence. Possibly even the entire paragraph. Otherwise it is a bit pointless even for the fun of it.

> You've not looked at the numbers, have you.

I have, I put a good 5-10 minutes in to it. I suspect you haven't looked at the numbers.

You can find references on places like the BBC [0] but there are also charts that go back to the 1800s and the story is reasonably consistent. Historically most years the UK pays down debt. In fact, the last time it didn't was the 1930s and after that klutzy fumble it didn't get to be an empire any more, so that was a mistake.

[0] https://ichef.bbci.co.uk/ace/standard/800/cpsprodpb/16CB7/pr...


>the US was helping considerably, and then got taken over by pro-Russian conspiracy theorists.

This is such a nonsense conspiracy theory. Anything "non-American" isn't by default pro-Russian, ffs.

Come on people, this nonsense has to die. You can't be that dumb. Nobody believes this excuse any more.

Maybe America is in trouble because Americans are just shit at keeping themselves safe from real harm, and Russia has nothing to do with it.


The Middle East is less safe because the US made an example of Saddam when he offered to sell oil for Euros instead of US dollars. That's a classic example of an empire ensuring the tribute continues to flow, at least until the current Emperor decides receiving tribute is a bad deal and demands every country in the world stops sending it.


I feel like there's a whole new generation of tech workers that need to read _Zen and the art of motorcycle maintenance_


Author here. This is one of my favourite books of all time. In fact, my two favourite books are ZAMM and The Black Swan, both of which I hated on my first read when I was 19.

I recently re-read it for the third time while on holiday and was taking notes on pages worth including in a book review. I ended up with about 1/3rd of all pages logged and decided no review was better than just telling people to read the book, but I might write a blog post on gumption traps.


I don't really want to increase the amount of time I spend doing code reviews. It's not the fun part of programming for me.

Now, if you could switch it around so that I write the code, and the AI reviews it, that would be something.

Imagine if your whole team got back the time they currently spend on performing code reviews or waiting for code reviews.


This would indeed be the best way around.The code reviews might even be better - currently, there's little time for them and we often have only one person in the team with much knowledge in the relevant language/framework/application, so reviews are often just "looks OK to me".

It's not quite the same, but I'm reminded of seeing a documentary decades ago which (IIRC) mentioned that a factor in air accidents had been the autopilot flying the plane and human pilots monitoring it. Having humans fly and the computer warn them of potential issues was apparently safer.


> Now, if you could switch it around so that I write the code, and the AI reviews it, that would be something.

I'm sort of doing that. I'm working on a personal project in a new language and asking Claude for help debugging and refactoring. Also, when I don't know how to create a feature, I might ask it to do so for me, but I might instead ask it for hints and an overview so I can enjoy working out the code myself.


When I was younger and poorer they made a decent speaker (amplifier? echo chamber?) in a pinch, if you taped an earbud into the open end, facing the bottom of the tube.


Are you able to ride a bike to work?


In many cities/countries that's more dangerous than just getting the corona.


I'm pretty lucky that I can ride a bike or work remote. My partner doesn't have either option.


There's the BioLite stoves: https://www.bioliteenergy.com/products/basecamp

They are high-efficiency, low-smoke wood stoves and the company actually tries to make a difference to people that rely on fire for cooking: https://www.bioliteenergy.com/pages/mission

I've had the camp stove for a couple of years and it works really well. I wouldn't recommend using it indoors (the monoxide risk if nothing else), but it definitely fits in with the off-grid movement.


You could probably do just as well with random selection as relying on a heuristic. Most people with relevant training and experience are capable of doing the job, most of those are capable of doing it extremely well when supported with training - probably better than "the best", because their cup is not full.

I've yet to see a resume screening process or interview process that reliably weeds out the 1-5% of bad picks. I have seen screening processes reject perfectly good candidates.

A company could probably do very well by letting go of the idea that you need to find the best candidate in a stack of 100 resumes, and instead just pick anyone with the needed qualifications and support them with training. As the article mentions, the current approach performs poorly and wastes time and money.


Factory-farmed meat is bad for humans and bad for the environment, true, but any industrial-scale monoculture crop has huge negative impacts, and that includes vegetables too.

Better to avoid monocultures by buying organic/biodynamic, shopping at farmers' markets, CSA, growing your own food, etc. Eat less processed and make more from scratch. Better health, better for the environment, and you can still enjoy meat :)


I've long had a scifi vision of the future in which autonomous drones intelligently, with sustainability as a goal, hunt wild fish as a good way around the factory meat problem. Only slightly related, just wanted to share some techno-optimism.


Techno-Optimism nowadays includes Hunting Robots. What a time to be alive.


True, but it doesn't scale. Good luck if you live in a metro area.


How so? In San Francisco there are several local produce markets within walking distance of where I live. Whole Foods and Trader Joe's are pretty common major grocery chains here, and there are two weekly farmer's markets I can think of that are accessible by bike/transit.

When I visited Manhattan/Brooklyn recently I didn't get the sense that they were lacking in locally-sourced foods either. Main problem I can think of are food deserts, but those are more of an economic problem than scale. When I used to live in one in Baltimore though it was possible to find local food, it just took more effort.


this part specifically:

> growing your own food

I should have quoted that directly in my original comment.


If there was demand for it, every other apartment building rooftop could include a greenhouse.


you would need much more than a rooftop to feed a high rise apt building, no?


Correct, but a rooftop would put a sizeable dent in the building's need to bring in food.


My personal experience has been that the live coding aspect makes a huge difference to my development speed. A while ago I was going through Project Euler in less-mainstream languages, just as a warm-up/distraction from work. I would do one problem at a time and then go back to work. One day I switched from Object Pascal (with Lazarus) to Pharo. I completed the problem (which I hadn't attempted before, so no prior knowledge) so quickly, that I proceeded to complete five problems in the time it usually took me to do one. Because everything was so immediate, it was really easy to maintain a flow state. I had to force myself to stop and get back to work.

The object inspector is really nice, also being able to redefine methods in the debugger and continue the current computation is super cool. Beats poring over Java stack traces.

It would be nice if there were more open source libraries available, but SmalltalkHub is getting better: http://smalltalkhub.com/list


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: