Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Twisol
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
60 ms
·
601.
▲
by
Twisol
6y ago
C# delegates are a kind of COMEFROM, from a certain perspective, so it's not a universally bad idea. The problem is just that using it in conjunction with other kinds of control flow -- like the @Annotations + method calls approach we
602.
▲
by
Twisol
6y ago
> eg: Java annotations can change the behavior of a method from a simple getter to something else entirely with hooks to be used/referenced at runtime. To be slightly fair to Java, annotations don't themselves do anything to th
603.
▲
by
Twisol
6y ago
The 2006 paper "Out of the Tar Pit" also disagrees with Brooks' estimate of total accidental complexity, explaining their position in terms of {essential,accidental} {state,control}. One of their arguments is that accidental
604.
▲
by
Twisol
6y ago
Adapting your example to a component of a real project I'm working on: JsonParser<Customer> customerP = productP . field("customer", productP . field("name", stringP), . field
605.
▲
by
Twisol
6y ago
> I guess this is the "by hand" mapping that the article concludes with Not "the", "a". One of the comments under the OP itself links to another blog post [0] describing an alternative to explicit DTOs, whic
606.
▲
by
Twisol
6y ago
Sadly, I can personally attest that the problem does exist, and that not everybody is performing serialization in such a reasonable, decoupled way. It sounds like you agree with the article, but find its existence unnecessary. That's f
607.
▲
by
Twisol
6y ago
> You can use field names or you can encode the type alongside. Ex: > { “birthdate”: [“date”, “01-02-1991”] } > And then in your codebase you know that all the values in your data are actually a list of (type, value). In this speci
608.
▲
by
Twisol
6y ago
I didn't really read JSON as the core issue to begin with. In practice, JSON serialization libraries are used to map between domain objects and a JSON representation. The author notes that this really breaks into two problems, one of w
609.
▲
by
Twisol
6y ago
Aha! Opposite in that direction; I misread. (I'm also an engineer pushing back on managers who want microservices.)
610.
▲
by
Twisol
6y ago
On my reading, this is the exact same problem, not the exact opposite problem. The break-even bar for a reasonable monolith is a lot lower than for microservices, so the GP's question is specifically asking, under a hypothetical where
611.
▲
by
Twisol
6y ago
> Why do you think JavaScript has the word "Java" right in it. lol. Must have been something in there that was good to this very day. Eh, no. From the mouth of Brendan Eich himself [0]: > InfoWorld: As I understand it, JavaS
612.
▲
by
Twisol
6y ago
I work with Java in my day job; it's by no means my favorite language, but I can be quite productive in it. I haven't kept a tally of my frustrations with Java, but I can assure you that the most frequent is its lack of first-clas
613.
▲
by
Twisol
6y ago
To be fair, Java has always supported a particular flavor of sum types founded on subtyping: use an abstract class with a private constructor as a base, add nested static final subclasses for the variants, and decide whether to use instance
614.
▲
by
Twisol
6y ago
No, but I should! It's pretty low-hanging fruit as far as write-ups go...
615.
▲
by
Twisol
6y ago
> For anyone looking to implement a Prolog Paul Tarau has an interesting approach: Fascinating! I ended up designing my own Prolog virtual machine rather than mimicking the WAM, using a union-find address space to represent unified terms
616.
▲
by
Twisol
6y ago
The core of Prolog (Horn clause resolution) is not terribly difficult to implement, IMO. Learning how to implement unification with backtracking is an edifying experience!
617.
▲
by
Twisol
6y ago
You dropped this: [0] http://paulgraham.com/avg.html (Scroll to "The Blub Paradox", about a third of the way down.)
618.
▲
by
Twisol
6y ago
In Haskell, you often build pure transformations, and then lift them into an effectful context. If I have a function `String -> [String]`, say to parse a line of CSV into its elements, I can lift that to `IO String -> IO [String]` u
619.
▲
by
Twisol
6y ago
You don't get any information from `IO _` functions, but that's the case with every mainstream language, where you have an implicit `IO` on every single function. The benefit is not in `IO` -- its that its absence on a functio
620.
▲
by
Twisol
6y ago
I've profitably used the domain modeling and program design lessons I've learned from Prolog multiple times, please and thank you. You don't need to use a language in production for it to be a valuable addition to your toolki
621.
▲
by
Twisol
6y ago
In other words... just because there's a correlation between things being correlated and things not being causally related, that doesn't mean that correlation causally implies acausality?
622.
▲
by
Twisol
6y ago
In section 2.10, "Privacy for extensibility", are there any pros and cons to this approach over using the #[non_exhaustive] attribute? The latter works on both enums and structs, and doesn't require extra fields to be include
623.
▲
by
Twisol
6y ago
> as a result, seeing how eliminating state is far from the only way to tame it. I agree! Elimination is but an extreme form of control :) I have strong hopes that logic programming will provide the next generation of formal tools for co
624.
▲
by
Twisol
6y ago
Whilst trying to avoid the "No True Scotsman" fallacy, I'd argue that this system is FP only in name, but not in spirit. Even in Haskell, you can spend all your time in the IO monad and use IORefs as shared mutable cells, but
625.
▲
by
Twisol
6y ago
Oh, I see! Yes, the "continuation" I'm referring to is the "remaining reduction". I like to think of FP programs proceeding by reduction, so there's no need to introduce any auxiliary state just to describe the
626.
▲
by
Twisol
6y ago
'tel said the same thing, and I can see it both ways. But I don't think it helps me much to simply state the opposite position -- you don't give me much to reply to :)
627.
▲
by
Twisol
6y ago
As an addendum, you may like to see what my thoughts are on formalizing the modularization of software systems. As noted elsewhere, I frame it in terms of concurrent systems. https://news.ycombinator.com/item?id=25567740
628.
▲
by
Twisol
6y ago
I'm not especially familiar with either MVars or STM, so you'll have to make do with my first impressions... MVars seem most useful for a token-passing / half-duplex form of communication between modules. I've implemente
629.
▲
by
Twisol
6y ago
Ah, yeah, I reminisce on that thread every now and then. No, I don't have it muted. I was one of the more moderate voices, as I recall. (See my sole subsequent post, where I expressed interest in seeing the approach come to fruition, t
630.
▲
by
Twisol
6y ago
I'm guessing "splat" is the key with the clover shape on a Mac where a PC would have a Windows icon.
More ›