Ask HN: What would Your_Favorite_Compiler do?

https://news.ycombinator.com/item?id=780412
by 3ds • 17 years ago
12 26 17 years ago

x = 10

y = x + ++x

What is y?

Even the professor who teaches compiler construction at my university thought it was interesting to see how different languages or compilers handle this. I've tried a couple but leave it to you to post and discuss your results.

(I know it's terrible code)

Related Stories

Loading related stories...

Source preview

news.ycombinator.com