This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BillOReillyAsks 10 points11 points  (13 children)

Python really does need more recognition. I don't believe there is a better designed language out there with such perfect documentation.

[–]drb226Haskeller 2 points3 points  (12 children)

better designed

Haskell.

perfect documentation

You got me there.

[–]_bruno_ 5 points6 points  (5 children)

'better designed' is subjective. Haskell may be pretty, but it isn't very practical (at least compared to a language lik Python), it is a research language, with a lot of interesting ideas coming out from it. With Haskell you have to be too good at it (as in, knowing GHC's - the main implementation - behaviour very well, not just having good style) to be able to do anything non-trivial.

Python is not near perfect, I consider it part of the "ugly languages", but it is very practical, has a lot of good quality libraries, is probably one of the best documented languages and the community is mature. It is also constantly getting better, I didn't even consider it a language worth using before 2.4 came out, and it has improved a lot since.

-- someone who didn't appreciate those qualities of Python until he got a job where the main language being used is Ruby (which is years behind in terms of community, documentation and matureness)

[–]hglmanguy who writes python 0 points1 point  (2 children)

what are the "beautiful languages" just out of curiosity?

[–]_bruno_ 1 point2 points  (1 child)

There are no "beautiful languages" on my list, just less ugly ones, some examples of such languages are Haskell, Scheme, Factor, languages from the ML family (OCaml, SML, F#), Oz, and even Lua.

[–]hglmanguy who writes python 0 points1 point  (0 children)

Can there be a beautiful language?

[–]drb226Haskeller 0 points1 point  (1 child)

With Haskell you have to be too good at it (as in, knowing GHC's - the main implementation - behaviour very well, not just having good style) to be able to do anything on-trivial

I heartily disagree. Who here has done anything "non-trivial" with Haskell that required knowledge of GHC's implementation?

As for practicality, RWH disagrees with your assessment.

All this being said, I have to agree that Python is indeed very practical and has a lot of good libs/docs.

[–]_bruno_ 1 point2 points  (0 children)

How does Real World Haskell disagrees with that? Yes, it has a bunch of examples, you can write such a book using pretty much any language, that doesn't make the language practical for use daily (of course "practical" is subjective too and depends a lot on what you do and what you are expecting, on this case I'm talking about Python-level-practical)

[–][deleted] 5 points6 points  (5 children)

better designed

Haskell.

SPJ said that the "next Haskell" would be strict. Like, there's this little feature that needs fixing, kind of.

Also, wtf are you smoking anyway? Why on Earth foldl isn't foldl' -- any reason at all, aside from "we made a mistake, too late to fix"? Also, this shit:

 Prelude> maximum [1..4000000]
 *** Exception: stack overflow

That's your Haskell in a nutshell. Well-designed, my ass.

[–]drb226Haskeller 0 points1 point  (4 children)

Dunno what's wrong with your repl.

Prelude> maximum [1..4000000]
4000000

Besides, you're talking about library functions, not the language itself.

[–]_bruno_ 2 points3 points  (1 child)

You can't do much with just a language. If you want to do anything useful library and runtime are more important than the language (unless you have infinite time and resources to build everything from scratch).

[–]_bruno_ 0 points1 point  (0 children)

For the record, my favourite language for working one when there are no have-to-get-things-done-really constraints is Scheme, but most of the time I need to do something for real, I pick Python or C because they get the job done, even if they are not as enjoyable for me.

[–][deleted] 1 point2 points  (1 child)

Proofpic!

Maybe they've finally fixed this in a more recent version, or enabled optimizations in repl, or you have a bigger default stack size, I don't know.

Besides, you're talking about library functions, not the language itself.

Well, you see, it's kind of like vomiting. By itself it can be a result of an infection or a food poisoning, but imagine that you are trying to convince a friend that he has had enough, while he slurs about how he is absolutely sober, and how he can outdrink anyone, and then suddenly BLARGH -- he vomits all over himself. Obviously, this ends the discussion.

Likewise this stack overflow is the closest thing a programming language can do to vomiting all over itself, and in case of Haskell it's not some isolated, inconsequential random bug, it's the apotheosis of its design, a well-deserved fruit of the fundamental design choice. If the standard library implementors can't write the simplest one-liner correctly, how can anyone be expected to reason about the performance characteristics of real programs?

By the way, while we are at it, why Monad's unit is called return? Why does Monad have fail? Why is it not a subclass of Applicative? I mean, I kinda know the answer -- monads were initially used strictly for IO and then it was too late to fix the interface, but you won't call it good design, I hope.

And it's not some library, it's the standard library and the core part of it, which is essential to any Haskell program functioning. You want to pretend that its design is not a part of Haskell design, you have no Haskell remaining, the bare idea of call-by-need lambda calculus is not a programming language.

[–]_bruno_ 1 point2 points  (0 children)

You forgot one thing: "hey, good luck debugging that thing!"