Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Iazel
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
1.
▲
Beyond Market Economy: a feasible alternative
(babelsociety.org)
1 points
by
Iazel
4y ago
|
0 comments
2.
▲
by
Iazel
5y ago
I see and I would love for this to become a standard :D But I guess that will require quite some time and a lot of luck
3.
▲
by
Iazel
5y ago
Cool, didn't know that, thanks for sharing!
4.
▲
by
Iazel
5y ago
I see, but isn't that true for any library? xD In the end, `Parsed` should only be handled whereever you receive the initial input, so the rest of your business logic will be free of it :) In the end, this is just a tool and it's
5.
▲
by
Iazel
5y ago
I guess it depends on how you structure your code. If you validate at constructor level, then you have this problem. However if you actually parse it , then this will have to be external to the actual class and you are left with a simple V
6.
▲
by
Iazel
5y ago
Hey, I fail to see how this is suboptimal. Some points I don't understand: * What's the goal of a validation that always succeed? * What's the value of checking constraints after you parsed it and not capture this informati
7.
▲
by
Iazel
5y ago
Interesting, would you mind explaining why parsing and validation are two different concerns?
8.
▲
by
Iazel
5y ago
Hey there, I wonder if this article I wrote about the same concept would make it more clear? It's on medium, but free :) https://pelligra-s.medium.com/parse-dont-validate-in-kotlin-... I honestly think the two argument
9.
▲
by
Iazel
5y ago
I'm using Kotlin and still PHP in some legacy part at work, but whenever I can in my free-time I use Haskell, Elm and read about FP concepts. What about you? :)
10.
▲
by
Iazel
5y ago
Fair point, thanks for calling it out. I should have said "statically checked, strongly typed languages"
11.
▲
by
Iazel
5y ago
Talking about "parsing", I see that different people have a different understanding of it. I will fix this point by writing in the README what we mean when we way "parsing" :) Allow me to disagree with the "tracking
12.
▲
by
Iazel
5y ago
If that style works for you, please be my guest! As usual, this library is just a tool, it may or may not fit your use case, and that's fine ;) By no means we want to pass the message that you have to use this library to benefit from
13.
▲
by
Iazel
5y ago
Hey, thanks for starting this discussion, I think it will be an interesting one :) 1) Just to be clear, when I read "serialise" I understand that you want to parse some object into a format suitable for storage. I would honestly g
14.
▲
by
Iazel
5y ago
I see, thanks for sharing. I will improve the README by adding a clear definition for parsing, validation and deserialization, so that we can all be on the same page ;)
15.
▲
by
Iazel
5y ago
I see, that would be problematic indeed. I strongly believe in Bounded Contexts, a concept from Domain Driven Design. As for the Ubiquitous Language (ie: product & engineers naming things the same way, code included), parsing logic shou
16.
▲
by
Iazel
5y ago
Yeah, I've also worked with weak type systems in the past too (PHP, Ruby, JS), so I can definitely share the pain! I learned the hard way how much easier it is to build complex systems when you have a compiler helping you ;)
17.
▲
by
Iazel
5y ago
I see, this is also an interesting approach and definitely have its usages. Thinking about it, though, it has its own limitations when it comes to scalability and business requirements naturally out from the database box, eg: how would you
18.
▲
by
Iazel
5y ago
Well said! I would only like to add that I highly discourage adding validations/assertions in the actual data class, this often make them hard to work with and reuse. It is better to have this parsing logic as a simple function, perhap
19.
▲
by
Iazel
5y ago
Cool to see you perfectly got the point in the end! I wonder though, were you confused by the README? What made it clear for you?
20.
▲
by
Iazel
5y ago
Hi skybrian, would you mind explaining why do you see this as a framework? About missing interesting parsers, you are right, for now only the core part is done. Based on community interest, we will work on complementary packages, like more
21.
▲
by
Iazel
5y ago
Yes, it is basically a combination of proofing some data has been validated by encoding this proof in a specific type, like Email :) We want to popularize this idea and make it easier to work with it by offering some nice, type-safe abstrac
22.
▲
by
Iazel
5y ago
hi, @cle! Curious to hear more about that, were they actually running validation/assertions in constructors?
23.
▲
Parsix: Parse Don't Validate
(github.com)
153 points
by
Iazel
5y ago
|
107 comments
24.
▲
CRUI – Composable Reactive UI
(medium.com)
3 points
by
Iazel
7y ago
|
0 comments
25.
▲
by
Iazel
11y ago
Pff... Some hikkikomori hasn't leave is room for 5+ years!
26.
▲
by
Iazel
12y ago
I can't find any way to calculate days in month using Zeller's Congruence °_° That's seems to calculate only the day of the month (and it's awesome!). Even the Java program use a fixed array to output the days in month!