Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
adwn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
166 ms
·
1771.
▲
by
adwn
13y ago
I disagree: logic is a tool used in math, in the same way that math is a tool used in physics. You might even say that math is "applied logic", just as physics can be considered "applied math".
1772.
▲
by
adwn
13y ago
> A high pressure sodium vapor lamp has an efficiency of around 150 lm/W Source? Allegedly, Cree has developed a white LED with up to 254 lm/W. [1] [1] Cree Sets New Record for White LED Efficiency http://techon.nik
1773.
▲
by
adwn
13y ago
Please do not drag this discussion to stateful vs. stateless programming. It's about OO, which is typically, in practice and in theory, associated with mutable state.
1774.
▲
by
adwn
13y ago
> If an object contains mutable state, it is not referentially transparent. Why shouldn't an object contain mutable state? When solving a problem for which pure, stateless programming is not suitable, where would you put state if no
1775.
▲
by
adwn
13y ago
> The code does not demonstrate encapsulation because the data type has not been decoupled from the implementation. Not all code has to be applicable to more than one use case. What you're suggesting is premature generalization, whi
1776.
▲
by
adwn
13y ago
It's an example, sheesh! I suspect you're a programmer, so you should be able to abstract away the details of the example and take home the message.
1777.
▲
by
adwn
13y ago
Reasoning by analogy is also "thinking". What's wrong with giving different names to different ways of approaching a problem?
1778.
▲
by
adwn
13y ago
> But you do admit they are programs! No, I don't – not in the sense that Stroustrup was using the term "program". strlen or malloc are not programs in the way that this term is commonly understood. His claim is not ridicu
1779.
▲
by
adwn
13y ago
Neither strlen nor malloc (nor qsort) count as programs under any pragmatic, non-nitpicking, definition. Even the assumption that implementing, e.g., a memory allocation algorithm in C++ is not more comfortable than in C, does no lead to th