5 ms·
Maybe it's because of the way my brain works, but I prefer clarity and brevity above almost everything else. That's why I like Python over Go, C# and others. P
by bayesian_horse 8y ago
Maybe it's because of the way my brain works, but I prefer clarity and brevity above almost everything else.
That's why I like Python over Go, C# and others. Python lets me fit more functionality (expressed as code) in my working memory, and I have to ignore less line noise and boilerplate.
- erk__ 8y agoThe other side of the extreme is functional languages which have yet to have the big breakthrough in business.
- agumonkey 8y agoImmutability and recursion patterns do shrink the search space to a minuscule spot. It may fit ones brain. But some people have a state driven thinking process, which I despised for decades but recently got to understand. I see why people like to code in C-land. The issue is that, since it's not a straightjacket like ~pure FP, if you don't have a brain that sees state, state variable, lifetimes, etc etc, you're free to write piles of crap. Especially when young because you may believe that complex => more code, and complex is good. ps: note that I'm not criticizing FP or static/math oriented programming. I'm just trying to pu both sides into a shared perspective
- pishpash 8y agoThe real world has state. Mathematics don't. There are different domains in which different languages are most expressive.
- bayesian_horse 8y agoI would not want to teach novice programmers a purely functional language... And that's what it comes down to, almost always. How hard is it to hire other people to work on your code, and how hard is it to bring people up to speed, who need to code, but aren't programmers. Scientists, mostly. Business people increasingly.
- wtetzner 8y agoI don't think you have to go for purely functional. Jane Street, for example, went with OCaml in part because the business people found the code easier to review than other languages.
- bayesian_horse 8y agoI've heard good things about OCaml, but it's extremely niche.
- wtetzner 8y agoSure, but that was just an example to illustrate my point. Some of these languages are viewed as hard to learn simply because they are unfamiliar. But to someone who's never programmed before, all languages are unfamiliar, and it turned out, at least in Jane Street's case, that OCaml was easier for the business people to understand than Java or C#, or even Excel macros.
- icxa 8y agoI am in no way a OCaml fan, and I primarily use Go at work. That said, the fact that OCaml is used by Bloomberg and Facebook (on multiple apps and products) alone make it not niche http://www.ocaml.org/learn/companies.html http://www.ocaml.org/learn/companies.html That plus ReasonML's growing popularity, which is essentially just a syntax extension of OCaml, makes it even further not niche.
- bayesian_horse 8y agoOh I don't doubt, that SOMEONE is using these nice languages. Still, the community of OCaml or Haskell is not nearly as big and diverse as the Python community. And that counts in all sorts of ways. You'll have much more trouble finding answers to any questions you have. You'll have less chances for community meetings or educational content. You'll definitely have more trouble finding new developers for your projects, both in business and in open source.
- Torwald 8y ago> and I have to ignore less line noise and boilerplate. Preemptive strike against whitespace comment.
- WilliamEdward 8y agoI completely agree, it's easier to write in Python. This is unfortunately extremely limited, as the convenience comes at the cost of a lack of control over memory and fine details. Other C-based languages may look convoluted but every line will tell you exactly what's going on (which comes with its own set of costs as well).
- bayesian_horse 8y agoThat lack of control doesn't count for a vast amount of people or cases. Data Science, Artificial Intelligence, fields with huge computing demands flock to Python. Especially C++ and C# are notorious for hiding what actually happens, and in a worse way. Their performance however is more predictable, which is important in some cases.
- vukonen 8y agoPython is just an arbitrarily chosen glue language in regards to data science and machine learning. Pretty much all the heavy lifting (where having a lot of control is required for performance) is done by modules written in C or C++. There's not a lot of difference between usage of such modules in Python "hiding" complexity and abstractions used in Java, C#, C++ or Rust except those languages don't actually need to use FFI to get acceptable speed. Computer Science is pretty much just layers and layers of abstractions and the level of abstraction that Go or Python chose to operate on isn't special in any way.
- typon 8y agoCan you show me code that looks as succinct and clear as numpy or Pytorch, but written in those other languages you mentioned
- vukonen 8y agoNumpy is written in C and PyTorch is written in C++. If you mean their APIs, you are right that they are more pleasant to use in Python, but that's because Python trades off performance and control for convenience and ease of use. I only meant to say that in my opinion something like C++ "hiding" behavior in libraries, classes or through operator overloading is not different from Python where easy to use modules hide extreme amounts of complexity. In fact, C++ is better, because it uses FFI way less than Python and by being a lower level language it limits the maximum possible difference in abstraction level between visible and "hidden" code.