Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wellpast
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
50 ms
·
451.
▲
by
wellpast
9y ago
Rich comes down hard here on statically typed languages, but before the static typers get too offended, his main attack is on the overuse of ADTs/classes to build information processing systems (i.e., what a majority of us industry pro
452.
▲
by
wellpast
9y ago
I really appreciate the conversation as well. I guess my parting thought would be that this doesn't need to be that obscure. What seems to be implied in our conversation here is that the statically typed language is not introducing any
453.
▲
by
wellpast
9y ago
> Tests, types, and code review are the three major tools I've seen aimed at this problem. I did a job for a defense contractor once that brought the entire team of 10 into a room to code review page by page a printed out copy of th
454.
▲
by
wellpast
9y ago
Precondition: complex numbers are not supported. Unspecified behavior.
455.
▲
by
wellpast
9y ago
This is not railing. I think Haskell is supremely cool. But what we're talking about (I think) is solving a specific optimization problem. We are not talking about solving type-check puzzles for their own sake. What I am after is this:
456.
▲
by
wellpast
9y ago
What you did here is very opposite from what real-world dev looks like. Here, you picked a `foo` so that the type checker could find consistency. Typically in the real world, the customer or product manager asks for the thing-of-value. Th
457.
▲
by
wellpast
9y ago
> having the compiler remind me the places I need to update (such as pattern matches) What you're calling a reminder is not just a reminder; it's a requirement -- you are obligated to go update those places in your code be
458.
▲
by
wellpast
9y ago
I'm a bad product manager. The % should round the value to a tenth and then concat. This is a silly example, of course, but the real world isn't short on creativity/silliness.
459.
▲
by
wellpast
9y ago
But this is the point. My Clojure program is valuable/effective/per-spec without the type burden. So the type burden has slowed my delivery. And that "one single place" is for this trivial toy program. Now imagine the
460.
▲
by
wellpast
9y ago
DropVox, and then configure Evernote desktop to auto-import and remove/cleanup the audio file/s at the same time.
461.
▲
by
wellpast
9y ago
55 % 102 would produce 55102 I made it up.
462.
▲
by
wellpast
9y ago
That is an interesting preference. I usually hear it the other way. That people would prefer to start dynamic when they understand the problem/domain the least and then move to static types when they become more sure about the taxonomy
463.
▲
by
wellpast
9y ago
I think the extra piece of this is to have the right feedback measures in place and then try everything ; that is, at least don't keep doing the same thing that isn't working. It's like a search tree. A good mentor can help
464.
▲
by
wellpast
9y ago
I'm going to assume that if you take 10 times longer to respond to this than it took me to respond to you, then my "orders of magnitude" claim has been proven. (...friendly joke, of course.)
465.
▲
by
wellpast
9y ago
They are specified in the definition of the operators. Define a new operator '%' that concatenates two numbers together and then show me how in Haskell you would do: myfun x y = x ^ 2 % 2 * y * x - y ^ 2
466.
▲
by
wellpast
9y ago
I agree 100% with this. So if what you're saying here is that in Haskell that this choice is mine, that I can always completely avoid having to choose static verification if I so choose (ie, I can get it a la carte ), then that is jus
467.
▲
by
wellpast
9y ago
Okay, before I say 'you win', can you show me this in Haskell: ; -- the program -- (defn add* [x y] (+ x y 1)) (add* (read) (read)) ; -- repl demo -- 3 40.1 44.1
468.
▲
by
wellpast
9y ago
Here is a Clojure program: (defn add [x y] (+ x y)) (add (read-string) (read-string)) Clojure doesn't compile, so I can run this program just as it is. In Haskell, this isn't sufficient. I have to say something about t
469.
▲
by
wellpast
9y ago
Well then what is your criteria for having a String that can represent both English spellings of numbers and a String that represents roman numerals. If you say "I choose just String. I.e., I overload String to contain both types of
470.
▲
by
wellpast
9y ago
I was simply responding to Drup's "the fact that types are dynamic doesn't mean you don't have to think about them"... If you're telling me you don't have to think about types, then you and I are on the sa
471.
▲
by
wellpast
9y ago
I guess it doesn't really matter. In Clojure "+" is namespaced, so if I need to have it support a broader range of inputs, I could just switch my usage to "new-+", or I could call my new version "+" and im
472.
▲
by
wellpast
9y ago
> I'm always going to favor the option with the best static type system, because I know it's going to help me (and anyone else working on the system, especially newbies) keep things sane This is the usual general claim from one
473.
▲
by
wellpast
9y ago
> For Rich's argument to resonate with me, I think I just need a good example of what he's talking about Let me go through some work I just went through. Scrape web blog post, generate some semantic data about the post, send th
474.
▲
by
wellpast
9y ago
> However, I bet MILLON TIMES that truly everyone wanna: > - To have both static types for the code that is in the past/stable and dynamic for now. Static when things are settle and dynamic when not. And move between boths with f
475.
▲
by
wellpast
9y ago
Well articulated. 1: The inference allows me to express that part of my program without thinking about types. But somewhere in Haskell (or what-have-you) I have to express the types so that the compiler (type-prover) can do its proof-thin
476.
▲
Static Types are Coupling?
(lantana.io)
2 points
by
wellpast
9y ago
|
0 comments
477.
▲
by
wellpast
9y ago
It's not just about "writing type signatures". It's about expressing the semantics of your solution to some business problem. When my product manager comes to me and says "I want a button here that when you press it
478.
▲
by
wellpast
9y ago
It depends on what you're trying to express to the computer. Are you trying to say plus two integers -- if you are trying to say something specific about the types -- then you have to say types to be precise. But if all you're d
479.
▲
by
wellpast
9y ago
And more: Suppose your types are Strings. And your plus operator can add "one" and "two", but fails adding roman numeral "I" and "II", my guess is you'll another type/ADT into your static ty
480.
▲
by
wellpast
9y ago
Another way to think about this. When you and I are defining "plus" in this way, you may be thinking types (and how they are inferred and everything). I am simply saying I want "plus" semantics to be identical to &qu
More ›