Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Delphi is not Go, you can declare variables at the point of use nowadays.

Oh, it seems they introduced it in 2018, some time after I quit my 6-months Delphi stint. http://blog.marcocantu.com/blog/2018-october-inline-variable...

So, given the age of Delphi (and Pascal!), Go still has plenty of time to be quicker. Not sure what's missing from it, though.

Of course, I'm sure you knew all of that, and could have just mentioned it. But maybe you just want to convince people of unrealistic propositions, and claim that some obscure technologies were more practical than they really are.

> Just like C used to declare variables until C99.

1. C99 was 20 years ago, 19 years before Delphi.

2. What you say is wrong. You could declare variables at the start of any block since forever (I think it's standardized in C89).

3. What matters is compilers in practice, and I'm pretty sure they allowed you to declare variables anywhere, and also "for (int i..." (which is C99) since forever (as an extension).

> write only code bases

such as C++ code bases?

> regular rotating team members

I've just never seen that not becoming a mess

> A workaround done today is a security exploit waiting to happen tomorrow.

I'm still waiting for my code review. https://news.ycombinator.com/item?id=21290314 . For a start, where are my terrible workarounds?



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

Search: