I've been learning Python for about 2 months now (Started with Learn Python The Hard Way, now reading Dive Into Python), and within both books, I still seem to be confused over this one bit of code.
...

Background: I've run through a few tutorials and written some small projects. All is going well enough using Google and StackOverflow.
Several times in the last few days I've found myself wondering ...

In many programming languages, I see programmers always struggle to swap 2 variabeles. Most of the time it costs 3 copies and a temporary variabele to accomplish it.
Why do programming language dont ...

Where it is accepted that a language has to be Turing complete to be any good, is it actually possible to have a 'useful' programming language that isn't Turing complete?
I should clarify that this ...

As it is often classified at school/college level, popular programming languages (C#, Java, C++) are all 3rd generation languages (with higher level of abstraction from the machine's physical parts). ...

In a conversation earlier this week I was discussing certain language features, and I realized I don't have a good word / phrase to describe a particular feature.
Some languages, such as PHP, have a ...

In the pseudo code below, the variable key must be declared and initialized outside of the context which it is used/relevant because there are two disparate if-blocks with the exact same condition.
I ...

In this chart about the features that are in or out of the next version of Roslyn (specifically, for C#), primary constructors are out, but auto-property initializers are in.
The best use case I've ...

Haskell supports overloaded values, where a single overloaded value can behave
sort of like a superposition of values each with a different type. For example, here's a simple type class:
class Truthy ...

I may have been exposed to exactly the wrong languages, but though many have loops and break statements, none of the languages I am familiar with have higher-order break statements¹. While a regular ...

I find it really odd that the initCause method of Java's Throwable class can only be called once, or even not at all (if the constructor accepting a Throwable was used). This makes exception chaining ...

I'm a long-time Python user. A few years ago, I started learning C++ to see what it could offer in terms of speed. During this time, I would continue to use Python as a tool for prototyping. This, it ...

C++11 features the new auto type declaration, allowing you to work with an object without ever knowing its actual type.
I use only strongly typed languages - C++, Delphi (Object Pascal), Go, etc and ...

C and most likely many other languages provide a struct keyword for creating structures (or something in a similar fashion). These are (at least in C), from a simplified point of view like classes, ...

Are there any programming languages that support the use of unicode logic operators? For example, many programming languages use "!=" as the "does not equal"
operator, but in mathematics the symbol ...

Working on a statically typed language with type inference and streamlined syntax, and need to make final decision about syntax for variable declaration versus assignment. Specifically I'm trying to ...

It is an error if you do anything in a constructor before calling the superconstructor. I remember that I had problems because of that. Yet, I do not see how this saves us from errors. It could save ...

JavaScript seems to calculate the array length property by the number of the last index in the array rather than counting the number of items in the array. Example:
var testArray = ['a', 'b', 'c'];
...