Skip to main content
157 votes

Was the C programming language considered a low level language when it came out?

This depends on your definition of high-level and low-level language. When C was developed, anything that was higher-level than assembly was considered a high-level language. That is a low bar to ...
amon's user avatar
  • 135k
148 votes
Accepted

Why did SQL injection prevention mechanism evolve into the direction of using parameterized queries?

The problem is that #1 requires you effectively parse and interpret the entirety of the SQL variant you're working against so you know if it is doing something it shouldn't. And keep that code up to ...
Telastyn's user avatar
  • 109k
147 votes
Accepted

Was the C programming language considered a low level language when it came out?

To answer the historical aspects of the question: The design philosophy is explained in The C Programming Language written by Brian Kernighan and C designer Dennis Ritchie, the "K&R" you may have ...
gatkin's user avatar
  • 1,359
140 votes

Before OOP, were data structure members left public?

OOP did not invent encapsulation and is not synonymous with encapsulation. Many OOP languages do not have C++/Java style access modifiers. Many non-OOP languages have various techniques available to ...
amon's user avatar
  • 135k
79 votes

Why did SQL injection prevention mechanism evolve into the direction of using parameterized queries?

Because option 1 is not a solution. Screening and filtering means rejecting or removing invalid input. But any input might be valid. For example apostrophe is a valid character in the name "O'Malley". ...
JacquesB's user avatar
  • 59.9k
72 votes

How and why did modern web application frameworks evolve to decouple URL routes from the file system?

In its most basic form, a website serves static files. Mapping the URL path to a file path is the most obvious choice; essentially, it's a read-only FTP site. Then people wanted to change the content ...
Ewan's user avatar
  • 77.4k
71 votes
Accepted

Why was the caret used for XOR instead of exponentiation?

Although there were older precursors, the influential French mathematician Rene Descartes is usually credited for introducing superscripted exponents (ab) into mathematical writing, in his work ...
njuffa's user avatar
  • 1,306
69 votes

What kind of bugs do "goto" statements lead to? Are there any historically significant examples?

It isn't that the goto is bad by itself. (After all, every jump instruction in a computer is a goto.) The problem is that there is a human style of programming that pre-dates structured programming, ...
Mike Dunlavey's user avatar
68 votes
Accepted

Who did async/await first?

Haskell (2012) There is an async package for Haskell (2012) by Simon Marlow. In case you don't know, Simon Marlow is a lead developer of Haskell. Notes: Simon Marlow joined Microsoft research in 1998 ...
Theraot's user avatar
  • 9,171
67 votes

What kind of bugs do "goto" statements lead to? Are there any historically significant examples?

Why is goto dangerous? goto doesn't cause instability by itself. Despite about 100,000 gotos, the Linux kernel is still a model of stability. goto by itself should not cause security vulnerabilities. ...
Christophe's user avatar
  • 78.7k
60 votes

Why did SQL injection prevention mechanism evolve into the direction of using parameterized queries?

If you're trying to do string processing, then you're not really generating an SQL query. You're generating a string that can produce an SQL query. There's a level of indirection that opens up a lot ...
Joshua Taylor's user avatar
50 votes

Why is int in C in practice at least a 32 bit type today, despite it being developed on/for the PDP-11, a 16 bit machine?

The C standard doesn't specify 32 bits for int, it specifies "at least" 16. https://stackoverflow.com/questions/589575/what-does-the-c-standard-state-the-size-of-int-long-type-to-be In ...
pjc50's user avatar
  • 13.7k
40 votes

How and why did modern web application frameworks evolve to decouple URL routes from the file system?

You can look to a white paper by Roy Fielding on REpresentational State Transfer (REST) as to the when and the why. The first framework I was aware of that made the distinction between a resource and ...
Berin Loritsch's user avatar
38 votes

Was the C programming language considered a low level language when it came out?

In the early 1970s, C was a dazzling breath of fresh air using modern constructs so effectively that the entire UNIX system could be rewritten from assembly language into C with negligible space or ...
bud wonsiewicz's user avatar
35 votes

What kind of bugs do "goto" statements lead to? Are there any historically significant examples?

The famous Dijkstra article was written at a time when some programming languages were actually capable of creating subroutines having multiple entry and exit points. In other words, you could ...
Robert Harvey's user avatar
31 votes

Before OOP, were data structure members left public?

First, being procedural versus object oriented has nothing to do with public vs private. Plenty of object oriented languages have no notion of access control. Secondly, in "C" - which most people ...
Lewis Pringle's user avatar
24 votes
Accepted

Why was "self" chosen over "this" for the name of the first parameter of python methods?

The use of self can be traced back to Smalltalk, which is one of the eldest OO languages (the oldest according to python wiki) and influenced the python language designers: There is evidence of a ...
Christophe's user avatar
  • 78.7k
21 votes
Accepted

Code development process for Voyager mission?

(Edit: 12/7/2017, a year later, I found an authoritative answer) In an article on software development for NASA space missions. https://www.nasa.gov/pdf/418878main_FSWC_Final_Report.pdf On page 31, ...
BenPen's user avatar
  • 514
21 votes

Why did SQL injection prevention mechanism evolve into the direction of using parameterized queries?

It helps that option #2 is generally considered a best practice because the database can cache the unparameterized version of the query. Parameterized queries predates the issue of SQL injection by ...
JasonB's user avatar
  • 339
21 votes

When & why did pointers start to become viewed as risky?

The rationale was the development of alternatives to pointers. Under the hood, any pointer/reference/etc is being implemented as an integer containing a memory address (aka pointer). When C came out,...
Cort Ammon's user avatar
  • 11.6k
21 votes

Was the C programming language considered a low level language when it came out?

As I wrote elsewhere on this site when someone referred to the malloc/free memory management pattern as "low-level programming," Funny how the definition of "low-level" changes over time. When I ...
Mason Wheeler's user avatar
20 votes

Why did SQL injection prevention mechanism evolve into the direction of using parameterized queries?

Simply said: They did not. Your statement: Why did SQL Injection prevention mechanism evolve into the direction of using Parameterized Queries? is fundamentally flawed. Parameterized queries ...
TomTom's user avatar
  • 545
20 votes

How and why did modern web application frameworks evolve to decouple URL routes from the file system?

I don't think it's an artefact of modern web application frameworks, it's mostly an artefact of dynamic page serving in general. In the old days there were mostly static web pages, where a software ...
Bergi's user avatar
  • 1,335
19 votes
Accepted

Why is there both logical operators <> and !=?

The != operator is more commonly used nowadays because of the overwhelming influence in C. But how did C get there? The mathematical operator for inequality is ≠. Some languages do use this operator ...
amon's user avatar
  • 135k
19 votes
Accepted

Why is the ampersand (&) a HTML Entity?

To avoid ambiguity. Suppose you want to write a website about HTML. You write the line: "To write a literal < you have to write &lt;." Now, to write that down in HTML: <p>To write a ...
Jasmijn's user avatar
  • 1,859
17 votes

Why do we put private member functions in headers?

The accepted answer explains this for virtual private functions, but that only answers one specific facet of the question, which is considerably more limited than what the OP asked. So, we need to ...
underscore_d's user avatar
17 votes
Accepted

What is the history for naming constants in all uppercase?

For C, the first edition of The C Programming Language (a.k.a. K&R) suggests that your intuition about preprocessor macros is correct: Symbolic constant names are commonly written in upper case ...
Blrfl's user avatar
  • 20.4k
15 votes

Code development process for Voyager mission?

This article in Wired makes it clear that the code was written in Fortran 5 and later ported to Fortran 77 and some elements are now in a version of C: The spacecrafts’ original control and ...
Brian Tompsett - 汤莱恩's user avatar
15 votes
Accepted

Does i in for loops means iteration or index?

It doesn't mean either. It is a variable containing a number that can be used as an index value for an array item. This is evidenced by the fact that i is often used in the context of an array, as in ...
Robert Harvey's user avatar
15 votes

Was the C programming language considered a low level language when it came out?

Many answers have already referred to early articles that said things like “C is not a high level language”. I can’t resist piling on, however: many, if not most or all HLLs at the time - Algol, ...
Krazy Glew's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible