Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ajuc
on June 25, 2015
|
parent
|
context
|
favorite
| on:
Java Was Strongly Influenced by Objective-C
In 1 the problem is silently discarding double precision to float precision. I edited the example to be less confusing.
AnimalMuppet
on June 25, 2015
[–]
Ah. Yes, I was confused; I thought the issue was the promotion of the 2 from int to floating point.
ajuc
on June 26, 2015
|
parent
[–]
Also I made an error - should have been
*(1+a) = 1;
Still bad but not as bad.
AnimalMuppet
on June 26, 2015
|
root
|
parent
|
next
[–]
After thinking about it a bit, that also is well-typed in C. (You can argue that it
shouldn't be allowed
, but that's a different argument than that the language is not strongly-typed because of that feature.)
AnimalMuppet
on June 26, 2015
|
root
|
parent
|
prev
[–]
Or:
1[a] = 1;
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: