Re: [racket-users] Are the terms "function" and "procedure" synonymous in Racket?

2019-01-19 Thread Ellen Spertus
On Sat, Jan 19, 2019 at 7:37 PM David Storrs  wrote:

>
>
> On Fri, Jan 18, 2019, 6:36 PM George Neuner 
>>
>>  witness the legions of newbies every
>> year who don't understand that computer arithmetic differs from the math
>> they were taught in school.
>>
>
> Does it? Bit of a philosophical question, it seems. I mean, so long as you
> stick with integers, if you start with the same numbers and run them
> through the same operations then you will end up with the same results
> regardless of whether you did it on paper or in a computer. Things get a
> little weird once you start going into floating point, but I contend that
> that's a difference in implementation/representation, not in math.
>

Even integers operations behave differently on computers than in math. Most
programming languages (or implementations) have 32- or 64-bit integers.

ob. xkcd: https://xkcd.com/571/

[image: image.png]

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Are the terms "function" and "procedure" synonymous in Racket?

2019-01-13 Thread Ellen Spertus


Are "procedure" and "function" synonymous in Racket? It seems to be implied 
by the documentation . 
For example, the documentation for compose 

 describes 
it as a *procedure* that

[r]eturns a *procedure* that composes the given *functions*...The compose 
*function* allows the given *functions* to consume and produce any number 
of values...

(All of the above italicization was added by me.)


I understand that procedure? is a library procedure and function? is not. I 
also understand the difference between a mathematical function and a 
computer procedure (which might have side effects). What I'm trying to 
determine is what language to use with my students this semester. (I like 
to use both "procedure" and "function" because it's sometimes useful to 
have two different words, as in the above documentation excerpt.)


FYI, I posted a version of this question to Stack Overflow 
.
 
I got an answer but was referred here.


Thanks.


Ellen

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.