Imagine, 3 level nesting calls where each calls another 3 methods, we are talking about 28 functions each with couple of variables, of course you can still clean them up, but imagine how clean code will look if you don't have to.
Just like garbage collection, you can free up memory yourself, but someone forgot something and we have either memory leak or security issues.
secretStash := NewSecretStash()
pString := secretStash.NewString()
....
....
secretStash.Thrash()
yes, you now have to deal in pointers, but that's not too ugly, and everything is stored in secretStash so can iterate over all the types it supports and thrash them to make them unusable, even without the gc running.The following Go code also works perfectly well, where it would obviously be UB in C:
func foo() *int {
i := 7
return &i
}
func main() {
x := foo()
fmt.Printf("The int was: %d", *x) //guaranteed to print 7
}In my experience, the average programmer isn’t even aware of the stack vs heap distinction these days. If you learned to write code in something like Python then coming at Go from “above” this will just work the way you expect.
If you come at Go from “below” then yeah it’s a bit weird.
even in C, the concept of returning a pointer to a stack allocated variable is explicitly considered undefined behavior (not illegal, explicitly undefined by the standard, and yes that means unsafe to use). It be one thing if the the standard disallowed it.
but that's only because the memory location pointed to by the pointer will be unknown (even perhaps immediately). the returning of the variable's value itself worked fine. In fact, one can return a stack allocated struct just fine.
TLDR: I don't see what the difference between returning a stack allocated struct in C and a stack allocated slice in Go is to a C programmer. (my guess is that the C programmer thinks that a stack allocated slice in Go is a pointer to a slice, when it isn't, it's a "struct" that wraps a pointer)
The first generation of Hybrid seeds are on average several times more productive than the second generation, yet they look the same. Further it’s much easier to gather a second generation of seeds than the first. Thus significantly worse product that’s cheaper to produce but looks identical barring genetic testing = counterfeit.
the first generation has a many sets of genes with "Highly Productive Dominant (HPD, my terms for this post) genes, Not so Productive Recessive Gene (NPR)". By inbreeding 2 lines for a while, one can end up with a strain that has both genes being one and thereby when you cross it with something else, you know the offspring will get its gene (as it really only has one). Therefore the first generation, will have many sets as what I described above and will 100% express the HPD of those pairs.
The 2nd generation though of seeds will have a randomized assortment of HPD/HPD, HPD/NPR, NPR/NPR genes. Therefore while 75% of the seeds expressed genes will be HPD on average, that's obviously less than 100% that one gets from first generation.
the supreme court in Harisiades v. Shaughnessy (1952) said communist party affiliation (even past membership) was reason to deport non citizens.
This is well known in legal circles. This isn't something hidden. A US Citizen can be a member of the communist party (same first amendment, right of assembly), while a non citizen doesn't have the same right.
One can argue that this decision was wrong. One can argue that it is immoral, but its well known, and any immigration lawyer should know this decision, and know the risks their clients are taking on by some actions of theirs.
Fundamentally, however, we know that the markets HP was in were not growth markets: PCs, printers, enterprise consulting, etc. The growth markets at the time were phones (Apple), software (Microsoft), and cloud services (Amazon, Google, etc.) Could HP have succeeded in any of those businesses?
instead they cut bait quickly. sold off WebOS to LG and that was it.
These asset backed loans are just regular loans with lower interest rates. So instead of getting $50M @ 11% they can get it at 4%. That's the extent of the "hack".
They then keep the ball rolling by refinancing at each expiry and just paying the interest (and hoping their assets maintain or increase in value)
Eventually those loans will need to be repaid and the money will need to come from realizing capital gains.
So if anything its a tax deferral scheme with a low interest rate and elevated liquidation risk. Which all raises the issue of being taxed twice on the same money. Taxes once when you take the loan against it, and taxed again when you realize the profit to pay the loan.
I have assets that have a single cost basis of $1
they are now worth $100.
I take a loan secured against 10% of them. I have now taken a tax event against 10% of them.
I now pay taxes on a capital gain of $90 on 10% of them.
I now have an asset split into 2 parts. one with a cost basis of $1 (90% of my assets) and one with a cost basis of $100 (as I paid taxes on a capital gain to $100).
One can perhaps argue that when levaraging unrealized assets for loans, one always uses the lowest cost basis assets for determining taxable event, or perhaps first in first out of taxable events (and therefore paying tax, is an out then an in).
What all of them avoid mentioning is that the images were intended by Microsoft for test and development purposes on Windows and the license clearly states you need a valid Windows license to use them: https://hub.docker.com/r/microsoft/windows#license
I wonder if Microsoft will take some action to enforce this if these projects become popular.
Edit: This comment is incorrect, see below comment from doctorpangloss
I'm wondering when it changed? (or perhaps I missed something back then)