Hacker News new | past | comments | ask | show | jobs | submit login

Could you give an example of syntactically identical sections of code with different semantic meanings?



y = m * x + b

can refer to the distance a car has traveled over time at a fixed speed with a starting point as well as the cost of ordering a certain quantity of an item with a fixed shipping cost

that's my best attempt at an example


That is better than I managed to come up with on short notice.


Thanks. It was inspired by an Uncle Bob example.


Only contrived ones without supplying quite a bit of context.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: