Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The list monad is awesome

Name: Anonymous 2011-10-17 14:44

sqrtM x = [sqrt x, -sqrt x]

addOne x = return $ x + 1

f x = do y <- sqrtM x
         z <- addOne y
         sqrtM z

*Main> f 0.5
[1.3065629648763766,-1.3065629648763766,0.5411961001461969,-0.5411961001461969]

Name: Anonymous 2011-10-17 15:37

Haskell
- Just like C++, Haskell is very hard to learn, and takes years to master. Things like Monads, Functors, Monoids, Higher-Order Types and a myriad of morphisms are hard to understand, especially without mathematical background. So most programmers probably don't have the ability or will to learn Haskell. Learning Haskell's syntax, libraries, functional programming techniques won't bring you closer to understanding: the true path to understand Haskell lies through Monoid-Functor-Applicative-Arrow-Monad. And even if you mange to learn Haskell, programming it still hogs a lot of brain resources, which could have been put to something more useful than just showing off about how clever you can be. "Zygohistomorphic prepromorphism: Zygo implements semi-mutual recursion like a zygomorphism. Para gives you access to your result à la paramorphism." -- HaskellWiki
- Haskel is slow and leaks memory. GHC's inefficient stop-the-world GC does not scale. A good understanding of evaluation order is very important for writing practical programs. People using Haskell often have no idea how evaluation affects the efficiency. It is no coincidence that Haskell programmers end up floundering around with space leaks that they do not understand. "The next Haskell will be strict." -- Simon Peyton-Jones
- Haskell's API lacks higher levels of abstraction, due to absence of variadic functions, optional arguments and keywords. Macros aren't possible either, due to overly complex syntax of Haskell. API documentation is very lacking: if you want to use regexes, you start at Text.Regex.Posix, seeing that =~ and =~~ are the high level API, and the hyperlinks for those functions go to Text.Regex.Posix.Wrap, where the main functions are not actually documented at all, so you look at the type signatures, trying to understand them and they are rather intimidating (class RegexOptions regex compOpt execOpt => RegexMaker regex compOpt execOpt source | regex -> compOpt execOpt, compOpt -> regex execOpt, execOpt -> regex compOpt where). They are using multi-parameter type classes and functional dependencies. The signature really wont give you any clue to how to actually use this API, which is a science in itself. Haskell is a language where memoization is a PhD-level topic.
- Haskell programming relies on mathematical modelling with type system (a version of mathematical Set Theory). If one does not use the type system for anything useful, it obviously will be nothing but a burden. Programs are limited by the expressiveness of the type system of the language - e.g. heterogeneous data structures aren't possible w/o reinventing explicit tagging. All that makes Haskell bad for prototyping or anything new, due to need of having design document with all types beforehand, which changes often during prototyping. Any complex project have to reinvent dynamic typing. For instance, Grempa uses dynamic typing because the semantic action functions are put in an array indexing rule and production numbers (Ints) to functions, and they all have different types and so can not be put in an ordinary array expecting the same type for each element.
- The IDE options cannot be as good as those of dynamic programming languages, due to absence of run-time information and access to running program's state. Haskell's necrophilia forces you to work with "dead" code. Like other static languages, Haskell isn't well-known for its "reload on the fly" productivity. No eval or self-modifying code. Haskell code can't be changed without recompiling half of application and restarting the process. GHCI - is the best Haskell's interactivity can get, and still wont allow you to change types during runtime, while the single assignment semantics prevents redefinition of functions. As said Simon Peyton-Jones, "In the end, any program must manipulate state. A program that has no side effects whatsoever is a kind of black box. All you can tell is that the box gets hotter."
- Type system produced compile-time and link-time errors are distracting and make it harder to run and test your code, while type-checking isn't a substitute for testing, it is about correspondence to mathematical model, which has nothing to do with correctness - i.e. two numbers can be integers, but their quotient can still result into division by zero. Even though you may hear strong static-typing advocates say, "When your program type-checks, you'll often find that it just works", this is simply not true for large, intricate programs. Although type-checking may help you find model-related errors, it is not the same as testing.
- Absence of dynamic scope, implicit open recursion, late binding, and duck typing severely limits Haskell, since there are things that can't be done easily without these features: you can't implement dynamic scope in general (and be type-safe) without converting your entire program to use tagged values. So in this respect, Haskell is inferior to dynamic typing languages.
- Haskell makes it easy to write cryptic programs that no-one understands, not even yourself a few days later. Rich, baroque syntax, lazy evaluation and a tradition defining an operator for every function - all help obfuscation a lot. As a general rule, Haskell syntax is incredibly impenetrable: who in their right mind thought up the operators named .&., <|> and >>=?

Name: Anonymous 2011-10-17 15:42

>>2
Get out.

Name: Anonymous 2011-10-17 15:54

>>3
When you teach someone how to perform creatively (ie, associate dead symbols in new combinations), you expand his potential for experiencing more widely and richly.

Name: Anonymous 2011-10-17 16:17

>>1
-sqrt x
Is that "(-sqrt) x" or "-(sqrt x)" or "' ' - sqrt" ?

Name: Anonymous 2011-10-17 16:22

>>5
Function application has the highest precedence, it's the second.

Name: Anonymous 2011-10-17 16:40

binary triples 111 umad?

Name: Anonymous 2011-10-17 16:57

>>7
Fuck off.

Also, check mine.

Name: Anonymous 2011-10-18 2:39

[m]<--- octal dubs motherfucker step the fuck back and recognize

Name: Anonymous 2011-10-18 5:08

>>9
Can you do dubs with Pi as base?

Name: Anonymous 2011-10-18 5:12

real dubz

Name: Anonymous 2011-10-18 11:16

<-- ultimate dubs
12 is dubs in base 11, which is dubs in base 10, which is dubs in base 9, which is dubs in base 8, which is dubs in base 7, which is dubs in base 6, which is dubs in base 5, which is dubs in base 4, which is dubs in base 3, which is dubs in binary.

Name: Anonymous 2011-10-18 13:38

>>13
N post is dubs in Base N-1 which is dubs in Base N-2...
Every post except 1st and 2nd can be considered "dubs", with 2nd being a cliched reply to 1st which is OP trying to troll /prog/ once again.

Name: 2011-10-18 15:22

>>12
Shut the fuck up, OHDAE

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List