terminology

Javascript: difference between a statement and an expression?

…衆ロ難τιáo~ 提交于 2019-11-27 00:05:50
问题 I asked this question earlier, and after thinking about the topic some more, I began to wonder where the seemingly fuzzy boundary between the meanings of the terms "statement" and "expression" lies. Are all statements also expressions? Where do the return values in a REPL console come from? They don't always seem to make any intuitive sense. Of course if you type 1+1 , you'll get 2 , but other times it isn't as obvious what the logic is. Given that anything typed into REPL produces some value

What is a Lambda?

给你一囗甜甜゛ 提交于 2019-11-27 00:04:10
Could someone provide a good description of what a Lambda is? We have a tag for them and they're on the secrets of C# question, but I have yet to find a good definition and explanation of what they are in the first place. Closures, lambdas, and anonymous functions are not necessarily the same thing. An anonymous function is any function that doesn't have (or, at least, need) its own name. A closure is a function that can access variables that were in its lexical scope when it was declared, even after they have fallen out of scope. Anonymous functions do not necessarily have to be closures, but

Why was .NET called .NET?

让人想犯罪 __ 提交于 2019-11-26 23:53:41
问题 I always wondered why Microsoft chose such a strange, search-engine-unfriendly name for such a great platform. Couldn't they have come up with something better? Apparently the codename was NGWS: Microsoft started development on the .NET Framework in the late 1990s originally under the name of Next Generation Windows Services (NGWS). [Wikipedia] Does anyone know why they chose the name .NET? 回答1: .NET enabled Microsoft's marketing people to emphasise the "Network"-ing aspect of its

What does abstraction mean in programming?

谁说胖子不能爱 提交于 2019-11-26 23:50:36
问题 I'm learning python and I'm not sure of understanding the following statement : "The function (including its name) can capture our mental chunking, or abstraction, of the problem ." It's the part that is in bold that I don't understand the meaning in terms of programming. The quote comes from http://www.openbookproject.net/thinkcs/python/english3e/functions.html How to think like a computer scientist, 3 edition. Thank you ! 回答1: Abstraction is a core concept in all of computer science.

What does the word “literal” mean?

蓝咒 提交于 2019-11-26 23:49:44
What does the word "literal" mean when used in context such as literal strings and literal values? What is the difference between a literal value and a value? A literal is "any notation for representing a value within source code" ( wikipedia ) (Contrast this with identifiers , which refer to a value in memory.) Examples: "hey" (a string) false (a boolean) 3.14 (a real number) [1,2,3] (a list of numbers) (x) => x*x (a function) /^1?$|^(11+?)\1+$/ (a regexp) Some things that are not literals: std::cout (an identifier) foo = 0; (a statement) 1+2 (an expression) A literal is a value that has been

What's the difference between “virtual memory” and “swap space”?

拥有回忆 提交于 2019-11-26 23:47:12
问题 Can any one please make me clear what is the difference between virtual memory and swap space ? And why do we say that for 32-bit machine maximum virtual memory access is 4 GB only? 回答1: There's an excellent explantation of virtual memory over on superuser. Simply put, virtual memory is a combination of RAM and disk space that running processes can use. Swap space is the portion of virtual memory that is on the hard disk, used when RAM is full. As for why 32bit CPU is limited to 4gb virtual

What is compiler, linker, loader?

天大地大妈咪最大 提交于 2019-11-26 23:45:05
问题 I wanted to know in depth meaning and working of compiler, linker and loader. With reference to any language preferably c++. 回答1: =====> COMPILATION PROCESS <====== | |----> Input is Source file(.c) | V +=================+ | | | C Preprocessor | | | +=================+ | | ---> Pure C file ( comd:cc -E <file.name> ) | V +=================+ | | | Lexical Analyzer| | | +-----------------+ | | | Syntax Analyzer | | | +-----------------+ | | | Semantic Analyze| | | +-----------------+ | | | Pre

What constitutes a fold for types other than list?

你说的曾经没有我的故事 提交于 2019-11-26 23:22:15
Consider a single-linked list. It looks something like data List x = Node x (List x) | End It is natural to define a folding function such as reduce :: (x -> y -> y) -> y -> List x -> y In a sense, reduce f x0 replaces every Node with f and every End with x0 . This is what the Prelude refers to as a fold . Now consider a simple binary tree: data Tree x = Leaf x | Branch (Tree x) (Tree x) It is similarly natural to define a function such as reduce :: (y -> y -> y) -> (x -> y) -> Tree x -> y Notice that this reduction has a quite different character; whereas the list-based one is inherently

What is 'Currying'?

五迷三道 提交于 2019-11-26 23:18:34
问题 I've seen references to curried functions in several articles and blogs but I can't find a good explanation (or at least one that makes sense!) 回答1: Currying is when you break down a function that takes multiple arguments into a series of functions that each take only one argument. Here's an example in JavaScript: function add (a, b) { return a + b; } add(3, 4); // returns 7 This is a function that takes two arguments, a and b, and returns their sum. We will now curry this function: function

What is the difference between a web API and a web service?

此生再无相见时 提交于 2019-11-26 22:29:26
问题 Is there any difference between a web API and a web service ? Or are they one and the same ? 回答1: A web service typically offers a WSDL from which you can create client stubs automatically. Web Services are based on the SOAP protocol. ASP.NET Web API is a newer Microsoft framework which helps you to build REST based interfaces. The response can be either JSON or XML, but there is no way to generate clients automatically because Web API does not offer a service description like the WSDL from