3 ms·
>Ultimately you're responding to a claim which says that there exist semantic errors, by saying that no, that's "a drastically limited idea" of what syntax can
by imanaccount247 12y ago
>Ultimately you're responding to a claim which says that there exist semantic errors, by saying that no, that's "a drastically limited idea" of what syntax can do
No I am not. I am responding to what you said, not what you want to invent after the fact. It is very simple, and is the difference between these two functions:
f :: Int -> Int -> Int -> Int -> Int -> Int
f :: Type1 -> Type2 -> Type3 -> Type4 -> Type5 -> Type6
- drostie 12y agoWell, let me encourage you to actually respond to what I said, then: > you have five Ints and you use the wrong one for an index In other words: f :: Int -> Foo doStuff :: Int -> Int -> Int -> Int -> Int -> Foo Of course that's abstract: I meant "you" as a programmer dealing with these functions and the ints might well be a low index, a high index, and the neighborhood of a pivot index, so it's called as: doStuff lo hi (p - 1) p (p + 1) and of course you probably wouldn't pass all three p's in -- but those are definitely three different Ints which you may have to keep track of. It sounds like your panacea here is to instead have the programmer write: doStuff' :: Lo -> Hi -> Pminus -> Pivot -> Pplus -> Foo The problem is, that `f` still has type `Int -> Foo` and there is still this huge semantic error of providing the wrong argument to f. So no, if you actually explicate what I said you indeed find problems much like what I "invent after the fact". Are you saying that `f` should not have input type `Int`? That input type is isomorphically non-negotiable: you're either going to write five `f` functions or you're going to have type coercions, and both ways have the problem. I really don't see anything you've said which alleviates it. If none of what I was saying was what you thought I was saying, that's OK, mistakes happen all the time. Then, I'd just ask: in your own words, what did you think I was saying when I said, "you have five Ints and you use the wrong one for an index"?
- imanaccount247 12y agoIf you didn't want to learn and were just posting FUD, then save everyone the time and say that after the first post. No need to act ignorant and try to drag things out in to some endless charade of pretending you don't understand so you can salvage your FUD.
- drostie 12y agoI would like to learn if there is something here to teach but after giving you several opportunities to explain yourself and only getting vague short comments, I'm not sure that I believe you have anything to teach. I don't have any desire to post FUD about Haskell. I like Haskell and it's probably my favorite language at the moment. What I posted was not FUD and these replies are not "salvaging" FUD. So, again: in your own words, what did you think I was saying?