Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
yw3410
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
91.
▲
by
yw3410
6y ago
We do this too - but the other problem you get is that Exception aren't treated specially (like Any and Nothing) in the inference hierarchy so errors are liable to "collapse" to Throwable or Exception. I like wrapping them wi
92.
▲
by
yw3410
6y ago
Sure - you can implicit srcloc or capture the Exception, both of which preserve it; but that's not the default behaviour and it's not what we recommend to beginners. If you go onto the scaladoc for Either today, you see a stringly
93.
▲
by
yw3410
6y ago
Yes - but you /also/ lose the stack trace and it's /far/ too easy to do; hence my OP. It is /infuriating/ to be knee-deep trying to work out which of your 30 Eithers failed with a non-descript error.
94.
▲
by
yw3410
6y ago
This is also the reason we have the convention in Scala as well - the inference to partially apply the type works in a certain way. But I agree with the parent post, a more descriptive name would be better.
95.
▲
by
yw3410
6y ago
ScalaJS is one of the projects which I don't understand why more people don't rave about. It's /extremely/ nice that I can have a single project which share code between them for validation; no need for swagger or O
96.
▲
by
yw3410
6y ago
Verizon's Scala projects are very cool - I wish that they got more limelight and documentation/support.
97.
▲
by
yw3410
6y ago
Yes, it is a side-effect - and does make the code impure; but it's an /exceptional/ flow like OOM, infinite looping, stack overflows which also break equational reasoning. My argument is that as a programmer you /choose&
98.
▲
by
yw3410
6y ago
Complete aside, but how is Swift these days? I used it literally a week after release and promptly stopped because the compiler kept segfaulting - I imagine it's more stable now?
99.
▲
by
yw3410
6y ago
It's easy; there's mill, maven and fury. Mill is quite good - but I've had to dive into the source code a few times to do things. If you're dealing with dependencies only, then it's a straightforward change. OTOH I&
100.
▲
by
yw3410
6y ago
I seem to remember Stefan Ziegler asking around the channels about questions relating to how to do certain features to uplift Slick. Don't know if anything came out of it.
101.
▲
by
yw3410
6y ago
DI in Java world is another example where people require this type of feature (unsafely) via reflection.
102.
▲
by
yw3410
6y ago
It's literally one feature - each of the different "ways" gets rewritten. It's why Scala 2 and 3 are able to maintain pretty good interoperability.
103.
▲
by
yw3410
6y ago
Scala 3 has type-classes as a core feature.
104.
▲
by
yw3410
6y ago
I am continually perplexed at the swallowing of exceptions in certain FP communities. Result types, Either et cetera make it extremely easy to swallow errors by flatMapping thoughtlessly losing the context of where they were - you typically
105.
▲
by
yw3410
6y ago
That's not entirely true though - the penalties for attempted murder are not the same as murder, for example.
106.
▲
by
yw3410
6y ago
Depends on the language, but a lot of them use guard clauses (so case ... if cond =>).
107.
▲
by
yw3410
6y ago
Unit tests, maybe not, but it's commonly accepted even in statically-typed communities that property-based tests are practically as good to guarantee properties which a stronger type-system would catch. For example in Haskell almost al
108.
▲
by
yw3410
6y ago
What? Discovery in Emacs is amazing; all the API is a keystroke away. Do you mean something else?
109.
▲
by
yw3410
6y ago
This is a very good post; kudos for writing it up. Another thing which may be nice to talk about is where the communities are for each language (Racket on Slack and the mailing lists, Common Lisp has an irc...).
110.
▲
by
yw3410
6y ago
If you want live image reloading stick to a Lisp like SBCL rather than Scheme. If you care about startup times or FFI then don't pick Clojure. YMMV between Racket and Guile; I would say Racket is better insofar as the culture of docume
111.
▲
by
yw3410
6y ago
Did a quick skim and dont see why not. There's examples to receive the message. It's up to you what you want to do with it afterward.
112.
▲
by
yw3410
6y ago
Don't get me wrong, my laundry list with SBT is huge - that single point was an example; but I have other points for make, cargo, cabal, stack etc... My question was what makes SBT uniquely bad when the topic of build tooling comes up
113.
▲
by
yw3410
6y ago
Whoa, this was a point about syntax (non-Algol vs. Algol) being overstated. Haskell and Idris absolutely fall in non-Algol languages that make people do a double-take. For the record I like lots of languages - dependent types are awesome. I
114.
▲
by
yw3410
6y ago
Sure; but half the problems apply to other build tools too, not just sbt. Take for example the point on syntax - is gradles groovy receiver syntax not just as esoteric as operator overloading?
115.
▲
by
yw3410
6y ago
I think your points are good. Another point I would add is abstraction is a tool for managing complexity, not a tool for reducing knowledge. You will have issues in that library/network/function/language. Learn to be comforta
116.
▲
by
yw3410
6y ago
Does programming in-school really count as programming in anger? I did a module on C++ at university but I'm not equipped to evaluate it.
117.
▲
by
yw3410
6y ago
Why do you think sbt is a bad build tool? I've used the build tools of almost all the major languages (JS/TS, Rust, Haskell, Kotlin, C etc) and I don't honestly see any which are particularly easy.
118.
▲
by
yw3410
6y ago
I use a variety of languages and always feel that Scala gets a bad-rap because it's a compromise language (though I feel the same about Rust and most people seem to like it). Scala 3 pros: + Higher-Kinds + Type-classes + Decent-ish
119.
▲
by
yw3410
6y ago
Only a relatively few amount of programmers have programmed in non-Algol syntax in-anger, rather than the reverse. How can you weigh up the pro or con of a syntax when you haven't used it much? I couldn't tell you whether APL synt
120.
▲
by
yw3410
6y ago
Please think a little about what you've said; that you'd rather a fellow human would be killed for less than 5 minutes of convenience for you.
More ›