Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Trick question on the user registration form (Score 1) 297

Make the user registration form (mandatory to access said services) ask a mandatory piece of information: location. City, town, or what ever your target population is described by. If the answer is not what you want, give the account, but make the website just as defunct as it used to be before making the account. :-)

Comment Re:Why would the Algorithm break? (Score 1) 620

Well, C++ has constant variables too, no?

Actually the term "binding" is often used in functional languages. However, the term "variable" can also be understood to be entirely meaningful there. By 'varying' the variable (an identifier in the code you are looking at) simply doesn't have the same value always (say, between every time a function is being called), compared to a constant that would always stay, well, constant.

For example in the code fragment:

int foo(const int i) { .. }

the value i varies although it can never be mutated.

I'm thinking trying to write an algorithm in C++ using just constant variables gives you some idea how to write functional algorithms; but the language isn't quite suitable for it, with the lack of lambda functions (yes, those are coming!) and true garbage collection.

Slashdot Top Deals

Any given program will expand to fill available memory.

Working...