Hacker News new | ask | show | jobs
by inputcoffee 2539 days ago
I am always confused when people talk about the language itself.

In my experience, python is used for Tensorflow, or Pandas, or Django, or Flask, or pytorch or something else that runs on top of it. Sometimes it is even more specialized and I need a wrapper for an API to let me talk to some web data. Maybe I need a crawler/scraper and a parser. There is a specialized language on top of the language.

So when someone says, oh this language is better with objects, or has some syntax thing or the other, or I can reason about it I am left confused.

Its like if I were talking to a professional shoe designer and I ask for hiking boots and they tell me that they're really into having at least two tones to offset the lace and the heels or something.

What am I missing? I want to reason about the language too, but doesn't that pale in comparison to being able to run a specialized library?

5 comments

You're missing that people write mountains of code in Python and similar languages; they are not always just for a small amount of glue to gain access to some specialized libraries.
Well, I assume people write mountains of code in the library. If you're making a machine learning product, that is still a lot of work.

However, writing your own Tensorflow interface would take several human lifetimes to get it right, and Google already has provided it. So it seems that is not the part you would re-write no matter how good the language is.

> In my experience, python is used for Tensorflow, or Pandas, or Django, or Flask, or pytorch or something else that runs on top of it.

Is this your experience of using python or reading about it? I don't know your background so I apologize for making some assumptions about the source of your confusion. It sounds like you don't have a ton of experience programming, so let me start with a broadly: Python is a language in sense that English is a language, but these "something else that runs on top of it", are more like specialized vocabulary or jargon than "languages on top of the language".

English gives you the grammar/structure/spelling to communicate; it's a foundation. But it also gives you general vocabulary; adjectives and adverbs blend and interact with any new vocabulary that might come into play. It doesn't matter if its a poem, or novel, or a technical documentation, or a text book, there is still a lot of English-ness to it.

In the same way, Python as a language is still the substrate that each of those tools (Tensorflow, or Pandas, or Django, or Flask) are interacted with. I agree with what you're getting at, that maybe the tools are more important than the language. When people talk about their like for python the could talk about either: the language itself or the culture/ecosystem around the language. Some inherent to the language, so a quirk of it's history.

This applies as much to natural language. You might hear someone love the sound of Spanish or French, or praise the regularity of Latin spelling, or love Greek for the wealth of ancient, influential texts that it gives access to.

In the case of python you get a lot of praise from both angles. People love the language for it's ecosystem, sure; but also for how it does white spacing, its brevity, the specifics of its typing, where it does and dosn't need parentheses, REPLability, etc.

I am not offended that you think I may not program. That is fine. (I mean less than some, more than others. I have coded up the examples I brought up.)

But you haven't responded to the argument. If someone urges you to use Racket, and you have task in front of you (say, put up a website), it sort of matters whether Racket has a framework more than if it has brackets, indents or curly braces.

> What am I missing? I want to reason about the language too, but doesn't that pale in comparison to being able to run a specialized library?

> But you haven't responded to the argument. If someone urges you to use Racket [...] it sort of matters whether Racket has a framework [...]

I guess I misunderstood the question; I didn't realize you were making that argument rather than the actually wondering what other thing people care about. I guess the more direct answer would be that questions like "doesn't that pale in comparison" and "it sort of matters" are kinda presumptions about the motivations of a person "who urges you to use Racket".

Articles like this are as much targeted towards "end-user" programmers as they are for the programmers who built the frameworks in the first place. Flask, Django, etc. exist because people that like Python for things like "if it has brackets, indents or curly braces" wanted those tools in that language.

That's what I was trying to get at before: different people are excited by different things (obviously) but that languages absolutely have draws independent of tools that exist in it. Not for everyone, but not for nobody neither.

Machine learning is a slightly unusual case with powerful important libraries doing the work, with the language on top just being used for orchestration, data loading etc. If that's what you're doing, then you're right, the ML framework availability is far more important.

That's a still a relatively small corner of programming in general though. For most languages when talking about libraries we talk about the 'ecosystem' - what is the availability and quality of all the bits and pieces that we can build upon. It's a question of many small things, rather than one large thing.

Ecosystem differences are less absolute than 'has tensorflow', and so can be weighed up against other language advantages and disadvantages.

Web frameworks are an interesting case because you (usually) don't use them as simple libraries. The interaction with them tends to be complex enough that good frameworks are built around what the language is good at. If the language is right for the sort of programming you want to do, then the framework will express that.

There's a lot more to languages than block syntax, and pretty much every language has a web framework.
The amount of code available, and its quality, is one aspect of a language's ecosystem that most people take into account when discussing its merits.

It's quite possible to also discuss the language itself independently of how much code is available for it, while acknowledging that it's an important factor for many people.

Flask equivalents exist in every language. Tensorflow bindings are available in many. Pandas is more specific to Python, but using dataframes in Python vs R vs Julia each has a different feel.
True, if we were talking about Data science, and you were bringing up Python or R or Julia, fair enough.

But if you're talking about Racket, I would want to know what you can do with it. Does it have a data science library? A web app framework?

Some task-language pairs work better than others, either because of the libraries or the language features or both.

Libraries make Python better than Lisp for machine learning. Language features make Haskell better than Python for formal verification.

Flask and Django aren't really "specialized libraries" though.