News for hackers. Stuff that matters.
Re: Haskell is our first choice for building production soft... by KingOfCoders on Monday January 11, 2021 @06:25AM (#25727510)
I've joined several companies, and getting into a Python code base was the most difficult one, because of the lack of typed method parameters. It was easier with Java and better still with Scala - same for Typescript vs. Javascript. I would be interested, is your Python experience green field or joining a large project? (just wanting to know, not implying anything on your part).
Re: Haskell is our first choice for building production soft... by jim-jim-jim on Monday January 11, 2021 @06:46AM (#25727679)
I had the exact same experience: being a new employee at companies A and B, with large Python and Scala codebases respectively. At company B it was far easier to get on board and start writing code, and it has remained easy. Trying to make sense of Python was truly demoralizing, and a significant part of why I left company A.
Re: Haskell is our first choice for building production soft... by wassenaar10 on Monday January 11, 2021 @10:03AM (#25729754)
> getting into a Python code base was the most difficult one, because of the lack of typed method parameters

Yup, this is probably my main issue with Python. I love writing it when I'm working on personal projects, having to read massive Python code bases at work feels unnecessarily tedious due to how much work you have to do sometimes just to find out the type of something.

Re: Haskell is our first choice for building production soft... by js8 on Monday January 11, 2021 @06:42AM (#25727647)
It was an experience on my personal projects, cca 20 years ago. That's when I started using Python and it really felt more powerful than C++ (and Java) back then. Then around 2008 I became interested in Common Lisp, and then later I made the choice to learn Haskell instead of Clojure. It took me a while before actually getting where is the improvement in Haskell and functional programming. This was all for my own personal projects, which are small programs.

I would still recommend against using Python on a big project. Funny thing, I remember talking to my boss (a mainframe programmer) in 2010, when I solved something with a script in Python, that I wouldn't use it in production, but it's great for small things. Forward to 2020, plenty people use it in products. Maybe the Haskell will be the same, you also have many people today saying "well this is good for experiments but I wouldn't write a product in it".

Re: Haskell is our first choice for building production soft... by mumblemumble on Monday January 11, 2021 @09:50AM (#25729516)
I bounced off of Python a few times before finally taking to it (at a time when I had no choice). I honestly believe that this situation has improved since Python 3.5 or so, purely on the basis of improved standards of documentation, including many more libraries adding type hints to their public interfaces.

I've recently been back to Clojure, and it's the same old aggravation again. It seems that, oftentimes, the only way to know what arguments a function is prepared to accept is to already know what arguments a function is prepared to accept.

I don't want to come across as being too down on dynamic typing - I'm currently in the process of trying to get my company over to Python by any means necessary. What I really want to challenge is the idea, popular in many dynamic typing circles, that static types just get in the way. They can also serve to communicate essential information. If you aren't communicating that information through type annotations, then it's absolutely essential that you do it by some other means.

Re: Haskell is our first choice for building production soft... by ithrow on Monday January 11, 2021 @02:41PM (#25735150)
I don't want to come across as being too down on dynamic typing - I'm currently in the process of trying to get my company over to Python by any means necessary.

Curious, from what and why? ML?

Re: Haskell is our first choice for building production soft... by neutronicus on Monday January 11, 2021 @10:32AM (#25730210)
I worked on a large-ish C++/Python codebase and touching the Python parts was always extremely frustrating for me.

The lack of .h files alone is a huge grievance for me - I had to scroll past definitions even to know names and arities of class methods, read constructors to know what's in class members.

SciPy was nice enough for turning data into a picture, though.

Re: Haskell is our first choice for building production soft... by supergarfield on Monday January 11, 2021 @10:48AM (#25730479)
> The lack of .h files alone is a huge grievance for me

That's an interesting point... Besides C and its derivatives, and OCaml, do other languages have separate definition files? It seems like newer languages, even statically typed, normally don't.

I suspect the reason is that you have to duplicate all definitions, which seems like rote work. It also feels less necessary with IDE tooling: IDEs I know have a view for all definitions in a file.

Re: Haskell is our first choice for building production soft... by mumblemumble on Monday January 11, 2021 @11:17AM (#25730972)
They don't, but, at least in object-oriented languages, much of overall experience is easy enough to replicate with formal interfaces and coding standards.
Re: Haskell is our first choice for building production soft... by KingOfCoders on Monday January 11, 2021 @11:30AM (#25731223)
I thought the nice thing about Modula-2 was that you could browse through interface files to understand some code and then go into implementations.
Re: Haskell is our first choice for building production soft... by mumblemumble on Monday January 11, 2021 @11:37AM (#25731351)
It's true, but there are so many ways to skin that cat. Smalltalk, for example, gives an even more fluid way to browse at a high level and then drill in, and it doesn't (necessarily) have source code files in the first place.
Re: Haskell is our first choice for building production soft... by dehrmann on Monday January 11, 2021 @12:55PM (#25732837)
> getting into a Python code base was the most difficult one, because of the lack of typed method parameters

One place I worked used to be a Python shop, but had migrated most of its services to Java. Chatting with one of the engineering leads for a large Python system that had a lot of business logic, he said where Python actually fails to scale is lines of code and developers because lack of types makes it harder to reason about and harder to make changes safely. This obviously changed now that type annotations are a thing.

Re: Haskell is our first choice for building production soft... by mattnewton on Monday January 11, 2021 @12:28PM (#25732332)
For new python work that might grow, I highly recommend pytype annotations. It’s not perfect but it’s as close to the best of both worlds that I have ever seen in production.
Re: Haskell is our first choice for building production soft... by gameswithgo on Monday January 11, 2021 @08:49AM (#25728797)
there are controlled studies supporting this idea the function parameters not having types slows down productivity
Re: Haskell is our first choice for building production soft... by tome on Monday January 11, 2021 @09:05AM (#25728961)
It would be helpful if you linked them ...