| ▲ | bunderbunder a day ago | |
As someone who speaks multiple languages and uses multiple programming languages, I would say it’s much more true of programming languages than it is of natural languages. Spoken languages have the odd idiom that doesn’t translate well, and certain languages express certain ideas more or less succinctly. But it’s not like Chinese’s lack of verb tense makes it harder to think about how things are happening in time. The concept still exists, it’s just expressed differently. But not so differently that I can’t translate decently well on the fly. Programming languages have much more variability in what kinds of concepts they can easily express. In Smalltalk I’m going to use dynamic dispatch to express damn near everything because it’s just about the only sane way to do domain modeling. In Standard ML I’m going to lean instead on algebraic data types and pattern matching. Those tend to lead to very different ways of breaking down a problem. In Scheme I don’t have either built in but both are easy enough to implement as a library, so I’ll freely choose whichever option seems most appropriate to the problem at hand. In assembly language I’ll avoid any such abstraction altogether because, while I could probably implement versions of both, it would be a total PITA and probably result in incomprehensible code. And translating among any of them is likely to be the work of multiple hours or even days. | ||