Questions tagged [language-history]
27 questions
148
votes
11 answers
Uppercase Booleans vs. Lowercase in PHP
When I was learning PHP, I read somewhere that you should always use the upper case versions of booleans, TRUE and FALSE, because the "normal" lowercase versions, true and false, weren't "safe" to use.
It's now been many years, and every PHP script…

Austin Hyde
- 26,347
- 28
- 96
- 129
47
votes
8 answers
What is "pass-by-name" and how does it work exactly?
I've checked Wikipedia and googled but I still can't wrap my mind around how pass-by-name works in ALGOL 60.

bdd
- 3,436
- 5
- 31
- 43
43
votes
5 answers
Why do C compilers prepend underscores to external names?
I've been working in C for so long that the fact that compilers typically add an underscore to the start of an extern is just understood... However, another SO question today got me wondering about the real reason why the underscore is added. A…

Michael Burr
- 333,147
- 50
- 533
- 760
43
votes
7 answers
What is the purpose of Java's unary plus operator?
Java's unary plus operator appears to have come over from C, via C++.
int result = +1;
It appears to have the following effects:
Unboxes its operand, if it's a wrapper object
Promotes its operand to int, if it's not already an int or…

Syntactic
- 10,721
- 3
- 25
- 25
26
votes
1 answer
Alternative for-loop construct
General comment: any new answer which gives a new and useful insight into this question will be rewarded with a bonus.
The Bash reference manual mentions that Bash supports the
following for-loop constructs:
for name [ [in [words ...] ] ; ] do…

kvantour
- 25,269
- 4
- 47
- 72
25
votes
1 answer
What is the meaning of "Hero unit"?
What does the term "hero" mean and why was it used to name a site/page's "primary message"?
Specifically I'm wondering if the term "hero" or phrase "hero unit" is some common nomenclature used in web design that I've managed to miss.

Mario Zigliotto
- 8,315
- 7
- 52
- 71
22
votes
18 answers
How is C# inspired by C++ more than by Java?
When looking at the history of C#, I found out that C# was seen as an update to C and/or C++. This came a bit as a surprise to me, as on the surface, I see much more common ideas between C# and Java (Garbage collection comes to mind). I don't write…

Mathias
- 15,191
- 9
- 60
- 92
21
votes
3 answers
Python: Why does the int class not have rich comparison operators like `__lt__()`?
Mostly curious.
I've noticed (at least in py 2.6 and 2.7) that a float has all the familiar rich comparison functions: __lt__(), __gt__, __eq__, etc.
>>> (5.0).__gt__(4.5)
True
but an int does not
>>> (5).__gt__(4)
Traceback (most recent call…

jisaacstone
- 4,234
- 2
- 25
- 39
14
votes
8 answers
How was the syntax chosen for static methods in Python?
I've been working with Python for a while and I find the syntax for declaring methods as static to be peculiar.
A regular method would be declared:
def mymethod(self, params)
...
return
A static method is declared:
def mystaticethod(params)
…

Uri
- 88,451
- 51
- 221
- 321
12
votes
5 answers
What are some specific examples of backward incompatibilities in Perl versions?
It has been 22 years between the initial public release of Perl 1.0 (December 18, 1987) and the current stable release 5.10.1 (2009).
During those 22 years the following notable releases have been made:
Perl 1.0 (1987 - initial release)
Perl 2…

knorv
- 49,059
- 74
- 210
- 294
11
votes
1 answer
What is the point of the complicated scoping rules for friend declarations?
I recently discovered that friend declarations scoping follows extremely peculiar rules - if you have a friend declaration (definition) for a function or a class that is not already declared, it is automatically declared (defined) in the immediately…

Matteo Italia
- 123,740
- 17
- 206
- 299
10
votes
4 answers
Origin of try/catch/finally syntax
Question for the etymology wizards out there: which programming language was the first to use the try/catch/finally syntax found in today's Java/.NET languages?

Evan Haas
- 2,524
- 2
- 22
- 34
9
votes
1 answer
What was PHP's "o" serialization format for?
The list of backwards-incompatible changes for PHP 7.4 contain the following note:
Serialization
The o serialization format has been removed. As it is never produced by PHP, this may only break unserialization of manually crafted strings.
(Note…

HappyDog
- 1,230
- 1
- 18
- 45
7
votes
5 answers
Historic reasons for Left-Handed Coordinate System
I find it a bit non-intuitive that the (0,0) maps to the left-top of the screen. Is there a historic reason for using a left-handed coordinate system in Java Swing?
While mapping this to a right-handed system is not too difficult, I'm curious to…

qrslt
- 73
- 3
5
votes
2 answers
What did PHP's y2k_compliance php.ini setting do?
This question is purely for academic purposes, as the setting was removed in PHP 5.4 and the year 2000 is long past, but does anyone know what the y2k-compliance configration setting did?
The PHP documentation doesn't tell you much:
y2k_compliance…

HappyDog
- 1,230
- 1
- 18
- 45