Live data from Hacker News

Python 1.0.0 is out (1994)

groups.google.com

141–150 of 150 posts

Re: Python 1.0.0 is out (1994)

#141

Earlier quoted context omitted.

Arguably, that would be Java, which was introduced in 1995. For whatever hey are worth, most language popularity indexes (TIOBE, LangPop) place Java above Python with quite a large margin. Java may not get much exposure here or in startups, but if you go out in the real world of 'boring' business applications, Java is pretty much the defacto language (together with C#).

I don't get why Python can't replace Java in almost all domains. It's exceptionally well structured and fast enough for most use cases.

I love python. And hate Java (as logical is to hate a language, ok?)

Java have a super big assets: A very powerfull VM. And this is the part where python is not as good. Is sad that Python3 was not used as the moment to build up a good VM, but well, history is history.

And this actually mean: Put a very strong and well funded team behind it. Make a good VM for python is hard

Re: Python 1.0.0 is out (1994)

#142

Earlier quoted context omitted.

Yes. Very much still an issue. There's mountains of Python 2 code still out there and loads of software starts with Python 2 and then maybe adds Python 3 support later. Hopefully. For example [issue #1]( https://github.com/tensorflow/tensorflow/issues/1 ) for Tensorflow - one of the most popular Python packages out there is "add Python 3 support". It's one of the biggest reasons not to use Python IMO. No other popula…

> It's one of the biggest reasons not to use Python IMO. No other popular language has this issue. No other popular language struggles with issues of backwards incompatibility? That's a huge exaggeration. > Difficult to distribute standalone programs. You end up having to bundle an interpreter which is a pain. I guess then you generally prefer not to use interpreted languages? > So many programs include python interp…

> No other popular language struggles with issues of backwards incompatibility? That's a huge exaggeration.

Pretty much true. As far as I know C, C++, Java, C#, Javascript, etc. have never broken backwards compatibility. At least not in a serious way (like changing how `print` works).

> There's usually a system Python which system programs should reference explicitly if they care.

Not on Windows.

Re: Python 1.0.0 is out (1994)

#143
post #133
post #132

Earlier quoted context omitted.

Those projects were done and ran in actual hardware. I am making the counter point regarding OP statement that Python is suitable to fully replace Java ,regardless of the implementation. Lets not mix languages and implementations. So given that even PyPy does not match the performance of most Java implementations, it seems a bit hard to consider the scenario of Python fully replacing Java's use cases.

Sure, in Java applications where performance is critical it might be hard. Is this all Java applications? Is this even most Java applications? I'm not necessarily agreeing with the original point that you can rewrite any Java app in Python, because that's ridiculous as well. But your counterpoint that it can only happen "when a user-space could be written in it" is very poorly chosen.

Actually today I realized that my line of thought regarding having an OS written in Python was wrong, as that is exactly what MicroPython is.

As it runs bare-metal, the runtime plays the role of an OS.

Symbian also allowed for apps to be written in Python, shortly before being axed.

Re: Python 1.0.0 is out (1994)

#144
post #122

Earlier quoted context omitted.

Every time I look at Julia, I like it a lot, right up to the point where I remember that indexing is 1-based and I loose the will to go on.

Rolls eyes . 0 or 1 based indexing is one of the smallest thing to worry about in a programming language.

I disagree when you're used to 0based array languages and you use a 1based array language (or vice versa of course), you have a high risk of 'off by one' errors.

Re: Python 1.0.0 is out (1994)

#145
post #33

Earlier quoted context omitted.

It may not be the most efficient one out there, but it certainly is the most productive, atleast for me. God I love the language. The only language, that allows my thoughts to flow alongside writing code that allows my thoughts to manifest. I am well experienced with C# as well, but something about statically typed stuff (I worked with C# before the dynamic stuff wasn't added to it) breaks the flow of thoughts. With…

C# does not in any way represent the best that static typing has to offer. Try F#, Haskell or OCaml seriously before discounting static typing. These functional languages offer much better safety (e.g. no nulls, no casts, case exhaustiveness) and are as succinct as Python. They also generalise a lot of features that are ad-hoc in C# and Python (e.g. async-await is a library in F# and Haskell). For me, using Haskell i…

After a decade of experience developing big systems in C and C++ followed by a decade of developing big systems in Python, my own experience is that static vs. dynamic typing isn't actually the issue that normally matters in a big system. Static typing is great for optimizing performance and for having efficient interaction with the underlying system libraries. So the closer your work is to the underlying machine and its types, the more important static typing is. But only a small part of any big system is usually like that, and static typing makes code harder to develop, harder to read, and needlessly limited in scope (overly specifying down to a machine type, when the actual algorithm may be far more general than that). Dynamic typing addresses those concerns, but it makes for a brittle system where each component makes a lot of undocumented assumptions about what might be passed in, with users of those components often just crossing their fingers about what the component might accept. Worse, dynamically typed systems eventually end up accruing pages and pages of hand-written documentation, assertions, and exceptions as people try to make them more well validated against user and external-programmer errors. All that well-intentioned "hardening" inevitably eliminates the readability benefit, except during initial development (when such checking is conveniently skipped). So neither static nor dynamic typing alone makes it easy to build big systems.

What does make it easy to build big systems is semantic typing. I.e., the ability not just to declare a machine type, but to declare the actual assumptions made by any component about its inputs. In some low-level code those assumptions are about machine types (argument i must be an 8-bit integer, and s must be a string). But in other cases the assumptions are about what the argument represents (argument s is a string denoting a filename (not just any string), argument n is a number between 1 and 36.2 (regardless of machine type)). Any given component makes some assumptions about what it can handle, and if you can easily declare those assumptions and validate against them, then the component is easy to read, easy to understand, easy to use, safe against user errors, and easy to implement (as you don't have to write any code to handle conditions not allowed by the declarations).

The beauty of Python is that semantic typing can be implemented very naturally within the language itself, which is crucial because it has to be extensible to handle any given domain's objects if it is to be of use. There are a variety of options, but my own package Param (https://ioam.github.io/param) provides support for semantic typing, and if you look at some of the examples there you should be able to get a feeling for how you can have the best of all worlds in Python: freedom where you can handle it, constraints where you want them, and everyone being up front about what they are doing in a way that makes big teams able to work freely with whatever other people come up with.

Re: Python 1.0.0 is out (1994)

#146
post #33

Earlier quoted context omitted.

C# does not in any way represent the best that static typing has to offer. Try F#, Haskell or OCaml seriously before discounting static typing. These functional languages offer much better safety (e.g. no nulls, no casts, case exhaustiveness) and are as succinct as Python. They also generalise a lot of features that are ad-hoc in C# and Python (e.g. async-await is a library in F# and Haskell). For me, using Haskell i…

After a decade of experience developing big systems in C and C++ followed by a decade of developing big systems in Python, my own experience is that static vs. dynamic typing isn't actually the issue that normally matters in a big system. Static typing is great for optimizing performance and for having efficient interaction with the underlying system libraries. So the closer your work is to the underlying machine and…

Types in any modern statically-typed language should go well beyond simple "machine types" and also capture semantics. If one is representing everything with Strings and Doubles, then the type system is not being fully exploited.

Refinement types can statically capture range checks and other similar assertions. There is a project to add them to Haskell (Liquid Haskell) which is already quite useable.

Of course, static types are machine checked prior to running the program. None of your Python "types" exist until runtime, by which point it is too late. The program crashing due to an assertion failed error is logically still a crash.

We will have to agree to disagree on the roll of static types when building large systems. I have also spent over a decade working on very large codebases. The more "dynamic" a system was (late binding, reflection, string-based lookup, variants), the harder it was to statically reason about the code and avoid introducing errors. In a fast-paced business where hundreds of people are changing the same codebase daily, I do not understand how one could stay sane without static types. Python was never designed with such use-cases in mind.

Re: Python 1.0.0 is out (1994)

#147

Earlier quoted context omitted.

After a decade of experience developing big systems in C and C++ followed by a decade of developing big systems in Python, my own experience is that static vs. dynamic typing isn't actually the issue that normally matters in a big system. Static typing is great for optimizing performance and for having efficient interaction with the underlying system libraries. So the closer your work is to the underlying machine and…

Types in any modern statically-typed language should go well beyond simple "machine types" and also capture semantics. If one is representing everything with Strings and Doubles, then the type system is not being fully exploited. Refinement types can statically capture range checks and other similar assertions. There is a project to add them to Haskell (Liquid Haskell) which is already quite useable. Of course, stati…

Sounds like we'll have to agree to disagree about a lot of things! :-) Having types specified statically is a recipe for generating untold many different versions of the same thing, plus untold bits of glue between them, which leads to huge codebases that need hundreds of people to work on them. Python was designed to avoid huge codebases and let smaller numbers of programmers be more efficient. (Of course, so was Haskell, but that's mostly a straw man, given how few large-scale users of Haskell there are in industry...)

Re: Python 1.0.0 is out (1994)

#148

Earlier quoted context omitted.

Types in any modern statically-typed language should go well beyond simple "machine types" and also capture semantics. If one is representing everything with Strings and Doubles, then the type system is not being fully exploited. Refinement types can statically capture range checks and other similar assertions. There is a project to add them to Haskell (Liquid Haskell) which is already quite useable. Of course, stati…

Sounds like we'll have to agree to disagree about a lot of things! :-) Having types specified statically is a recipe for generating untold many different versions of the same thing, plus untold bits of glue between them, which leads to huge codebases that need hundreds of people to work on them. Python was designed to avoid huge codebases and let smaller numbers of programmers be more efficient. (Of course, so was Ha…

> Having types specified statically is a recipe for generating untold many different versions of the same thing, plus untold bits of glue between them

Polymorphism is for addressing exactly that objection.

Re: Python 1.0.0 is out (1994)

#149
post #148

Earlier quoted context omitted.

Sounds like we'll have to agree to disagree about a lot of things! :-) Having types specified statically is a recipe for generating untold many different versions of the same thing, plus untold bits of glue between them, which leads to huge codebases that need hundreds of people to work on them. Python was designed to avoid huge codebases and let smaller numbers of programmers be more efficient. (Of course, so was Ha…

> Having types specified statically is a recipe for generating untold many different versions of the same thing, plus untold bits of glue between them Polymorphism is for addressing exactly that objection.

And Python's duck typing is for addressing the needless constraints that statically typed polymorphism introduces. Discussions like this can go on forever! :-)
Post reply on HN