News for hackers. Stuff that matters.
Re:Why I prefer scheme to Haskell by irahul on Monday April 09, 2012 @07:12AM (#3816486)
If you use windows or mono is an option, F# is an alternative to Haskell. F# comprises on purity for practicality, and adds a couple of niceties of its own over the ML core. It also allows convenient OOP, but in now way forces to use it if your whole code base is F#.

And if you are using Scheme, Racket is a scheme derivative which provides a nice and extensive library.

Re:Why I prefer scheme to Haskell by getsat on Monday April 09, 2012 @07:30AM (#3816522)
Does F# let you debug using printf? I stopped reading the linked post at that point.
Re:Why I prefer scheme to Haskell by darklajid on Monday April 09, 2012 @07:44AM (#3816556)
Yes, you could do that. Won't judge that approach - that's probably a cultural thing. But you have access to side effects and could dump stuff to the console (even, if you're so inclined, using the .Net framework standard way, calling Console.Write/WriteLine - although the print* stuff in F# is really better suited if you decided to go down that path).
Re:Why I prefer scheme to Haskell by more_original on Monday April 09, 2012 @07:59AM (#3816596)
Yes, printf is easy in F#. The following example works in F# and OCaml:

  let rec fact n =
     Printf.printf "%i\n" n;
     if n = 0 then 1 else n * (fact (n-1))
Re:Why I prefer scheme to Haskell by getsat on Monday April 09, 2012 @01:52PM (#3818244)
For the record, this was sarcasm. It's 2012. I really hope you guys aren't debugging using printf still.

You'd think someone into esoteric languages would've heard of a debugger.

Re:Why I prefer scheme to Haskell by reddit_clone on Monday April 09, 2012 @08:52PM (#3820120)
Print/Trace statements are invaluable in several situations.

I don't trust debuggers for multi-threaded applications or applications with open, time-sensitive resources (open sockets etc..)

Installing and firing up a debugger is not an option in a customer's system.

> It's 2012

I expect to be using Printf's in 2022 and beyond.

Re:Why I prefer scheme to Haskell by jrockway on Monday April 09, 2012 @02:11PM (#3818359)
I'm pretty good at Haskell and prefer print to debuggers in pretty much every language. I'd rather have the computer produce output for me to read than to have to hand-hold the computer through evaluating my program. It's easier.
Re:Why I prefer scheme to Haskell by gruseom on Monday April 09, 2012 @02:14PM (#3818379)
The one doesn't replace the other. I wrote a JS debugger for Emacs so as to have a debugger when I wanted one. I still use print statements more.
Re:Why I prefer scheme to Haskell by p4bl0 on Monday April 09, 2012 @07:34AM (#3816532)
OCaml, on which if I understand it correctly, F# is based, allows you to do that easily, but it's not really natural to do so in this programming languages.