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

Scheme > Haskell

Name: 2018-03-26 19:44

(define (car op)
(cond ((eq? op 'speed) 10)
((eq? op 'name) "ass")))

Compiles and works.

car "speed" = 10
car "name" = "ass"

Does not compile and does not work.

Name: 2018-03-26 19:48

Scheme has a superior type system where car : (x : any) -> f(x) with (define (f op)
(cond ((eq? op 'speed) integer)
((eq? op 'name) string)))

Name: Anonymous 2018-03-27 1:19

NO! NO! NO!

Name: Super Hell !JM1IoNO1/U 2018-03-27 1:59

>>1
lol those are not equivalent
You should have used symbols instead of strings in Haskell.
(Just googled and it seems like something similar to enums would work.)
https://wiki.haskell.org/Quasiquotation

Name: Anonymous 2018-03-28 0:56

all the smart people use Haskell though

Scheme is used by freshmen in CS 101

Name: Anonymous 2018-03-28 0:57

>>4
(define (car op)
(cond ((eq? op "speed") 10)
((eq? op "name") "ass")))

Better?

Name: Anonymous 2018-03-28 0:58

>>5
In our uni we learned Ocaml in the 1st year and Haskell in the 2nd year. We never learned Scheme.

Name: Anonymous 2018-03-28 1:14

>>7
that just means Scheme lost one more use

in fact it was its last use

Name: Anonymous 2018-03-28 10:36

In haskell you can at least write a window manager
http://xmonad.io
scheme? fibs and turtle programming

Name: Anonymous 2018-03-28 10:47

Name: Anonymous 2018-03-28 10:56

>>9
Don't kid yourself, both are meme languages only used by hobbyists

Name: Anonymous 2018-03-28 12:46

>>10
Stable release
0.99.6.2 / 12 March 2000; 18 years ago
|N. I. C E.|

Name: Super Hell !JM1IoNO1/U 2018-03-28 17:30

>>6
That's just sugar for a strcmp, which Haskell also has.

Name: Anonymous 2018-03-29 15:09

>>13
You are missing the point.

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