Live data from Hacker News

Ask HN: What language do you think in?

news.ycombinator.com

1–10 of 68 posts

Re: Ask HN: What language do you think in?

#3
It depends on the situation, but I generally think in terms of pure (recursive) functions and types. This then usually provides me with a reasonably quick mapping to my preferred languages (e.g. ML or Haskell), as well as providing a reasonably simple way of mapping back to languages like Java or C or PHP or whatever else I might be called upon to write occasionally.

Interestingly, I've spent a some extended blocks of time working inside theorem provers. I find that it requires me a bit of time to switch to and from that style of thinking.

Re: Ask HN: What language do you think in?

#4
post #3

It depends on the situation, but I generally think in terms of pure (recursive) functions and types. This then usually provides me with a reasonably quick mapping to my preferred languages (e.g. ML or Haskell), as well as providing a reasonably simple way of mapping back to languages like Java or C or PHP or whatever else I might be called upon to write occasionally. Interestingly, I've spent a some extended blocks o…

"It depends on the situation, but I generally think in terms of pure functions and types. "

This resonates. I think in a weird pseudocode myself and after getting a grip on type theory I find I think in typed weird pseudocode.

Re: Ask HN: What language do you think in?

#6
I think in English. Whenever I'm thinking about a problem, my solutions are immediately described in my head at a high level. This allows me to rapidly iterate over the solution space without having to venture down into the pseudocode or code level until I've found something I'm convinced will actually work.

Re: Ask HN: What language do you think in?

#7
post #3

It depends on the situation, but I generally think in terms of pure (recursive) functions and types. This then usually provides me with a reasonably quick mapping to my preferred languages (e.g. ML or Haskell), as well as providing a reasonably simple way of mapping back to languages like Java or C or PHP or whatever else I might be called upon to write occasionally. Interestingly, I've spent a some extended blocks o…

"It depends on the situation, but I generally think in terms of pure functions and types. " This resonates. I think in a weird pseudocode myself and after getting a grip on type theory I find I think in typed weird pseudocode.

Well, I think it's reasonably intuitive to think that way. It basically involves asking yourself the questions - "what types of values am I interested in?" "what types of results do I expect?" and finally "how do I get from input to output?"

I think most programmers probably think it reasonably similar terms - it's just that having working in STLC or a high-level functional language gives you some mental machinery that doesn't rely on decomposing this thought process into some concrete syntax from a programming language.

(incidentally, this is one of the reasons why I think there is a lot of value in learning the Lambda calculus early in a computer science education).

Re: Ask HN: What language do you think in?

#9
I would say I think in pseudo-code, using natural language to describe the problem in a way that can be converted to code ("for all of these values in this array/container...", etc). That said, I work a lot in C#, so I usually go right to that pretty quickly, if not right away for commonly-solved problems.

Re: Ask HN: What language do you think in?

#10
I think in data-structures opposed to one language in particular, if anything I think in markup; everything starts as a list, each item evolves into another list until it eventually ends up as dictionary, which can sometimes spawn another list. . .my thought-process is hopelessly recursive, this is easily my cardinal sin for all my unproductive days.
Post reply on HN