All Questions
Tagged with python javascript
4 questions
18
votes
5
answers
11k
views
Algorithm for flattening overlapping ranges
I am looking for a nice way of flattening (splitting) a list of potentially-overlapping numeric ranges. The problem is very similar to that of this question: Fastest way to split overlapping date ...
7
votes
2
answers
4k
views
Every function is a closure?
Wikipedia says, that closure - is a function, which has an access to variables, declared outside of the function. There is even an example:
function startAt(x)
function incrementBy(y)
...
2
votes
4
answers
2k
views
Multiple attribution in Python, JS, ...?
I accidentally discovered this a=b=c=d=e=f=2 in python(2.7)(and JavaScript a few minutes later) interpreter .
Is this a feature or just the way the interpreter works, if is a feature how it is ...
11
votes
3
answers
2k
views
How is type checked in a dynamic language interpreter/compiler, such as JavaScript?
In dynamic languages, such as JavaScript or Python, the type of a variable is determined at runtime. This is one reason why they are slower than typed languages such as Java.
How is type checking ...