News for hackers. Stuff that matters.
Re:Ask HN: What language do you think in? by warp on Thursday September 03, 2009 @12:12PM (#802760)
Probably pseudo-code which resembles whichever language I most recently used to solve a similar problem.

As a really low-level example, previously when I needed to make a comma separated list of items I would do something like this:

$result = ""; $sep = ""; for ($items as $key => $val) { $result .= $sep." ".$val; $sep = ", "; }

of course now I just do join (", ", $items);. all languages I currently use have such a join function or method, and that idea is in my head; the exact syntax is not.

This does result in minor annoyances when I for example solved something in my head with a coroutine, only to realize that I'm at work coding in php, which doesn't have them.

There are no comments on this comment yet.