Hacker News new | ask | show | jobs
by takeiteasyy 2011 days ago
Could you give an example of syntactically identical sections of code with different semantic meanings?
2 comments

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.