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

Pages: 1-4041-

Haskell memory management

Name: Anonymous 2008-06-23 17:34

Haskell can't update variables, so I came up with an alternative solution: make new variables that hold desired values. But the problem is that when I make a new variable every time I change its value, the old variable stays there and littler the memory. How can I delete it?

Name: Anonymous 2008-06-23 17:50

Garbage collector.

Name: Anonymous 2008-06-23 17:50

Or reference counting.

Name: Anonymous 2008-06-23 18:03

*facepalm*

Name: Anonymous 2008-06-23 18:13

>>4
back to /b/, please

Name: Anonymous 2008-06-23 19:15

It can't update variables? That's why it's called a variable!

What sort of shit useless language is this?!

Name: Anonymous 2008-06-23 19:39

>>6
It's _pure_.

Name: Anonymous 2008-06-23 20:26

variables should function arguments or structures you pass between functions

don't worry about freeing anything

Name: Anonymous 2008-06-23 20:38

I am Heron of Alexandria. I have a large beard and I create mathematical formulas. If you don't repost this comment on 10 other pages, I will use my primitive steam engine to induce mold in your walls.

Name: Anonymous 2008-06-23 21:13

>>9
How do I know it's really you, and not someone reposting the comment?

Name: Anonymous 2008-06-23 21:30

In actuality, the term ``variable'' in Haskell is more properly known as a ``named function''

Name: Anonymous 2008-06-24 1:45

>>6
variable does not mean mutable, you cretin

Name: Anonymous 2008-06-24 4:47

Is this thread serious?

Name: Anonymous 2008-06-24 5:51

>>12
Yes it does. Think about what the word actually means.

Name: Anonymous 2008-06-24 7:12

>>14
OP is trolling, can't you see it?

Name: Anonymous 2008-06-24 7:34

>>15
YHBT

Name: Anonymous 2008-06-24 7:48

Can  we please stop the trolling?

Name: Anonymous 2008-06-24 9:25

>>17
Can  we
n  w
 
IHBT

Name: Anonymous 2008-06-24 9:28

const int lol = 0;

OMG you can't modify the variable!!!~1`lol

Name: Anonymous 2008-06-24 9:31

>>19
That's a constant!

Name: Anonymous 2008-06-24 9:53

>>20
That's a variable with const storage class

Name: Anonymous 2008-06-24 10:06

>>21
No, it's not a variable, it's a constant.

Name: Anonymous 2008-06-24 10:34

>>22
A constant variable.

Name: Anonymous 2008-06-24 10:43

>>22
It's not a constant in C.
Proof: switch (42) { case lol: break; } doesn't compile.

Name: Anonymous 2008-06-24 10:44

>>24
Your mother is not const correct.

Name: Anonymous 2008-06-24 11:59

>>24
You misunderstand what a constant really is.

Name: Anonymous 2008-06-24 12:51

stop thinking about memory, the problem will disappear.

Name: Anonymous 2008-06-24 13:27

>>24
#define lol 1

Name: Anonymous 2008-06-24 13:44

const int lol = 0;
typedef lol float;

------------------
#define lol 1
typedef lol float;

Name: Anonymous 2008-06-24 16:14

>>11
Actually, you should think of a ``Haskell Variable'' as a ``named expression''

Name: Anonymous 2008-06-24 16:52

I submitted a patch to GHC to allow variables to actually vary, but they didn't accept it. Ungrateful bastards.

Name: Anonymous 2008-06-24 17:52

Haskell variables are like mathematical variables.

/thread

Name: Anonymous 2008-06-24 17:52

hm

Name: Anonymous 2008-06-24 19:14

>>32
Except they are not.

Name: Anonymous 2008-06-24 19:24

Logical variables aren't mutable either.

Name: Anonymous 2009-09-17 21:05

Lain.

Name: Anonymous 2009-09-17 21:06

Lain.

Name: Anonymous 2009-09-17 21:06

Lain.

Name: Anonymous 2009-09-17 21:07

Lain.

Name: Anonymous 2009-09-17 21:07

Lain.

Name: Anonymous 2009-09-17 21:08

Lain.

Name: Anonymous 2009-09-17 21:08

Lain.

Name: Anonymous 2009-09-17 21:09

Lain.

Name: Anonymous 2009-09-17 21:10

Lain.

Name: Anonymous 2009-09-17 21:10

Lain.

Name: Anonymous 2009-09-17 21:11

Lain.

Name: Anonymous 2009-09-17 21:11

Lain.

Name: Anonymous 2011-02-02 23:04

Name: Sgt.Kabukiman꯷䀖 2012-05-24 9:37

All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy

Name: bampu pantsu 2012-05-29 3:57

bampu pantsu

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