Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lptk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
lptk
2y ago
Genuine question, as I'm not up to date with C#'s recent developments: can C# do this? if e is ... Lit(value) and Map.find_opt(value) is Some(result) then Some(result) ... where the `...`
2.
▲
by
lptk
2y ago
It's currently badly outdated. There's one specifically for the UCS at https://ucs.mlscript.dev/
3.
▲
by
lptk
2y ago
PS: there's another point being made on Reddit about cond's right-shift problem: https://www.reddit.com/r/ProgrammingLanguages/comments/1g127...
4.
▲
by
lptk
2y ago
Also check out my other answer here: https://news.ycombinator.com/item?id=41901573
5.
▲
by
lptk
2y ago
Just check out the paper's Motivaton section (2). In ML you can't write something like this: if e is ... Lit(value) and Map.find_opt(value) is Some(result) then Some(result) ... where the
6.
▲
by
lptk
2y ago
As mentioned in a response to a sibling comment, we plan to support `or`, which should address the problem you mention. (If not, would you have an example of what you mean?) > I worry that the semantics around exhaustiveness and mutable
7.
▲
by
lptk
2y ago
We definitely want to get into that! Unfortunately it's not completely straightforward. A simple desugaring doesn't work due to our support for intermediate bindings and computations, which we don't want to recompute.
8.
▲
by
lptk
4y ago
Here the `Allocate` effect is just a syntactically-lightweight way of doing dependency injection, right? Similar to a Haskell type class. I don't see why you'd need to make it an algebraic effect, as it does not need to mess with
9.
▲
by
lptk
4y ago
That's obviously nonsense. Java, one pair of parens: int x = 1; int y = x + 1; System.out.println(y); Clojure, six pairs of brackets: (let [x 1 y (+ x 1)] ((. (. System out) println) y))
10.
▲
by
lptk
4y ago
Your idea of what FP means is completely nonstandard. For the record, there is not one accepted definition, but we can get close by saying that FP languages are those based on lambda calculus as their semantics core. And the primary mechani
11.
▲
by
lptk
6y ago
They almost certainly run into these issues, but like most of the community, they probably think the cost is well worth bearing, given the advantages the language gives you. Once you're used to the way it works, and if you're usin
12.
▲
by
lptk
6y ago
Worth noting that the presenter of this talk has done a complete 180 on subtyping as he's now using subtyping and variance in the core of his flagship library ZIO. He realized it was sometimes better to use the language's strength
13.
▲
by
lptk
6y ago
(I'm not the person you were asking, but:) The power of Haskell's type classes comes from two things: * Implicit composition of instances: you can write `show [True, False]`, which will automatically/implicitly compose the `S
14.
▲
by
lptk
6y ago
> but parallelism is also a base fact of many problem domains, where you have multiple agents (up to and including humans) collaborating and interacting simultaneously. I don't think parallelism is the word for that. More like concu
15.
▲
by
lptk
6y ago
> the functional perl approach here I also find confusing so there is no attempt to distill the essence of what's going on Sorry to hear that! I guess it depends on your preferences. Personally, I have a pretty "operational&quo
16.
▲
by
lptk
6y ago
> It would be difficult to just stumble on a system like Simple-sub without that guidance Actually, I'm not sure it would be that hard (Simple-sub author here). If you look at the core of the algorithm closely, you'll see it&#x
17.
▲
by
lptk
6y ago
Hi, author here. Just wanted to say that you should read the paper rather than the blog post, as the paper is more recent. It's in open access (and CC-BY license) here: https://infoscience.epfl.ch/record/278576
18.
▲
by
lptk
6y ago
I think it's safe to say that the inspiration for Java lambda almost certainly did not come from the "FP zeitgeist" you're describing, but simply from other JVM languages like Scala and Clojure, which showed how useful t
19.
▲
by
lptk
8y ago
> building for papers and PhDs rather than real customers > the community takes a good hard look at itself to see what it can improve This has already been happening for a while. FYI, the Scala center is entirely dedicated to improvin
20.
▲
by
lptk
8y ago
If by "all constructions wiht HKTs", you mean what can be done with HKTs in Haskell, then I'd say yes. It is well-known that ML modules provide a very advanced level of expressiveness, especially since OCaml's introducti
21.
▲
by
lptk
8y ago
> The first example disproved ionforce's claim that default values cannot be constructed dynamically. But I don't think that is what they meant. I think they meant something along the lines of what I said above: > an express
22.
▲
by
lptk
8y ago
What does this have to do with the original assertion that "one of Odersky's motives in creating Scala was bringing the power of Haskell into the JVM world"? AFAIK, Odersky doesn't particularly like people trying to repl
23.
▲
by
lptk
8y ago
> Haskell's key innovation over ML was HKTs In fact, ML modules have had higher-kinded types [1] since before Haskell even existed. I guess Haskell's main innovation in this domain is really its very convenient higher-kinded pa
24.
▲
by
lptk
8y ago
Your example of nested functions with default arguments does not correspond to what derived implicits do. As a result of implicit resolution, an expression with an arbitrary number of subexpressions may be synthesized, the shape of which de