Forking vs Threading

The main difference between forking and threading approaches is one of operating system architecture. Back in the days when Unix was designed, forking was an easy, simple system that answered the mainframe and server type requirements best, as such it was popularized on the Unix systems. When Microsoft re-architected the NT kernel from scratch, it … Read more

The History Behind the Definition of a ‘String’ [closed]

My assumption has always been that the programming term originated from the following definition of the word “string” (from Merriam-Webster): (1): a series of things arranged in or as if in a line <a string of cars> <a string of names> (2): a sequence of like items (as bits, characters, or words) Since a string … Read more

Mathematica: what is symbolic programming?

When I hear the phrase “symbolic programming”, LISP, Prolog and (yes) Mathematica immediately leap to mind. I would characterize a symbolic programming environment as one in which the expressions used to represent program text also happen to be the primary data structure. As a result, it becomes very easy to build abstractions upon abstractions since … Read more

Why are Python Programs often slower than the Equivalent Program Written in C or C++?

Python is a higher level language than C, which means it abstracts the details of the computer from you – memory management, pointers, etc, and allows you to write programs in a way which is closer to how humans think. It is true that C code usually runs 10 to 100 times faster than Python … Read more

The difference between Reactive and Functional-Reactive programming

Functional Reactive Programming (FRP) is a specific programming model with a specific semantics. (Actually, there are two variants, which are sometimes called “classic FRP” and “arrow FRP”.) I’ve given a summary in an answer to “What is (functional) reactive programming?”. As I said there, the two key properties for me have always been (a) precise … Read more

Does any other language other than JavaScript have a difference between brace start locations (same line and next line)?

Any language that doesn’t rely on semicolons (but instead on newlines) to delimit statements potentially allows this. Consider Python: >>> def foo(): … return … { 1: 2 } … >>> def bar(): … return { 1: 2 } … >>> foo() >>> bar() {1: 2} You might be able to construct a similar case … Read more

Why is the ‘if’ statement considered evil?

The if statement is rarely considered as “evil” as goto or mutable global variables — and even the latter are actually not universally and absolutely evil. I would suggest taking the claim as a bit hyperbolic. It also largely depends on your programming language and environment. In languages which support pattern matching, you will have … Read more

How do functional programming languages work?

If functional programming languages cannot save any state, how do they do some simple stuff like reading input from a user (I mean how do they “store” it), or storing any data for that matter? As you gathered, functional programming doesn’t have state—but that doesn’t mean it can’t store data. The difference is that if … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)