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

Lisp has changed my life

Name: Anonymous 2012-02-26 3:51

http://landoflisp.com/#yt
If you take the time to go all the way to the bottom an read the comic you'll see just what i mean by "Lisp has changed my life".

Be sure to click the throbbing text as well.

Name: >>6 2012-02-26 14:32

>>10
Types are supposed to be only compiler hints that result in faster code
That's an opinion and if it's what you believe, then like I said, use a language that does what you want and accept the fact that what you want isn't what everybody else wants.

What if I don't know how many parameters will I want to supply to the function?
Then you use a list, and if you want different types, wrap it in another type like data T = A Int | B String | .... It's not pretty, and nobody is claiming that Haskell's type system is perfect, but it's safer than true homogenous lists. If safety isn't that important to you, then for the third time, Haskell isn't what you want so just use something else.

Also, you can implement a variable number of arguments of different types in Haskell (http://hackage.haskell.org/packages/archive/base/4.2.0.0/doc/html/Text-Printf.html), but usually I would do it a different way.

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