I'll try to explain a bit, have to admit though, even my understanding
is not all that clear, and all is open for further discussion.
Noufal Ibrahim KV writes:
Okay, I've been struggling through the proglang course on coursera and
this thing came up
val x = 2;
fun f y = x + y;
The
On Sun, Nov 9, 2014 at 1:50 PM, Abhishek L abhishek.lekshma...@gmail.com
wrote:
I'll try to explain a bit, have to admit though, even my understanding
is not all that clear, and all is open for further discussion.
Noufal Ibrahim KV writes:
Okay, I've been struggling through the proglang
On Sun, Nov 09 2014, Abhishek L wrote:
[...]
Here x was a mutable variable, doing a similiar ML construct, ie
val x = ref 2
fun f y = !x + 2
f 10 ; evals to 12
x := 10
f 10 ; evals to 20
So this becomes a problem of closures over mutable variables? ie every
Ref: This mail thread:
https://mail.python.org/pipermail/bangpypers/2014-November/010549.html
Date: Sun, 09 Nov 2014 14:44:26 +0530
From: Noufal Ibrahim KV nou...@nibrahim.net.in
Subject: Re: [BangPypers] Does Python have lexical scoping?
Message-ID: 87y4rkpwgd@nibrahim.net.in
On Sun, Nov 9, 2014 at 1:14 AM, Noufal Ibrahim KV nou...@nibrahim.net.in
wrote:
How is lexical scoping with a mutable environment different from dynamic
scoping?
I think you should post this in python-dev and you might get answers with
rigorous definitions.
Here is my short snippet which
Senthil Kumaran writes:
On Sun, Nov 9, 2014 at 1:14 AM, Noufal Ibrahim KV nou...@nibrahim.net.in
wrote:
How is lexical scoping with a mutable environment different from dynamic
scoping?
I think you should post this in python-dev and you might get answers with
rigorous definitions.
On Sun, Nov 9, 2014 at 10:38 AM, Noufal Ibrahim KV nou...@nibrahim.net.in
wrote:
Okay, I've been struggling through the proglang course on coursera and
this thing came up
val x = 2;
fun f y = x + y;
The second line creates a function that adds `x` to it's argument. Since
ML is
On Mon, Nov 10, 2014 at 12:17 PM, Anand Chitipothu anandol...@gmail.com
wrote:
On Sun, Nov 9, 2014 at 10:38 AM, Noufal Ibrahim KV nou...@nibrahim.net.in
wrote:
Okay, I've been struggling through the proglang course on coursera and
this thing came up
val x = 2;
fun f y = x + y;
Okay, I've been struggling through the proglang course on coursera and
this thing came up
val x = 2;
fun f y = x + y;
The second line creates a function that adds `x` to it's argument. Since
ML is statically scoped, this is really a function that adds 2 to its
argument. Even if I later