Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
greener_grass
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
151.
▲
by
greener_grass
2y ago
F# actually does have a good solution for pattern matching here, which is Active Patterns.
152.
▲
by
greener_grass
2y ago
The intuitive definition of NonEmptyList is: type NonEmptyList<'t> = 't * 't list But this cannot be passed to any function that expects a List<'t>. This is odd though, since intuitively, all non-emp
153.
▲
by
greener_grass
2y ago
For Linux users it's a non-native look-and-feel or no app at all.
154.
▲
by
greener_grass
2y ago
Out of curiosity, why can't you return?
155.
▲
F# Computation Expressions, 'do' notation and list comprehensions (2020)
(github.com)
9 points
by
greener_grass
2y ago
|
0 comments
156.
▲
by
greener_grass
2y ago
Is there are correct way around? St -> (a, St) vs St -> (St, a) I've found both in the wild and it can be very confusing!
157.
▲
by
greener_grass
2y ago
In most languages, the value of an expression depends on two things: 1. The right-hand-side of the declaration 2. Where you are in program execution Consider this JavaScript: let x = 1; x += 1; x *= 3; What is the value of
158.
▲
by
greener_grass
2y ago
This requires iron discipline. Maybe with some kind of linter for Terraform / kubectl it could be done.
159.
▲
by
greener_grass
2y ago
Great in theory but in practice when you do K8s on AWS, the AWS stuff leaks through and you still have lock-in.
160.
▲
by
greener_grass
2y ago
expression-based programming Yes! This is the real win of functional over imperative languages. It means you can understand blocks of code in isolation and then compose them into larger blocks. Bottom-up programming. This is what is missi
161.
▲
by
greener_grass
2y ago
Relative to the overall population (programmers, listeners) both are tiny though!