Hacker News new | past | comments | ask | show | jobs | submit login

Many people agree with you but I have the opposite view. Of course you can write any program in any Turing complete language, but the programs people do write in a given language tend to have a family resemblance to one another. Therefore if we want different kinds of programs we should have different languages.

A given language makes certain ideas easier or harder to formulate, and thus easier or harder to have in the first place. So the language constrains not only how you think about your program, but what you think—and thus what the program itself becomes.

Platforms, communities, and culture also help determine these things, but they're not independent of the underlying language.




So, a sort of Sapir-Whorf hypothesis for the programming domain. It certainly feels true; living and breathing a language like Erlang would probably make one think very differently about what's possible than someone immersed in Fortran.


Some have also said that the human language you speak has an effect on how you think, but that's pretty controversial among linguists if not altogether discredited.

I have no doubt the difference among human languages and programming languages could be completely different, but is there any concrete example you could give of an idea that is easier to express in one programming language than in another?


IMO the analogy to human languages is a distraction and best avoided, since we're not able to say meaningful things about both.

> is there any concrete example you could give of an idea that is easier to express in one programming language than in another

Sure. Since this thread is about Lisps: writing code that works with other code is an order of magnitude easier in Lisp. Therefore people tend to do it a lot more.


Try to write Python style metaprogramming is something like Java some day. It's perfectly possible, but nobody would think about that style. Now try to write it in C++, just for the lulz.

Or, if you are not satisfied, try to create a non-synchronous TCP server in C, Java, or Python. Then write one in Haskell.

Try creating RAII containers in Java... Ops, that can not be done!


I don't know about "possible to express", but having learned Haskell, I see monoids everywhere.

In the SICP lectures, when Sussman teaches the class the word "predicate", he mentions that knowing the names of these things is important because "As any sorcerer will tell you, if you know the name of a spirit, you have power over it".[1]

If you only know C, you're unlikely to think in terms of map/filter/reduce. If you don't know Haskell, you're unlikely to think in terms of functors and monads. You may be vaguely aware of repeated patterns, but knowing you're looking at a monad gives you a lot more power to reason about it.

[1] https://www.youtube.com/watch?v=dlbMuv-jix8#t=12m50s




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

Search: