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

@mbtrhcs @spartanatreyu well Java Streams try to, but it's not too hard to get them to accidentally process too much, or even blow up completely.

(This isn't a comment on coding styles or the article though)

[-] mrkeen@mastodon.social 0 points 2 months 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 0 points 3 months ago

@agressivelyPassive if you routinely call indirections abstractions, then 'premature abstraction is the root of all evil' holds. If you separate the two concepts, you might think differently.

If my team's codebase had a business logic class that had a concrete dependency on an EntityBuilderFactory, I'd vomit a little, but I wouldn't delete it (can't piss off too many people all the time). But I would route around the damage by allowing the class to depend on the EBF *or* something else.

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

@agressivelyPassive moving from 'storing a user in postgres' to 'storing anything in postgres' is a step up in abstraction. Same with moving to 'storing a user somewhere' or moving to 'storing anything anywhere'.

Moving from 'storing an entity' to 'storing an entity via a FacadeBuilderFactory' is not a step up in abstraction, it's only an extra indirection.

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

@DmMacniel @vzq

> Given the nature of JS running only on a single thread.

No no, I think you found the language flaw.

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

@Kecessa no you missed my point. You change the behaviour of the producer, not the consumer.

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

@Windex007
> You as the writer, you don’t know either?
Not until the compiler tells me.

> Or is the argument that nobody but the compiler and god need know? That having an awareness of the types has no value?
No, I want to know, because knowing the types has value. If the compiler has inference, it can tell me, if not, it can't.

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

@Windex007

lexer :: Parser LexState (Vector Int, Vector Token)
lexer = do
(positions, tokens) <- _ nextPositionedToken
...

What goes where the underscore is in the above snippet?

[-] mrkeen@mastodon.social 1 points 7 months ago* (last edited 7 months ago)
view more: ‹ prev next ›

mrkeen

joined 1 year ago