You can do normal programming but you have to say sorry when doing an assignment unless you use a transaction.
Thinking about to use an immutable data structure to implement a hash table.
Probably will be slow I guess. One advantage is that it will be easier to reconstruct a bug.
Functional programming
Moderators: hgm, Rebel, chrisw
-
- Posts: 11
- Joined: Thu Jul 20, 2017 12:18 am
Re: Functional programming
What?You can do normal programming but you have to say sorry when doing an assignment unless you use a transaction.
-
- Posts: 7220
- Joined: Mon May 27, 2013 10:31 am
Re: Functional programming
It's forbidden to do an assignment.
-
- Posts: 175
- Joined: Fri Oct 22, 2010 9:47 pm
- Location: Austria
Re: Functional programming
You do not do assignments, you just name values. Like in mathematic.
But for a hash table you have the IO monad, where you can do what you want.
Still, the model is harder to implement in a mutable world (like the processors are), so the program is slower (see Barbarossa).
But for a hash table you have the IO monad, where you can do what you want.
Still, the model is harder to implement in a mutable world (like the processors are), so the program is slower (see Barbarossa).
-
- Posts: 7220
- Joined: Mon May 27, 2013 10:31 am
Re: Functional programming
Better only write small minimal programs. For they are saying object oriented programming is no good, Functional programming is no good. Test driven development is dead and behavior driven development is bad.
And who knows what they make you believe in the future.
By the way also inheritance makes no sense. For instance a circle is not a shape because rotating a circle makes no sense.
And a square is not a rectangle for having both width and height is redundant.
And who knows what they make you believe in the future.
By the way also inheritance makes no sense. For instance a circle is not a shape because rotating a circle makes no sense.
And a square is not a rectangle for having both width and height is redundant.