Hacker News new | ask | show | jobs
by Firadeoclus 2119 days ago
Now the stack pointer is hidden. Is there only a single global stack?

I agree with saagarjha, there is nothing unclear or "crap" about using basic operators in an idiomatic way.

1 comments

If we're being serious about a stack you really /need/ to access through functions so you can switch on and off instrumentation, eg bounds check & backtrace on failure, poison etc.

But this is as much beside the point under discussion as global pointers you raise.

Post-increment is an artefact from PDP-11 assembler and maps to a single instuction there. That's where it came from quite directly. It's completely unnecessary. Most modern languages find it useless enough they remove it. Python goes fine without it relying on +=, for example. (Although some do repeat C mistakes when basing their syntax on C, eg the unbraced, single line block that serves only to add non-zero probability of introducing a future bug but with the benefit of precisely nothing.. Hi Walter! Larry Wall cops flack for Perl syntax but he did not copy that.)

Post increment is hardly the end of the world it just isn't useful. It doesn't help readability. It can harm it. As a question of taste I find it lacking.

But hey, everyone else uses it, and duff's device is fun to read so go with them, knock yourself out.