[-] mrkeen@mastodon.social 0 points 5 days ago

@dandi8 @JackbyDev Most of the criticism in the article talks about side-effects using a far stricter (and imo more useful) definition than Martin did.

I tend to agree, and would avoid both side-effects and writing code like Martin. However this book targets the mainstream, and afaik the mainstream hasn't yet accepted the new definition of side-effect.

Martin has since embraced FP more than the mainstream. So he's somehow both ahead of and behind the curve.

[-] mrkeen@mastodon.social 4 points 4 weeks ago

@arendjr

  1. abstraction != indirection. Abstraction allows you to do a deferred architecture: store this user "somehow". Indirection is just early architecture with more steps: MyUserDatabase class is coupled to one way of doing things - it's concrete, not abstract.

  2. yet another article advocating 'pure functional' flavour, not a pure functional PL. Recommending purity in an impure language is like recommending memory safety in C. All the work is on the programmer.

[-] mrkeen@mastodon.social 6 points 1 month ago

@vitonsky this link is political. Do not click it! (You know, for security reasons)

[-] mrkeen@mastodon.social 4 points 2 months ago

@Kecessa @grue knowing that the source will be published discourages bad actors from putting crap into the program in the first place.

And if they do it anyway, other people can come along and repackage it without the bad bits, like vscodium.

[-] mrkeen@mastodon.social 10 points 3 months ago

@eveninghere @ruffsl that claim's correct. But so far it doesn't have great performance on a single core.

[-] mrkeen@mastodon.social 34 points 3 months ago

@errer @pro_grammer

I believe that the trick is not to show the developers the bill.

Let the developers all tell each other "it's cheap because you don't have to buy the servers; you only pay for what you use!"

Only managers see the real price.

[-] mrkeen@mastodon.social 34 points 3 months ago

@armchair_progamer

Awful naming. Forgetting the fortune 500 company you're already thinking of, there's already a Meta Lang, abbreviated to ML.

Besides that, does it have any 'meta' features? E.g. Homoiconicity?

[-] mrkeen@mastodon.social 4 points 4 months ago

@okamiueru @balder1993

It's an overloaded term:

"Dependency inversion" is a language-agnostic technique for producing testable, loosely-coupled software.

"Dependency injection" just means dependencies should be passed in through the constructor, instead of being magically new()'d whereever.

"DI frameworks" are Satan's farts. Classpath-scanning nonsense that turns compile-time errors into runtime errors. Not only is your Ctr still coupled to your Svc, but both are now coupled to Spring.

[-] mrkeen@mastodon.social 3 points 4 months ago

@onlinepersona

An enum is a sum type because the number of inhabitants of the enum is the sum of the inhabitants of its parts.

A product type's number of inhabitants is the product of its parts' inhabitants. So a struct would fit that definition, or a pair, or a tuple.

Looking at the pic on your Cartesian product link:
if A is an enum {x,y,z} and B is an enum {1,2,3}, then a struct AxB has 9 possible inhabitants.

[-] mrkeen@mastodon.social 16 points 4 months ago

@onlinepersona @armchair_progamer

A type has a number of 'inhabitants'. 'Sum' indeed corresponds to adding the possible inhabitants together.

A Boolean has two inhabitants - true and false. A byte has 256 inhabitants. A BoolOrByte type has 258 inhabitants.

If you have BoolByte pair, that's a product type - 512 possible inhabitants.

It may make no fucking sense depending on your exposure to Java, where Void (literally 'empty') has an inhabitant, and Boolean has 5.

[-] mrkeen@mastodon.social 3 points 4 months ago

@demesisx @lysdexic No safety issues mentioned around ReaderT. The speaker was talking about how stacking monad transformers mtl-style can generate unnecessary closures that GHC can't optimise away.

view more: next ›

mrkeen

joined 1 year ago