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

To clarify,

    foreach (s; vec)
works if you don't need the index. To be able to modify s in place:

    foreach (ref s; vec) s = "replacement";


I was talking about Go. I know you don’t need the index in D.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: