For programmers: Haskell is a non-imperitive language

Wanna understand E=mc2, English grammer, or maybe just build a computer? We can help!

Moderator: Moderators

Post Reply
User avatar
XMEN Gambit
Site Admin
Posts: 4122
Joined: Thu Nov 18, 1999 12:00 am

For programmers: Haskell is a non-imperitive language

Post by XMEN Gambit »

This is just kind of a fun thing to show to someone used to programming in an imperitive, straightforward language:

Haskell tutorial

It's been a long time, but I've been through a similar learning process learning Prolog in my college AI class. From the article:
I mean that the following does not happen in normal Haskell:

Code: Select all

int a
a := 4
print a
a := 5
print a
	
> 4
> 5
Instead:

Code: Select all

print a
	
int a
a = 5
	
> 5
Post Reply