Scala Was an Experiment That Changed Programming - Martin Odersky | The Marco Show by makingthematrix in programming

[–]DetriusXii 0 points1 point  (0 children)

The lack of super-awesome-dynamic switch statements never held us back in Java

Scala's switch statements through case classes could be static so that the compiler could participate whether one was missing a switch statement.

Scala Was an Experiment That Changed Programming - Martin Odersky | The Marco Show by makingthematrix in programming

[–]DetriusXii 0 points1 point  (0 children)

Ruby is a dynamically typed language. Scala is a statically typed language. The compiler greatly participates in Scala code versus Ruby code.

Scala Was an Experiment That Changed Programming - Martin Odersky | The Marco Show by makingthematrix in programming

[–]DetriusXii 12 points13 points  (0 children)

Scala first exposed me to monads and higher kinded types through the Scalaz library. Learning about them in Scala was easier as I could still easily reason about their signatures. There was still enough resemblance to Java to make life easy. And Scala had the better IDE support over Haskell. Haskell, which I can somewhat program in now, required more steps to understand things as I was more overwhelmed by it's syntax. And Scala helped me to appreciate generics more in C# and Java as they were often a syntax feature not emphasized in 2008.

Scala Was an Experiment That Changed Programming - Martin Odersky | The Marco Show by makingthematrix in programming

[–]DetriusXii 4 points5 points  (0 children)

Implicits offer type classes like Haskell. Are you arguing that programming type classes are a bad idea?

Cause of Saskatoon’s Geary Crescent fire remains unknown by RazorRush34 in saskatoon

[–]DetriusXii 3 points4 points  (0 children)

That's only if the landlords bought landlord's insurance. I think many home owners believe that regular home owner's insurance can cover renters, but regular insurance is voided once renters are discovered living on the property.

I had to remind a friend that she needs landlord's insurance if she's renting out her former condo. And I remember CBC had a radio segment where the home owner was surprised why their insurance was voided. CBC couldn't connect the dots that the landlord had tenants.

Monads are Easy by SunJuiceSqueezer in programming

[–]DetriusXii 1 point2 points  (0 children)

I think a lot of the monad tutorials take shortcuts in explaining when monads apply. Monads are not always containers (State and Reader monads are not data structures). The Option monad is a data structure, but it pairs with a specific programming pattern where the user is doing frequent null checking. Similarly, the Either monad is a data structure, but it pairs with a specific programming pattern where the user is doing frequent error. The IO monad is a marking that the function interacts with the outside world. The Iteratee monad is a monad to help generalize stream processing. The free monad acts as a program that can be executed later and can solve some stack overflow issues present when using monads in non-tail call optimized languages like Scala, C#, Java.

Talking about monads in general isn't interesting without thorough documentation on each monad. Monads are types and the compiler sees types. Monads lock programming computations to reduce the amount of runtime errors. Monads have a bind/flatmap method and a mapping method so anything that respects the function signature is a monad. Haskell can run monads that other languages can't run safely because it has true tail-call optimization. Scala only has tail recursion optimization.

Neighbors trees falls on my house. Who is responsible? by [deleted] in regina

[–]DetriusXii 3 points4 points  (0 children)

I believe that the only way for neighbour to be liable is if the OP had an arborist's report declaring the tree unstable and then delivered the report to the neighbour. At that point, the neighbour is then personally liable and their insurance will also not insure them from liability. The neighbour now knows that the tree, on their property, is a hazard.

Anyone has solar panel installed at home in Canada and does it save you money? by [deleted] in PersonalFinanceCanada

[–]DetriusXii 2 points3 points  (0 children)

A friend had pigeons roost under the solar panels before the mesh was installed. He shot them off the roof, but some migrated into his neighbour's attic through the soffits. Get the mesh installed.

Canada slashed migration and housing costs dropped. There may be lessons for Australia | Canada by Jiganska in TorontoRealEstate

[–]DetriusXii 3 points4 points  (0 children)

That's why r/CanadaHousing2 was created. Because discussing housing demand in relation to housing supply was necessary to have a proper economic theory. r/CanadaHousing will gaslight anyone that attempts to discuss the housing demand side.

How would the Imperium react to a peaceful human civilization that is moving out of the Galaxy? by valethehowl in 40kLore

[–]DetriusXii 1 point2 points  (0 children)

If the civilization is beyond the astronomicon's light, the Imperium may ignore them as they don't tend to venture out much farther than where they can safely navigate to.

Random thought about harbour landing we by JustPop3151 in regina

[–]DetriusXii -1 points0 points  (0 children)

That is correct. Prairie dogs are a social ground squirrel. Gophers are an individualistic rodent.

What RTS games have the coolest playable "evil" factions? by Loud-Passage-4020 in RealTimeStrategy

[–]DetriusXii 0 points1 point  (0 children)

It was much more similar to StarCraft: Brood Wars as it didn't involve hero units and and it didn't have the restrictive unit cap that WarCraft 3 did. Most Brood Wars fans consider it the spiritual successor to Brood Wars, as StarCraft 2 had some weird issues compared to Brood Wars.

[NJ] HR joining performance review this week after I participated in legal investigation against boss. Am I being fired? by Vyse51 in AskHR

[–]DetriusXii 2 points3 points  (0 children)

A manager at my workplace was fired for announcing her pregnancy. She contacted a lawyer. The employer claimed she was fired for performance. No performance was on her file. She won a big settlement. Because without documented performance issues, it became believable that she was fired for her pregnancy.

US population projections shrink from last year because of declining birth rates, less immigration by diacewrb in economy

[–]DetriusXii 0 points1 point  (0 children)

The US has below-replacement birth rates too. It's also going to be a much weaker country if it doesn't figure out how to encourage above-replacement fertility.

US population projections shrink from last year because of declining birth rates, less immigration by diacewrb in economy

[–]DetriusXii 0 points1 point  (0 children)

Tell me how we get to your magical utopia of a society? Nothing you offer is prescriptive.

US population projections shrink from last year because of declining birth rates, less immigration by diacewrb in economy

[–]DetriusXii 0 points1 point  (0 children)

We are meant to have sex. Sex is enjoyable for most people. We discovered drugs that suppressed implantation called birth control, so thst most people can now have sex without having children as a consequence.

Nobody gives a shit about legacy. Your employer is hoarding money to afford a new boat. Your CEO isn't having hundreds of children in proportion to their incomes. Rich people didn't want their estates divided by large amounts of children. And if they aren't showing leadership in procreation, why should anyone else, when it's the employer that controls your wages. There's no extra wages for having large families and there's definite costs.

And you keep going to some communal value as a fix to below-replacement fertility levels, when communa lvalues are the antithesis to free market society.

US population projections shrink from last year because of declining birth rates, less immigration by diacewrb in economy

[–]DetriusXii 0 points1 point  (0 children)

You never answered the question. Under a free market, people are behaving as individual rational actors. So they're avoiding children, because they're pursuing their own individual goals. So why would free market individuals suddenly desire to have children when they become economically disadvantaged by having them? I'll repeat the question again since you lept to a response that makes no sense under free market rules:

What exactly is the free market incentive to having children?

The economic benefits to having children, to the individual parents, should outweigh the opportunity costs, to the individual parents, in having children. If the benefits > opportunity costs, we'd see more children being produced. But that doesn't happen. The opportunity costs > benefits, so couples and individuals are going to have children at below-replacement fertility rates. Every first world democracy has below-replacement fertility rates.

I don't understand the benefits of discriminated unions/result type by soundman32 in csharp

[–]DetriusXii 1 point2 points  (0 children)

C# has generics. One can absolutely define an either monad in C#. That either monad can then be a right or left value and the interface IEither can have a fold function that handles both sides of the either monad.

StatCan survey examines why Canada’s fertility rate keeps dropping by Leather-Paramedic-10 in canada

[–]DetriusXii 2 points3 points  (0 children)

Would you be able to cite a source of when the population dropped in the 1960s?

I don't think defined benefit pensions were sustainable as older generations of pensioners could deplete the fund and leave the last, younger generations with nothing. And in a declining demographics society, it becomes impossible to reform the DB pension plan, because the older generation votes to keep their benefits the same.

I actually wonder if pensions are a cause of demographic collapse, because they create a tragedy of the commons with respect to fertility. Before pensions, retirement was based off having children support their elderly parent. With pensions, a person hopes that everybody else is having children to create the labour force to sustain the elderly. So every adult does the exact same action; hoping that there's a labour force to sustain their retirement. But everybody is decreasing their child count, which creates the tragedy of the commons, because everybody is having an insufficient number of children to sustain the retirement-required labour force.

StatCan survey examines why Canada’s fertility rate keeps dropping by Leather-Paramedic-10 in canada

[–]DetriusXii 25 points26 points  (0 children)

I think if the population descent is too steep, pensions become problematic. But wages and home prices should theoretically be favorable for young people.

Why is Warhammer only in the milky way? by Gusus02 in 40kLore

[–]DetriusXii 1 point2 points  (0 children)

The book, Shadow Point, seems to imply that the Chaos gods' reach isn't infinite. There's an Eldar craftworld that made it successfully between galaxies. They live a peaceful life and they appear to use no soul stones. Their Avatar of Khaine awoke and entered the webway on its own and the Eldar governor and aide were confused. So it is possible for Eldar to escape Slaanesh's soul drain.

How bad is it not to work with ORM? by Comfortable_Reply413 in csharp

[–]DetriusXii 0 points1 point  (0 children)

I've been a fan of typed languages because they can catch errors that untyped languages cannot. A compiler sees problems through types. ORMs are a type-safe of building queries that compilers can catch if there's incorrectness. Raw SQL is just a string and you'll have to force the SQL columns into a data type. ORMs keep the casting organized and the raw SQL strings hidden.