My point, though, is not to throw up all over Java but rather to quibble with the statement that Java has somehow evolved since then. It really hasn't!
555 karma · joined December 11, 2020
My point, though, is not to throw up all over Java but rather to quibble with the statement that Java has somehow evolved since then. It really hasn't!
If you'd chosen languages that permit abstractions in a real and usable sense, then you would not need this. In fact: with _one_ exception, I've never had a container in any Haskell, Scala or F# project ever. Do you think we ever needed one?
And this is my point: those other languages have seen _tons_ of development in the "abstraction arena" with (internal) DSL:s and super powerful frameworks for making powerful DSL:s. Java has had none of this because these concerns har all (poorly) handled at the container level.
The tacked on "functional stuff" is for sure cool coming from a Java backround, but they're pretty much useless.
The springification is what I mean by it being externalized and you generally don't see that in C, no. The pre-processor might be sort of the same thing but you generally don't bootstrap the entire thing using it.
Either do a nice imperative for-loop as that is an excellent and imperative way of solving the problem (which I don't know what it is.)
Or solve it in any of the normal functional ways. Pick the style that you and your team likes.
This is runtime type-checks: if x == null: die "Nullpointer exception";
it is simply not better than: x.DoTheThing();
They are equivalent.
The solution to that is not a runtime check, it's actually using a typing system in the first place. Runtime type-checks is no different from:
let x = 42; if x != 42: die "It's supposed to be 42"; compute_the_thing x; if x != 42: die "It's supposed to be 42"; save x; if x != 42: die "It's supposed to be 42";
Only completely unsound code would rely on something like that.
I know that I'm not checking types in my pretend-o-code.
"In practice, if the car I ordered is a pizza, I want to know!"
I would say that this is misusing my analogy by flirting with simple value bugs. Ordering a thing and getting the wrong kind of product, that's perfectly understandable in the world of bugs and what not.
Calling the place_order function, expecting to get back an order object but instead getting the function "not" or a database connection, that's more akin to what we're talking about here. It's the wrong data type and having a runtime check to catch that is a sign of dealing with unsound code.
Just crash everything is what _you_ are suggesting because that failing runtime type-check _is_ a de facto runtime crash of whatever was running at that point.
Code that runs the risk of encountering such a problem should not compile because it's not even wrong.
Discovering that the car you ordered is a pizza is not something you just... abort and undo/ redo. It's: wtf did you do? My age is "pizza", your name is the function "not", your account balance is a database connection. It's ridiculous to say the least and using a tool that makes that > 0% probability is just awful.
There are so many different typing systems, conflating all of them into "static type checking" in order to have something to pit against "runtime checks" is just not serious.
Clearly that's not what we think.
But yes, I agree with you about where fiat is used. It's almost always used by people that don't quite undersand the concept of value or that of money for that matter.
Money is not declared valuable by political authority. That is just not how it works. Crypto is what's declared valuable by fiat, ironically. Its value is described as derived in terms of a limited supply (it's just like Gold!)
Fiat currency derives its value from network effects, debts and the feeling of safety (or the lack thereof.)
But rest assured, the rest of the bugs are still around so you still need tests. Just not those.
I've worked like this for years now and there's just no turning back.
Do you know how many "null checks" and similar sanity checks are in my code? Close to zero. Do you know why? Do you think I'm a moron or because _those_ things are _actually_ impossible that way.
But rest assured, etc.
It simply cuts down on the amount of certainty that has to be incessantly (re)verified and tested.
Also: when you sit down to model your whole domain in this manner, do you know what you discover? All the things that would be anyway - just further down the line.
"Oh, we don't always have a contract number in these scenarios so _that_ case will have to have a constructor. Oh - that means that this purchase function has to stop "lying" about being able to process any invoice becauase some of them won't have a contract number. Shucks!"
How do you solve that? 4 000 lines of tests and 20 lines of assert hasContractNumber.
Neither of them have to be. All exchanges take place in pairs; one holding is exchanged for another. Buying BTC with dollars is (USD, BTC); buying Microsoft is (MSFT, USD); buying EUR with dollars is (EUR, USD).
Nothing prevents you from pricing Microsoft stock in BTC or BTC in EUR or Etherium.
The holding as such, however, is only a fiat holding when it is in fact either a (wad of) cash equivalents and/ or a bank balance.
There isn't a person on earth for which there is only two types of relevant holdings, in either USD or BTC. A person that (seriously) considers acquiring a crypto holding, such as BTC, is most likely choosing between other crypto currencies, gold or silver, primarily. Even more likely, they're merely FOMO-speculating as a complement to plain stock holdings.
The fact that a number of you don't seem to understand this should call your competency into question.
The fact that this parent has a number of children that don't seem to pick up on this is problematic to say the least.
"Getting rich via investment depends on having income above a threshold which is set by the cost of living."
It's just not necessary to talk about getting rich. Getting rich is not relevant in this context. You made claims that are blatantly false that are part of the ever tiresome either rich or poor-dichotomy.
Most people can save money and invest that money in a way that makes them shareholders.
There are more categories than the ultra rich and the incredibly poor. Stop that.
A lot of people can save 10-20% in stocks (such as via index funds.) A lot of people would rather not do this and still complain and point sticks at "the rich."
What can you do?
"The reason is that being a shareholder only matters for those already making a ton."
Is simply wrong and nonsensical. I don't make a ton, I am not ultra rich, it matters a lot to me to be a shareholder. It matters because that way I get to make money when "they" do.
EDIT: sure - downvote me all you want. The question is still around.