9 ms·
After 7 years in production, Scarf has reluctantly moved away from Haskell
- noelwelsh 2mo agoWow. Not a Haskell user, but a big user of other languages with expressive type systems (mostly Scala; some Rust). My experience is the complete opposite. I can't imagine using a language without a good type system to catch all the junk the LLM produces. In fact I thought people would move away from languages from poor type systems, like Python, given the cost of using languages with expressive type systems has decreased with LLMs.
- ffreire 2mo agoIME Python has been very pleasant to use with types, even though they are not nearly as expressive as Haskell. I've noticed a shift in my own work where I spend more time playing with/manipulating change than I do making sure things type check. That does happen, of course, but it happens with less frequency then when I was writing Haskell by hand. During that time, I'd have stack running tests on file change and it was pretty smooth as well, but that workflow breaks down a bit with the current generation of agent harnesses we have.
- giraffe_lady 2mo agoI'm pretty sure that's the general trend and it will continue. But I do think what benefits LLMs is the speed and accuracy of feedback. Type systems cover the accuracy part, but haskell was killing them on speed. It seems like a strange choice to go so far the other way on accuracy when there's a lot of languages in between. But I'm not familiar with the project so not in a position to call it. It's not also really about expressiveness IMO. I've found LLMs to be best with more constrained type systems: they are better at ocaml than they are at typescript.
- Tarean 2mo agoJava can also have 15+ minute cold compiles on large projects if you kill all caches. It's less bad on smaller codebases because you don't have to recompile dependencies if you target a bytecode vm, but if you always gate feedback on a cold compile in a fresh VM you just aren't gonna beat an interpreted language But I'd look at people a bit oddly if they said: 'We didn't want to set up CI caching and compiled languages took 30 minutes per run so we changed our entire codebase to python'. Maybe it makes sense for them, and caching across dynamically spawned VM's is admittedly a harder problem which most build systems aren't great at, but still. I can easily believe that getting build caching to be reliable would be a lot of work, but is it more work than a full rewrite of a significant codebase?
- pjmlp 2mo agoAdditionally in modern Java there are even the options of AOT and JIT caches, which can be reused across runs. Or if staying on Linux, JVM snapshots.
- hunterpayne 2mo agojavac doesn't really do a whole lot. Consequently, whatever compile time you are complaining about would be worse with any other compiled language. Most optimization work in Java happens at runtime.
- pjmlp 2mo agoFirst of all I am not complaining about anything. Secondly, there are several ways how Java source code becomes machine code, depending on which JVM and JDK is being used, not taking into account the ART cousin.
- saghm 2mo ago> I've found LLMs to be best with more constrained type systems: they are better at ocaml than they are at typescript. When the potential set of behaviors you could write a program to have is infinite, but the actual behavior you want is singular, a programming language is more importantly defined by which ones it eliminates up front than which ones it lets you write (assuming it lets you write the one you want at all, but that's almost always going to be the case for most general purpose languages). Bugs are just false positives in this framing, where the program you wrote seems like the one you wanted, but there's some divergence between what you thought you were getting and what you actually got, and catching some of those up front is a huge part of why type systems are so useful.
- em-bee 2mo agoexactly, i find the article a wierd take. i would have thougt that being able to catch errors at compile time is the assurance that the LLM generated code is actually decent. so does this mean that the LLM writes code that is so good that the compiler does not find any more errors? or is it due to the nature of haskell that makes it hard to write bad code to begin with? or just that because the haskell compiler catches more errors there is less broken haskell code for the AI to train on? and what does that mean for the switch to python? if the python compiler/interpreter doesn't catch as many errors do we even know that the code is good? or is this more like the belief if the LLM can generate good haskell code, surely it can also generate good python? what's the solution here? speeding up the haskell compiler? if that were easy, would it not already have happened? personally i still don't trust LLM code generation. i didn't learn haskell yet, but what i hear about it makes me more likely to trust that LLMs can generate good haskell code than python. i believe the future in LLM code generation is code that can be proven to be correct. proving code correct has been a research topic at some point.
- tonyarkles 2mo ago> what's the solution here? speeding up the haskell compiler? if that were easy, would it not already have happened? I suspect you’ve nailed the answer: it’s probably not easy, although it’s also possible that it just hasn’t ever had a lot of attention paid to it because it’s been generally fast enough for their user base?
- antonvs 2mo agoPart of the issue is probably that Haskell build performance is perfectly fine for local development, even on rather large systems. But in commercial production environments, CI pipelines tend to want to build everything from scratch every time, and that slows everything down. Rust has the same issue. Both languages, by default, compile all their dependencies from source, rather than obtaining precompiled artifacts from a repo the way some languages (like Java) do. And their compilers are slower than e.g. Go's. As the article mentions, various kinds of caching can help with that, but that's extra stuff you have to manage and deal with. I'm not sure this is a bad thing, though. Haskell co-creator Simon Peyton-Jones coined the unofficial Haskell motto, "avoid success at all costs". I tend to agree with that. It would be difficult for Haskell to maintain its conceptual edge if it were a mainstream commercial language.
- koito17 2mo agoRecently had to touch a Python project at work. Just setting up the editor needed me to use 2-3 tools out of: pyright, basedpyright, ruff, ty, mypy, and possibly other tools I'm forgetting that kind of do the same thing but throw errors in different parts of the codebase. Also, for some reason Optional[T] became deprecated, just as the ecosystem finally embraced types ~3 years ago. In fact, one my company's greenfield projects decided to use TypeScript instead of Python for the [surprisingly] more consistent tooling, and the fact that the big LLM providers all have official TypeScript SDKs anyway. Also, for agentic coding, LLMs don't seem noticeably worse at TypeScript than Python. My experience can be summarized as: - for some reason we need 2-3 static analysis tools just for typechecking - no tool understands each other's comment directives - each tool reports a different error in your codebase - even big libraries (e.g. matplotlib) make half their functions return Any - you'll be tempted to silence the "partially unknown type" warnings, and you'll have to do it for each tool that's running.
- mjr00 2mo ago> Also, for some reason Optional[T] became deprecated, just as the ecosystem finally embraced types ~3 years ago. Optional[T] is now T | None. Means exactly the same thing but doesn't require an import. Support for the older syntax presumably won't be removed for a long while regardless.
- wizzwizz4 2mo agoOptional[T] was always just an abbreviation for Union[T, None], anyway: it's unsurprising that they didn't choose to give it its own syntax.
- apelapan 2mo agoIt is only pyright/basedpyright that flags Optional[T] as deprecated as far as I am aware. Optional isn't actually deprecated by Python or anyone else. You can disable it in the pyright settings. In my opinion T | None is not a meaningful improvement and insisting on changing it everywhere causes a whole bunch of churn and needlessly makes code stop working on older Python versions.
- 2mo ago
- calebkaiser 2mo agoI think the author largely agrees with you re: type systems and LLMs. He's pretty explicit that Haskell should be very well positioned to be a power language for LLM-assisted programming, but that the Haskell ecosystem presents the bottlenecks that make it harder. I don't personally use Haskell for anything, but I use Lean and occasionally some other languages with expressive type systems, and like you I've found it to be a pretty great experience for working with LLMs. But I've also experienced what the author is talking about, with languages that sit at different points on the type system spectrum, regarding a languages ecosystem/infra layer becoming a bottleneck. I don't think it's ultimately about the type system but the broader ergonomics of the language/ecosystem. So I think his criticism is less than expressive type systems are a pre-LLM concept, and more that Haskell has an individually bad "agentic coding story".
- ErroneousBosh 2mo ago> I can't imagine using a language without a good type system to catch all the junk the LLM produces One approach would be to not use LLMs.
- threethirtytwo 2mo agoAnother approach is career suicide. Both moves are isomorphic in many companies today and will be pretty much all companies in the future.
- ErroneousBosh 2mo agoI don't really understand your comment. Are you saying it's "career suicide" to not use AI slop?
- threethirtytwo 2mo agoYes. To add more nuance to what I'm saying the trajectory of the industry and society is heading towards this. Your company may not be like this now, but the future is where this is all converging. I can tell you at my current company as of now, if you're not using AI it is essentially career suicide for that specific company. I think these statements are true: 1. An expert using AI is better than an expert without using AI. 2. A mediocre programmer using AI can roughly match an expert that isn't using AI and potentially surpass them in many cases. 3. The companies that aren't using AI are companies that haven't realized that the above 2 things are true.
- ErroneousBosh 2mo agoAI makes people produce consistently worse results. I will not under any circumstances use AI, not least because it cannot possibly solve a problem I have. At work, I've already had to "fix" some incredibly faulty projects caused by well-intentioned people thinking they can use AI to write code. I started with `rm -rf *` and moved on from there.
- jimbokun 2mo agoYou should read the article before replying.
- mpweiher 2mo agoTFA: The type safety we gave up hasn’t been noticeable in any concrete way yet, especially considering our test coverage has never been better.
- roenxi 2mo agoIt is a bit surprising, I'd have guessed the same. Although in hindsight I could believe that type systems aren't particularly strong as an anti-bug layer. They help. They're a big boon for coordinating large numbers of mid- and low- skill programmers though because it forces them to go further in documenting their function signatures and makes it much more obvious where the problems are when refactoring spaghetti code because things break loudly. Refactoring spaghetti has become easier in the LLM era because it can just read all the code, and there is now a skill floor on the programmers that kicks in somewhere relatively high. The benefits of type systems might have suffered because of that.
- antonvs 2mo ago> I could believe that type systems aren't particularly strong as an anti-bug layer. They're absolutely huge for this, but you have to write code to take advantage of the guarantees that the type system can offer. As Yaron Minsky at Jane Street put it, "make illegal states unrepresentable". Stronger type systems make it possible to make more states unrepresentable. You end up with what amounts to static debugging - you debug your code at compile time. Sure, it's still possible for runtime bugs to occur, but entire classes of bugs are eliminated, plus it becomes possible to have static assurances about program states about things that most language don't even try to express in the type system, like security.
- DanielHB 2mo agoLanguages like C and Go are so weak in the type system that it barely feels better than fully dynamic languages.
- antonvs 2mo agoI agree, I was referring to powerful type systems.
- bbkane 2mo agoAt least in C and Go, you can get structs where it's easy to reason about the fields. In Python, a "class" is simply a dict under the covers and (by default at least) you can add attributes to it after definition (as well as things like properties). So it's difficult to reason about what the fields are at any given time. And that's assuming people USE classes! I've seen code where all the state is in one giant ever-changing dictionary and you have to pull out a debugger just to figure out what's IN the thing! God help you if you mispell a key! Maybe you work with better quality code than I do, but I find Go's type system a lot easier to reason about than Python's.
- japgolly 2mo agoIt's about the feedback loop being so slow. Agents often compile and run tests to verify their work
- timcobb 2mo agoRight, they run tests too. A compiler is like a quick test before tests. How are you going to cut out that check and let the LLM "write it faster" is beyond me. The compiler catches errors across codebases that today's LLM can't economically or reliably put into context to perform similar checks. They're totally different tools, today. Also, you can just compile less frequently. But hey, if LLMs are what drove this person from Haskell to Lisp then all the power to them!
- antonvs 2mo ago> But hey, if LLMs are what drove this person from Haskell to Lisp then all the power to them! I didn't see Lisp mentioned in the article. They moved to Python. Which is certainly a choice.
- pjmlp 2mo agoYeah, basically all the Lisp without the machine code generation machinery.
- antonvs 2mo agoHaving worked professionally with Common Lisp, I can tell you that’s not even remotely true. Besides, “machine code generation” is not a fundamental part of Lisp. Some of the most famous implementations were pure interpreters.
- pjmlp 2mo agoSuch as? Having known Lisp since 1996, and avid digital archaeologist, I wonder which famous implementations are those.
- newaccountman2 2mo agoI general I agree with you. I think expressive type systems are superior, and they are even better in the LLM era. I would quibble though that Python's is actually pretty good at this point, and, despite what the below poster is saying, straight-forward to set up and use. I am still perplexed that the author chose Python over Rust or Scala or TypeScript though, especially given they presumably want to migrate a Haskell codebase.
- trollbridge 2mo agoI'm perplexed by that too. We are migrating from Python to Rust simply because Rust is more suited towards unattended agentic loops, and we want to move in that direction. The results you get from a harness/agent/LLM with Rust are simply better than Python because the agent gets much better feedback from the compiler when it makes dumb mistakes. Python doesn't have anything even close to something like SQLx, which is a natural fit in Rust because of how Rust macros work.
- newaccountman2 2mo ago> Python doesn't have anything even close to something like SQLx, which is a natural fit in Rust because of how Rust macros work. I'd be interested in hearing/discussing more about this. I was very surprised, when I embarked on my side project, that Rust's options for SQL ORMs all seem so weird. I think what you are referring to is the derivation of FromRow and stuff with SQLx, right?
- trollbridge 2mo agoI don't paticularly want to use an ORM. What SQLx does is a bit different - it statically analyses the SQL in your program against the database and ensures the SQL is valid. This means you have rock solid assurance your program won't have database syntax errors at runtime. Basically it's just one less thing to worry about, and it's ideally suited for LLM-generated code.
- 2mo ago
- dionian 2mo agoI have worked extensively with FP and non FP codebases with LLM. I find my highly type safe FP code works really really well with LLMs
- threethirtytwo 2mo agoYou’d be surprised. It works quite well without the static guard rails. But the static guard rails do improve things but not in some extremely obvious way.
- antonvs 2mo ago> "At Scarf, we started doing all new API work in Python." Start the countdown timer for how long it takes them to discover that was a mistake. Nothing to do with Haskell, but good grief, LLMs do not in any way, shape or form save you from the deep, unfixable problems with Python. At the very least you need all the static checking machinery like Ruff, Pyright, and hefty unit tests that take the place of typechecking if you don't want obvious failures to only show up in production. I had this recently with an ML training pipeline, where Python is essentially forced on us. A dynamic error occurred after 17 hours of training - something that a real type system could have easily caught. The solution that the LLM came up to prevent this in future was a complicated Enum-based system that just made me wish I could use a real programming language.
- doug_durham 2mo agoUnfixable errors? Why unfixable? Python is Turing complete. I can see difficult to fix, but not unfixable. LLMs lower the bar to refactoring code mistakes.
- gravifer 2mo agoSo is excel. I actually enjoy python and astral tools a lot, but I think you are grasping for air here.
- pjmlp 2mo agoIt is a win win situation, they get to write a new blog post about doing a Python to Rust rewrite.
- 2mo ago
- forgotusername6 2mo agoI have heard "the poor type safety" argument from writers of strongly typed languages for many many years. Having written js and python for a large amount of my carrier I can count on one hand the number of times I've found a bug that was due to a type issue. With LLMs it has been the same pattern. They don't seem to produce issues with types.
- tezza 2mo agowell i’ve come across it loads, especially 1/2) during REPL style build outs and 2/2) calling libraries and frameworks you are not yet familiar with. perl another offender… is it a hash? is it an arrayref? over time you get it right, but by trial and error and looping. json suffers this too, arrays different from strings, different from numbers etc, but opaque until checked and liable to change
- IshKebab 2mo agoThere's absolutely no way that's true.
- forgotusername6 2mo agoMy experience is only anecdotal but I can assure you it is true!
- tome 2mo agoIt's easy to talk at cross purposes in discussions like this. There are two implicit claims * Few bugs occurred due to type issues (which I think you are asserting) * You can design your program with types so that what would be a bug due to a type issue doesn't compile (which IshKebab may be thinking) Both of these can be true at once
- sdeframond 2mo ago> I can count on one hand the number of times I've found a bug that was due to a type issue. Most bugs aren't type issues until you make them be type issues by expressing some business invariant in types. Refactoring makes an exception not being caught the same way as before ? Type issue. Mixing up some ids ? Type issue. Etc. Now that can also be emulated with extensive tests. But isn't that a concern for OP as well ?
- zahllos 2mo agoI've never done anything "serious" with haskell, just small personal projects. Mostly this is because I've found the ecosystem to be a pain - when I was trying stack stack was the thing to use but from what I can tell ghcup+cabal now work better. If you push through that you end up with code written in a language people have used for formal proof (seL4 model is Haskell) and deployment wise a binary that +/- libraries you depend on ought to be reasonably portable. I'm very surprised anyone would want to go the other way. Same ecosystem pain, plus you need to start shipping interpreters or containers, plus the language just doesn't really compare.
- pseudohadamard 2mo agoI know several people who are serious Haskell users despite, like you, using it just for small personal projects. All of them are quite some way down the autism spectrum and will casually toss around Haskell concepts that require about 30 minutes of googling by anyone else present in the conversation to try to understand. Get two or more of them talking to each other and everyone else present is more or less excluded from the conversation... and this is something they're doing just for fun, not because they're paid to do it. It could just be a coincidence of statistics, but it does cover every Haskell user I know (needless to say, these people are much smarter than I am).
- garethrowlands 2mo agoThe number one hard working concept in Haskell is parameterisation. A typical Haskell concept is just a concept, not a Haskell concept.
- casey2 2mo agoIt makes sense, Haskell is basically just python from the code perspective. If it's faster to generate code than to compile it you might as well just keep generating til it works for your specific task.
- raverbashing 2mo agoMy experience has been that the more type/safety checks the more chances there are of the AI getting stuck into a stupid loop Because a lot of times it's missing the way of making the needed steps for the conversion (or it's just not obvious) Sometimes it needs some nudging Also this comment is a bit generic, it can also apply to cases where it's not an obvious "type check" but a redundancy that needs to exist but the AI can't get around
- adrian_b 2mo agoThe only complaint against Haskell was about long compilation times. I agree that short compilation times are very desirable, but I do not see why Python must be the solution for that. I do not know whether Haskell can be compiled quickly, but from my experience, I am very certain that short compilation times are easily achievable for languages with good static type checking, especially with compilers that have different options that allow choosing between fast compilation and heavily optimized compilation. An optimized compilation may require a much longer time than a fast compilation, but that has no relationship with the programming language used in the source text, but only with the intermediate representation used by the compiler and the target CPU ISA. Usually, if you compare the compilation times of multiple programming languages, all the compilation times with fast compilation options are much shorter than all the times with high-optimization options, so the programming language choice may be less important than the chosen compiler and its command-line options. When you try to optimize a project by generating many variants with a LLM, I doubt that all those variants will be generated from scratch, completely independently, even if only for the reason that when using a commercial LLM the cost of a completely new variant will be much higher, by requiring many more tokens, so whenever possible it is preferable to generate other variants by just patching previous variants. Whenever a variant is generated by editing a previous variant, incremental compilation can be used, which should be pretty much instant on modern computers.
- nextaccountic 2mo ago> The only complaint against Haskell was about long compilation times. There is also this > How do we make library docs full of copy-pastable, realistic examples, not just beautiful types? Which is useful for humans as well as agents. Haskell indeed has a very bad track record of documenting its libraries. For many people, just having the function signatures is documentation enough. Rust is equally bad at compile times (if not worse) but its standards for documentation is at another level
- gbacon 2mo ago> For many people, just having the function signatures is documentation enough. You make a fair point about a documentation gap. The first step is always defining the problem. Wanting to add lots of realistic examples sounds like a wish for more tutorial or beginner-friendly content. Do you see the problem differently? On the other hand, a given pure function type only has only so many possible implementations — why tools such as djinn and MagicHaskeller exist or why Hoogle is actually useful, unlike the horror of searching for every `void (*)(const char *)` in C. https://hackage.haskell.org/package/djinn https://hackage.haskell.org/package/djinn https://hackage.haskell.org/package/MagicHaskeller https://hackage.haskell.org/package/MagicHaskeller https://hoogle.haskell.org/ https://hoogle.haskell.org/ From that perspective, Haskell docs tend to be more expert-friendly — perhaps a rationalization, granted — which seems ideally suited for an in-IDE model to help bridge between developer intent and typechecked code. However, this comes at the expense of putting in the reps to rewire the developer’s brain to think in functional terms and the resulting mind opening and horizon expansion to think new thoughts she wasn’t capable of even considering. In these days of LLMs, fretting over that particular opportunity cost may be thinking nostalgically about the loss of craftsmanship in fine, well-balanced buggy whips. In the limit now, will all programming be strictly literate?
- fjdjshsh 2mo agoThe problem in Scarf's case wasn't Haskell's type system, but the long compile time for even small changes.
- dnautics 2mo ago> I can't imagine using a language without a good type system have you tried? i use elixir and carefully watch the agents and its very seldom making typing mistakes (elixir is in-between, it's typed but only as a checker). ultimately typing doesn't help as much because it's nonlocal information. if the system can locally infer what the shape of functions is, it's way better.
- brainless 2mo ago"i use elixir and carefully watch" - I do not watch agents, at all. Rust and Typescript. When I use Typescript only I have some guidelines so that we build the stack to be as strict and type driven as possible.
- vcf 2mo agoSimilar for me, I don’t want to babysit agents . I’m sticking with Python for the libraries (data science ecosystem), but I find that imposing ty and a few reasonable ruff rules (imposed with pre-commit so the agent can fix things automatically) improves agent-generated code a lot.
- dnautics 2mo agoarchitecture matters more. at least for now, you should watch (not babysit) your agent, because it will slop up your architecture while you're not looking.
- dnautics 2mo agoI'm watching because I'm particular about architecture. current project (company runs on it, its jira-lite + obsidian + benchling + a lab notebook, mendeley + a lims + a hardware kiosk that uploads scientific measurements directly to the notebook, everything running on cqrs and quill delta for operational transforms) is like ~100k loc and most new features are trivial (i just added a pcr wizard) because claude knows what particular patterns i use (and they are deliberately chosen to be more straightforward that conventional elixir/phoenix), but i do catch claude trying to do something chaotic from time to time. i suspect sometimes anthropic is routing me to a dumber model, because i can sense it happening, and if i keep going, it will make things really bad from an organizational standpoint, abd i have to roll back, but if i go to bed and pick it up next morning its fine. next features are integrating a small transformer i built to codon optimize and probably "slack" to better communicate with the 2 ppl who work for me. is your rust+typescript project at that level of complexity?
- aioproductos 2mo ago[flagged]
- muragekibicho 2mo agoI'm not trying to be reductive but the article's a lot of words for "We're vibecoding our app now and the glorious (almost almighty) Haskell compiler is too slow for the agent to iterate it's mistakes until it gets it right."
- weinzierl 2mo agoThis thought completely neglects the idea that Haskell probably needs significantly less compiler runs because every run catches more errors and gives more information about them. And that is not even considering how often the agent needs to run tests to get it right.
- derdi 2mo agoIt seems pretty clear that they do only minimal live testing during the "open a ticket, implement something, deploy it in production, all while the customer is still on the call" cycles. So your second concern is probably not relevant in this particular setting. Regarding the first, I think you're probably right, but then again, if there is a 15-minute base cost, it's hard to amortize that through fewer incremental runs of the compiler. (Which isn't to say that I think they are doing the right thing.)
- aviaviavi 2mo agoThe number of compiler runs doesn't matter as much as the total elapsed time it takes to finish the task. In just about every test we ran, LLMs are faster at building in Python than Haskell.
- andersmurphy 2mo agoLisp/smalltalk programmers have been going on about this tradeoff for a long time. It mattered before LLMs too. Lisp/Clojure repl allowing you to compile tiny parts of your program inside your running program is incredible for your feedback/iteration loop. Ironically, this is also what makes them shine with LLMs, the LLM has access to the running program and can modify it while it's running to get feedback instantly. Complex type systems are cool. But, they are not free. I say this as someone who's first programming language was Haskell.
- matt2000 2mo agoI am increasingly wondering if we are in a post-language world in terms of development. Why would I ask an agent to write a server in anything other than the most efficient language, although efficiency can take several forms: runtime, token usage during development, and wall clock dev time (affected by slow compile times for example). My intuition is that type-safe languages with fast compilers are the best option. Maybe Go? I personally prefer Java just due to my experience running it in production, but am not sure there's many arguments for it over Go in a greenfield application. The other candidate would be Rust, but I worry about token efficiency and tool performance, I suspect it's not worth it for the runtime improvements. All that being said, in this article switching to Python seems like a wild choice. Relatively poor performance, no compile time checking at all. Python's big selling point was developer ergonomics, which seems largely irrelevant now. These are all just thoughts at the moment, I should try to find some evidence one way or another.
- ffreire 2mo agoLanguage choice had less impact than people first assume even before LLMs in most software. A good engineering team produces good code in whatever language they happen to be using. In my own career I've worked in serious Java, Scala, Haskell, Javascript, PHP, and Python application stacks and I've seen plenty of good and bad examples. I reckon language choice matters more at the edges of economic activity where a specific language feature really does make the difference in the end product, but most activity that is leveraging LLMs now is more generic enterprise SaaS software.
- bbmatryoshka 2mo agoYou are ignoring LLM-ergonomics, some time ago I saw benchmarks showing that popularity the language (and so more data available in training date) was strongly linked with LLM's performances, with top results with javascript and python. I don't know if a year later this is still true, but is absolutely possible
- zitterbewegung 2mo agoThere is one simple thing you have to realize why Python is the optimal choice. You have so much training data. Python is the second most popular language on GitHub and is easy to read.
- jasim 2mo agoI'm curious about the choice of Python, rather than TypeScript. I find Ruby a very beautiful language, and Rails is an excellent web framework, but I need typed functions, record types and sum types. They help not just with correctness, but also as living documentation that lets me understand AI generated code. TypeScript provides discriminated union, but not exhaustive pattern-matching, and its syntax is a bit verbose, but since I'm no longer writing most of the code myself, I can live with it. However I can't imagine using Python or any other dynamic language going forward. There is likely good reason for you to choose it, and I'm curious to know what that is.
- em-bee 2mo agopython has optional types too now. if you could get the LLM to produce typed python would it be any worse than typescript?
- jasim 2mo agoI hadn't considered that, you are right. Though I would still prefer TS because the language is all about types; the entire ecosystem is well-typed and the type system is quite powerful (I do enjoy an occasional Omit and Pick). But it is a personal choice; as long as LLMs can generate well-typed Python, then for people who like the language it makes sense. However from the article, I got the sense that they went completely dynamic.
- rpbiwer2 2mo agoYes, because the code you (or the LLM) writes is only part of the equation; if you use third party libraries then it becomes an ecosystem problem. I'm not currently using much Python but my understanding is that the community has not yet aligned on typing nearly as well as the TS community has.
- em-bee 2mo agomy understanding is that the [python] community has not yet aligned on typing nearly as well as the TS community has this is undoubtedly true.
- rowanG077 2mo agoThis is quite insane to me. If I compare the output of LLMs for python vs statically typed languages it's really not a good choice to go the python route. It consistently produce relatively garbage code along actually good code. My experience has that the better static typing you have the better the code becomes. LLMs have made me move away more from python rather than into it. I'm very surprised by this experiences of the author. The article is all over the place as well. Going basically all in on Python because it is apparently better than Haskell for LLM use and than agreeing with someone that says Rust is the best.
- deleted 2mo ago[deleted]
- calebkaiser 2mo agoI've been a power user of LLMs for software development for a while now, and I've found two things to be true: - The benefits of more "extreme" type systems are more accessible and valuable than ever. I have a fairly involved project built on Lean that I hope to open source this month, and it's been a joy to work in even for uses outside of mathematics. - Readability, build time, infra complexity, and everything that affects your speed after finishing your implementation--these things now matter more than ever. It's sort of a dual ergonomics problem, in some sense. And given that, the author's lament makes complete sense to me, especially: "An AI-enabled Haskell ecosystem would ask different questions. How do we make Haskell easier for agents to use well? How do we get more high-quality Haskell examples into model training data? How can we scale reviews? How do we make library docs full of copy-pastable, realistic examples, not just beautiful types? How do we make project bootstrap fast? How do we make error messages more agent-friendly? How do we reduce cold build times? How do we make common industrial patterns obvious to a model that is trying to help?"
- lp4v4n 2mo agoI'm not a Haskell developer and I hadn't heard of this company "Scarf" before. As much as I respect this guy who tried to work and push an alternative ecosystem, it's hard for me to shake off the impression that, rather than due to Haskell compile time, he moved to python because it's easier to find developers for it and it's the de facto scripting language for LLMs. No problem about that, of course. Running a company is hard enough, I think that passion and idealism for a language/platform/technology out of aesthetic appreciation can only go so far and after a certain age just making money and reaching your professional objectives count more.
- jimbokun 2mo agoHow the hell would you know his true intentions? Fast compile times is one of the most important qualities for developer productivity. It made Haskell a non-starter for many developers even before LLM driven development took off.
- yakshaving_jgt 2mo agoI run my company on Haskell purely for economic reasons. Aesthetics doesn’t come into it.
- domenkozar 2mo agoWe at Cachix have also moved on from Haskell about two years ago and I'm sure someone is going to make a comeback with a language that takes the lessons from it but starts from skratch. We need more general purpose Elm languages in the space.
- em-bee 2mo agowhat did you move to, and why?
- domenkozar 2mo agoRust, mostly because: - haskell exceptions and laziness are devastating for production - too small ecosystem, had to write 10+ SDKs (now with AI that's less of an issue) - haskell ecosystem is too fragmented due to prima donna prevalence
- aviaviavi 2mo agoI would love to see that happen!
- jimbokun 2mo agoIsn’t tgat language Rust, practically speaking?
- voidhorse 2mo ago"Hammers are now a very popular tool, and one can move quickly building exclusively with hammers, so we have decided to construct buildings strictly using nails, no more screws, bolts, or any other kind of fastener shall be used going forward."
- pessimizer 2mo agoYou say this as if it were necessarily irrational. Clothes became chain-stitched (and later lock-stitched) because machines could chain-stitch. If there were a super-efficient hammering machine, it could be better to figure out ways to use nails to replace screws in designs than to hold onto screws just for nostalgia's sake.
- hunterpayne 2mo ago"If there were a super-efficient hammering machine, it could be better to figure out ways to use nails to replace screws in designs than to hold onto screws just for nostalgia's sake." How about for the sake of the bridge continuing to stand? Or is that not a good enough reason for the accountants?
- crux 2mo agoI strongly agree with the premise of this article, which is why I am surprised that the author moved away from Haskell to Python. For some time now it’s felt clear (or at least extremely) compelling that agents need fast compile times in order to be effective, especially when you’re working in parallel. But the other thing that has felt just as obvious is that agents need strong type systems and narrow guardrails in order to constrain their outputs. These two things felt clear enough to me that, like the author, I wanted to choose a language ecosystem that maximized them. There _are_ languages that both have expressive type systems _and_ fast compile times. I wonder if the author investigated any of them, before deciding that no compilation time at all was acceptable. In my case I landed in OCaml. I think there are other options in the space—Go if you want less typing but faster compiles; Rust if you want more types but slower compiles. My mostly vibes-based evaluation landed on OCaml, and I’ve been pretty happy with the results.
- UltraSane 2mo agoI've gotten best results with LLMs generating Go, Java, and C# code as they have the best combination of strong type systems and fast or no compile times.
- pjmlp 2mo agoYes, and in Java/C# case, AOT compilation is also available. I would also add Kotlin, Clojure and F#. Scala not really as the compilation is not much better, and since the Scala 3 reboot, the ecosystem doesn't seem to be doing that well. The market opportunity for Haskell on the JVM is gone, although they are doing cool stuff with capabilities.
- em-bee 2mo agojust curious, can you point to more details to what happened with scala3?
- pjmlp 2mo agoThey introduced a new Python like syntax, and pushed to move away from the curly based syntax. There were other breaking changes as well. https://docs.scala-lang.org/scala3/guides/migration/compatibility-intro.html https://docs.scala-lang.org/scala3/guides/migration/compatib... This naturally broke all the tooling. Then you have Metals for VSCode InteliJ plugins, while the Eclipse plugin was dropped. InteliJ plugin is much further than Metals, however there is the conflict of interests with pushing Kotlin instead. Meanwhile most Scala shops have pivoted to also give feature parity on modern Java, and Kotlin, thus reducing the interest in using Scala in first place. However as mentioned, they are doing cool stuff with capabilities at EPFL for Scala 3. https://virtuslab.com/blog/scala/introduction-to-scala-3-checking https://virtuslab.com/blog/scala/introduction-to-scala-3-che...
- cosmic_quanta 2mo agoNote that Scarf is not moving away from Haskell for performance-sensitive applications [0], which was the immediate question I had reading this. [0]: https://discourse.haskell.org/t/after-7-years-in-production-scarf-has-reluctantly-moved-away-from-haskell/14380/7 https://discourse.haskell.org/t/after-7-years-in-production-...
- Hizonner 2mo agoI am absolutely baffled at the idea that LLMs mean you need less automated verification of correctness.
- classified 2mo agoWow, another bunch of people who give up engineering to satisfy their addiction to speed.
- whateveracct 2mo agoit's sad, isn't it? if my CEO wrote this article, I'd quit [1] in an instant [1] "quietly" while i found gig+1. oh and the private out-of-band engineering gossip and trash talk would surely be hilarious
- z0ltan 2mo ago[dead]
- AlexeyBelov 2mo agoYeah, I don't get it. There are so many real-world bottlenecks that it doesn't matter if you can edit the code 10x faster. It could even be beneficial to tactially slow down some parts of your SDLC.
- cosmic_quanta 2mo agoFor what it's worth, I've been using Haskell in production at Bitnomial, a financial exchange, and LLMs + Haskell is an extremely productive combo. Since Opus 4.6, LLMs have been pretty clever at using fancy types with libraries like Servant and Beam. The expressiveness of the types, combined with feedback from the compiler, means that agents converge quickly to something that works. I don't think I've noticed agents having to run the compiler so often that compilation speed is an issue.
- aviaviavi 2mo agoI'd be very curious to hear your take if you gave another language a proper try for comparison with the same tools. I think you'll be as surprised as we were.
- nh2 2mo agoHey, we have a 10 year old Haskell/Python/C++/TypeScript/Nix codebase, and use all of them regularly. Haskell compiles slowly, but we have not found that to significantly inhibit AI-supported dev so far. We use ghci with `-fobject-code`, and our largest leaf module (10k lines of webserver request handlers) takes 8 seconds to `:reload`. To run stuff in it, the agent pipes `:reload`, or other invocations, into `ghci`. Working on parts parts that are early in the module chain, such as our Prelude, makes the whole-project `:reload` take 50 seconds. Much of that could be avoided if we didn't suffer from the TH recompilation problem (https://gist.github.com/nh2/14e653bcbdc7f40042da3755539e554a https://gist.github.com/nh2/14e653bcbdc7f40042da3755539e554a). Originally I made a small GHC patch to hack that out (what this conservative recompilation protects from cannot happen in our project), which made the reload much faster, but the logic was changed in recent GHC so that doesn't work anymore. In C++, we have some individual files (and thus compilation units) that take 45 seconds to compile. Python is of course the fastest to (build+run). However, Python also has some problems with repeated runs: Once you have many imports, just starting the program (e.g. `--help`) takes ~2 seconds resolving imports. Do `import pytorch`, add another 2 seconds. For repeated runs, this can be a pain; Haskell and C++ are much faster for that, so they win when you don't have to change the code but repeatedly use already-compiled tools in a different way. In all 3 languages, getting things to typecheck is very fast, because the agent directly reads the vscode LSP typechecking errors which are < 1s feedback. Claude Opus 4.6-4.8 understand all 3 languages very well. I agree that GHC devs should focus most of their efforts on compile speed, and real-world pain solving. Some parts of that are indeed being done (e.g. newest GHC can write bytecode to disk to make the above workflow much faster, and codegen is by far the slowest part of compilation). But I think the focus should be even more on that. I consider most important and unsolved: * solving Generics being slow to compile, especially for types with many constructors * solving deriving classes being slow to compile * solving TemplateHaskell causing too much recompilation * doing staged compilation, so that the next module can typecheck as soon as its imports are typechecked, as opposed to waiting that codegen is done; this unlocks a large amount of parallel work availability All of these have open GHC tickets that I think should be the highest focus. Other real-world production things are being solved quite nicely currently: * The new Haskell debugger * Much better stacktraces * Much better runtime introspection to debug runtime hangs etc I get your general point that if iteration speed (as in change code + run, 100s of times a day) is your highest value, Python does quite well. We intentionally chose Python for the part of the codebase that's relatively simple data importing but from 50 different sources, count growing adding new sources all the time, and need just quickly iterate on each until we got it. But I find it would not be a great language for the other parts. Its concurrency story is bad, its interpreter is very slow and immediately disqualifies Python when you need to do e.g. a line of code for every 1000 Bytes (say for streaming small data chunks), typing is very useful but bolted-on and not always correct. Things where Haskell remains best-in-class is anything nontrivial-webservers, I/O, program correctness, the main "general purpose" programming, refactoring and long-term maintainability.
- pjmlp 2mo agoI was expecting yet another moving from Haskell into Rust article, instead they went to Python. Who cares about performance.
- robertlagrant 2mo agoI like this article, but I would take some issue with the concept of the percentage of time taken up being a major issue. If you go from taking 2 days to write some code and 20 minutes to type check (which does seem long, don't get me wrong, but still) to 10 minutes to prompt some code and 20 minutes to type check, that percentage increase to me isn't enough to justify switching. You're still almost 2 days ahead, and converting those 20 minutes to 20 seconds are not going to make you ship a feature appreciably faster. But those types stand strong and I don't believe they can yet be replaced by an LLM believing they're correct. Having said that, I also think that Haskell should massively speed things up. Having strong types if nothing else should surely produce some amazing type-checking speed wins.
- romaniv 2mo agoLanguages designers will have to make a choice whether to continue to design for humans or for big slop machines. The design goals are not compatible. This is obvious. I don't understand how anyone can miss such an obvious point. Another obvious point is that an industry that runs on code slop will stagnate in terms of language an human tooling design.
- pjmlp 2mo agoRobots need formal specification languages, to tame non deterministic compilers.
- rkrzr 2mo agoThis is a good post. AI has changed the programming language trade-offs and, as someone running a company that uses both Haskell and Python, I hope that Haskell can adapt to this new era. I would like to add one additional observation, since we have been using both Haskell and Python in production for a long time: Haskell excels at platform work, while Python excels at product work. Our infrastructure teams work in Haskell (and also Rust nowadays), while our product teams work in Python. This gives us the best of both worlds (in my opinion): fast and rock-solid infrastructure on the platform side, and fast development speed and quick iteration cycles on the product side. This setup has worked well for years for us, but it remains to be seen how and if this is going to change as well in the new AI era.
- derdi 2mo ago> The type system caught real bugs. > The model can often avoid the mistake before the compiler ever sees the code. > The type safety we gave up hasn’t been noticeable in any concrete way yet [...] > Type safety can be a huge advantage for LLM-generated code if the compiler is helping the agent converge quickly. Well, good to have this question cleared up once and for all :-)
- typesafeJ 2mo agoVery surprised about this decision. I use strict languages much more with LLMs and they improve quality a lot. Working on a big python codebase is very painful with an LLM.
- reinitctxoffset 2mo agoI'm internally dogfooding my take on the stack that makes all these problems go away. Everything sort of exists, but it's this heinous zero documentation, high pain tolerance thing: buck2 and RBE with NativeLink and hooking that up to action runners and it needs to all work in a container or on nix or in a deb and on MacOS, you hand roll the auth and the certs and where do your compilers come from, can it do NVIDIA, can it do mobile. Problem is switching off Haskell doesn't help for long: the agents proliferate and you're back where you started with more bugs. So I've been sucking it up and getting all this shit one click and it works. This is good enough for my use, and if the Scarf folks want a solution and are willing to work with a garage band startup, I'd be open to doing a closed alpha. I have a buck2 where you write the rules in Haskell (if you even need to change the prelude, it ships with a WASM that isn't coupled to fbcode), and the Nix cache/substitutor is backed by NativeLink so it scales to anything and it speaks all the protocols correctly and with a verified supply chain. I'm not even really sure this will become a product, I just need it, but I sort of suspect others will need it too. If there's interest I'll put up a landing page with an email sign up thing.
- zeendo 2mo agoI am surprised by this take, honestly. We're a Haskell shop (and have been for over 10 years now) and are finding agentic development with Haskell to work pretty damn well. Cold compile times in Haskell are painful indeed. Our development practices don't really cause us to do that much - even with agents. It's unclear to me if the development practices at Scarf that cause them to hit this pain often are worth it if it means giving up Haskell because the compile times are too bad. Maybe they are, but I don't think so.
- tonyarkles 2mo agoSpeaking as someone who has tried Haskell but hasn’t ever really gotten into it, but spends all day with a C++ codebase that also has long cold-compile times… I think the author of the post said they’re using git worktrees to be able to have multiple agents working on different things at the same time without stepping on each others’ toes. I’ve started experimenting with that myself and it’s great in a lot of ways but by having a separate source tree, it does trigger the cold compile problem. Two agents compiling the code in separate worktrees are working on entirely separate builds (great!) but that means there’s no shared compilation cache between them (not great). Is that something that’s tripped you? Have you found a good solution?
- pianopatrick 2mo agoJust spit balling: could you have the agent pre warm the cache as part of your workflow? Like at the start of working on the code have the agent run a compile in the background. That way when the agent is ready to "really" compile there is a warm cache
- tonyarkles 2mo agoProbably not a bad idea for just making sure that you’re starting from a buildable tree anyway!
- markasoftware 2mo agoBazel maintains a system-wide cache that fixes this. At $current_employer a truly cold build (rm - rf the system cache) is 10 minutes or so. In a new worktree with a warm system cache it's under 60 seconds (still needs to build the worktree specific analysis cache). A fully warmed build is 10 seconds. Additionally there's no lock on that system wide build cache. For this reason alone I want to like Bazel. But at the same time it has like half a dozen caches for different purposes and doesn't feel generally elegant. It saddens me that (a) cargo can't do this afaik and (b) its hard to package Bazel packages under nix. I'm not sure what other system has a shared unlocked cache.
- tristenharr 2mo agoThis is the silliest take I’ve ever read. Strong type systems are an AI’s best friend.
- kreyenborgi 2mo agoEven without considering vibecoding, compile time and compiler/lsp memory usage are my main concerns with Haskell. In fact, I'd say they're even more of an issue if you're going without LLM's since they affect human beings ;)
- sn9 2mo agoOCaml is such an obvious solution to their problem that I'm shocked it wasn't even mentioned. You get fast compile times without sacrificing type safety.
- sroerick 2mo agoI posted this above but honestly OCaml makes vibe coding so nice. I went back to go after a few months with OCaml and it was deeply frustrating
- subversiontaco 2mo agoEvery time I see a post like this it somehow turns into a conversation about AI. Are there any studies on this? How much better are typed languages for LLMs. I would expect the amount of data and scaling laws to have more of an effect on an LLMs coding capabilities than the language itself.
- tonyarkles 2mo agoI mean, in this particular case one of the biggest pain points they’re talking about are just straight up build times. An LLM that can produce a patch in 5 minutes and then has to wait 15 minutes for a build… to then put together another 1 minute patch and wait another 15 minutes for a build… that’s not ever going to be able to compete with Python where there’s no build time at all.
- jbritton 2mo agoI write a ton of Python code. Modifying code without static types is difficult and error prone. If a function needs a new argument, all the callers have to pass it and all of their callers recursively. Maybe the calling function is just a function pointer that has been passed around and not searchable. I love Python for small tasks and tasks that are not critical if they fail.
- atomicnumber3 2mo agoI also write a lot of python code. Ported 2 companies from python 2 to 3 too (idk why that keeps happening to me). Lots of modern (...3+) python code uses type hints and a type checker. It can be as strict as you'd like it to be, which is exactly how I like it. It's what pulled me away from ruby. Meanwhile, static languages are too often a giant pain in the ass, and in return for writing a lot of annoying code, you get in return guarantees that only really apply within your process's memory. And in a microservices world... you're actually realistically using the protobuf type system. Which generates just fine for python. And then "internally" you can use python's type checking where it helps, and if it doesn't help, then for that bit of the code, simply don't use it (and write "true" python). I also find that a HUGE problem in the world is that programmers just. can't. help. themselves. They LOVE to over-define. LOVE IT. It's a siren's song!! Static type systems are a trap for the part of our brain that loves to architect. One of my favorite things about python is that it helps programmers _let go_. Not everything needs to be an interface. It's python. Everything is already an interface. Now just write the code without all the distracting 20 layers of indirection. And if we ever need one more, it's python - it's practically already there. Just make a new type, put @property on some methods, and you're good. Obviously there are times I'd not use python. I could foresee myself writing Rust if I had to do code where correctness was of utmost importance (like, crypto, or embedded software for a medical device where someone's ventilator is hooked up to it, or similar). But if nobody's going to die (so... medical and cryptography...) then I'm using python almost no matter what I'm doing. And I'll use numpy or write a C module if I actually end up needing true CPU-bound performance for something.
- jbritton 2mo agoWell said.
- faangguyindia 2mo agoI am writing couple of State machines and DSL in Haskell. Haskell is great, once you write code, chance of certain kind of bugs appearing is very low. Biggest problem i've is i develop on Apple Silicon and can't cross compile to x84 linux which is most common deploy platform for servers Compare this is to Go, which is what i use for almost everything else, cross compile, copy to server and there you go! So simple. this causes a lot of pain and suffering and slow development loop in Haskell. I'd use Haskell for more things if someone solves this issue. Please haskell community, come up with a way to solve this issue. It wouldn't be a problem if i've to install a JVM like we've for Java.
- jasonjmcghee 2mo agoHey Avi - didn't know you were an HNer fun to see you / your co on here :)
- aviaviavi 2mo agoHey Jason! :)
- hedgehog 2mo agoI don't have the experience, how high are Haskell compile times such that a switch like this is worth it? I have some experience with generated Python, Rust, and TypeScript, and I have not found that compile time is enough of a concern that it would offset additional safety of a stronger type system. Like some of the siblings I'm now starting to do experiments with Lean and other tools to get even stronger assurance about system behavior.
- yakshaving_jgt 2mo agoLong compile times can be a problem. It’s also a problem that can be managed. I think this is overstated in the article.
- throwaway81523 2mo ago[dead]
- Barrin92 2mo agoI'm honestly baffled that someone who has been writing software for so long puts so much emphasis on code generation as a meaningful metric. As Fred Brooks taught us, conceptual unity, not lines of code is the most important metric for the long term health of a software project. It's interesting in particular because the argument of the article has at its core nothing to do with coding agents: "so far, we haven’t lost much in the switch. The type safety we gave up hasn’t been noticeable in any concrete way yet, especially considering our test coverage has never been better." people said the exact same thing when they moved from Haskell to Python or to JavaScript before the latest tech. Tests, tests, tests, and faster development cycles is just the language of the Agile people who have been advocating for this for decades. The people who didn't buy it never did so because the claims about development speed were wrong, they didn't buy it because they had a fundamentally different outlook about what matters in a codebase over years. I'm interested to see how this will look in three years rather than three weeks. If you're so seduced by the idea that shipping next months feature faster is so important I honestly don't know why you ever chose Haskell in the first place.
- iLemming 2mo agoOh wow, Haskell to Python. Interesting. They must have really wanted to preserve cascaded dependency headaches. ___ Please don't let your kernel panic, I'm being sarcastic. You never know the level of emotional attachment some HN people have to their tooling...
- whateveracct 2mo agocabal hell isn't even a real thing anymore.....
- iLemming 2mo agoI know that. Bumping GHC can still be relatively painful. Some language stacks are meaningfully easier on dependencies (not you Python), but can give you some other headaches (yes, you Python, damn you). Every PL in one way or another has some warts and ugly parts. It seems the job of a senior software engineer these days is to make fun of programming languages on HN pointing out their flaws, while simultaneously keeping an eye, waiting on agents doing "thinking".
- whateveracct 2mo agowhoa buddy, i'm a senior eng but i don't wait on agents. ew! i could probably do my job and get passing (or better) perf reviews using nothing but fundamental-mode and the compiler.
- iLemming 2mo ago> i don't wait on agents. ew! You're conflating "what I do" with "what my job is." A bunch of my friends and colleagues are literally getting paid and forced today to use agents. There's no break from it unless they quit their jobs. I'm not saying I'm eagerly content and happy with this bullshit, alas, it is what it is.
- whateveracct 2mo ago
- tangenter 2mo agoLLMs are heavily trained on Python.
- prmoustache 2mo agoIt remains to be seen if agentic development really provide an advantage, especially when you see the extraordinary fall in reliability of products and infra managed by early adopters. Development time is hardly the bottleneck in my company for example. Also I assume the cost of development skyrocketed so much over the months that our company started implementing drastic cost reductiom measures everywhere that seem to mitigate any improvement we've had.
- purpleidea 2mo agoHaskell definitely needs to improve a lot of things, but moving to python is obviously a mistake for most cases. Golang is probably the best language for LLM things, it's got reasonably strong types, compiles very fast, and is simple. Much nicer to work with than Rust for example. But these days most code should probably be golang or rust if you're not building a webui.
- threethirtytwo 2mo agoTypescript is the best for AI along with Python. Purely because there’s so much training on it. The LLMs are better at typescript. Also typescript is a better overall language than golang. More expressive types. Golang wins in performance and simplicity and raw ugliness.
- pdimitar 2mo agoDon't forget cross-compilation and a single binary. Not small advantages in _many_ scenarios.
- kazinator 2mo agoI feel there is something missing here. The narrative here suggests that the author's LLMs are generating perfect Haskell code that just needs to be rubber stamped by the compiler for execution. But, oh, that takes too long. I'm skeptical; I would think that the problem would actually be that mistakes in a large body of Haskell code would be difficult to fix: that massaging the generated slop into compiling ranges from unpleasantly time consuming to intractable. Might the author be hiding the honest statement of the problem: that he would rather move fast and break things as a slop artist, but the guard rails are too rigid in Haskell?
- adamddev1 2mo agoThe author talks about how Haskell needs to catch up to stay relevant in "the AI era." > That means taking AI seriously as a first-class user of the ecosystem. Honestly for me any time a language or a tool markets itself as "for the AI era" or takes agents seriously as first class users, I run. It's a bad smell for me. I'm happy that there are things like Haskell that are still focussed on correctness and sanity, and not pandering to the AI psychosis driven on by the market. I am really disturbed by this ideological framing of "it's the AI era now" "we have to let the agents run" "speed, speed, speed" "if you don't learn to engineer with random garbage, you will be left behind!!" Some of us will need to leave the cult of the empire of AI and live in caves like the desert fathers, committed to actually crafting correct things.
- youre-wrong3 2mo ago[flagged]
- deleted 2mo ago[deleted]
- pietmichal 2mo agoI wonder what will happen when LLM providers stop operating at loss. The whole claim of us being in AI era falls flat after realising that.
- jordiburgos 2mo agoFinally...
- jiehong 2mo agoThat's a very fair point, and Rust shares this fundamental issue as well. That's where one better appreciate the work being done in Zig to get incremental compilation in milliseconds. The choice of Python is quite interesting, and a big swing in the other direction.
- sdeframond 2mo agoIf loop time is a concern, I am surprised the author does not mention tests. Is it still worth it to wait for your test suite to run when an LLM can get it right quick ? Edit: I dont quite buy that argument, in case it was not clear. Edit2: oh, is it specifically about incremental compile time? In which case I understand that tests can be run piece-wise quick indeed.
- thyrsus 2mo agoThe article makes a convincing argument that Haskell compilation is too slow for the fast code generation of AI. But python? I have yet to experience a RHEL major version change that did not blow up all my tiny simplistic python scripts. I see the following options for using python: * run inside the container it was developed in * build your own python interpreter and environment and libraries and never use python pieces from the OS (i.e., act like a container without using one) * keep different versions of the code for different OS versions and use AI to rewrite all the code for the new OS version Start to consider third party dependencies, and none of those feels tractable without an AI assist. I've dabbled in C device driver code and kernel version differences were my only problem, not C. My perl scripts never break. My bash scripts rarely break. My dabbling in erlang didn't suffer from language version differences. My little elisp hasn't broken. Only python has inflicted this level of version pain. I have a colleague who says java has the same version pain as python, and from what I've seen from Jenkins maintenance he may be right, but I don't have colleagues who want to read java code, so I haven't written my own.
- ngrilly 2mo agouv is solving these problems for the kind of things Scarf is developing.
- efromvt 2mo agonever use system python, always use virtual envs. (a bad answer, but agents do remove the setup boilerplate). UV does relatively completely solve this but it's a big dependency to take so understand why people don't rely on it
- thatguymike 2mo agoVery interesting! I honestly would have expected the opposite: I was optimistic about strongly functional languages in the age of AI. The more modular and side-effect-free your code is, the easier it should be to constrain changes, catch slop, and reduce LLMisms like spooky hacks-at-a-distance. It looks like the issues are in the compiler and documentation so hopefully it’s fixable… I write in Python every day but I do miss smarter languages and I hope AI doesn’t fully obliterate them.
- jdw64 2mo agoThe development workflow is changing, and Haskell as a language doesn't fit that new workflow anymore. The traditional strong type system basically forced you to spend a long time thinking before writing code. The upside is that this makes the code more logical and robust. But it's the exact opposite of the AI loop. It's not that the type system is wrong—it's that the toolchain that comes with a strong type system has itself become a bottleneck. With AI coding emerging, a single person can now churn out 100,000 or 200,000 lines. And realistically, from my experience, once you go past 40,000 lines, it's hard to memorize everything. So what do you do? Human coding shifts toward writing tests and gates, and once you feel comfortable that things are safe, you add more features. AI coding takes this to an even more extreme level. Learning Haskell is great for learning domain modeling—I learned domain modeling through Haskell myself. But now that AI has become genuinely useful, it seems like a fundamental shift in workflow is happening. Realistically, for commercial competitiveness, the domain of code black boxes is getting larger. The number of lines a single person has to manage is increasing, but their cognitive limits haven't changed. Even the amount of background knowledge required keeps growing. In that sense, I agree with the author's point. It's not that Python is a better language than Haskell, so people switched—it's that Python has almost no build-up process and it serves as the standard interface for AI models. The value of a language as a product doesn't come from the compiler's excellence. It comes from its users. Avi Press's article ultimately reflects the reality that if you can't stay ahead throughout the entire lifecycle, you'll fall behind your competitors. Maybe I'm just echoing my own thoughts, but it's reassuring to see that a well-known programmer thinks similarly to me.
- tpoacher 2mo ago> Now there is a third place: code generation time. The model can often avoid the mistake before the compiler ever sees the code. This is doing a lot of heavy lifting here. How do you even know a mistake has been "avoided", and safely, for that matter? The kinds of mistakes the AI will miss are the worst kind: subtle logical mistakes, buried inconspicuously within boilerplate code, hard to detect or reason about, until one day you wake up to find that your database has been replaced by a rickroll video. Also, it's odd that they moved from Haskell to completely untyped python ... python may be no Haskell when it comes to type safety, but typing+mypy/mypyc goes a very long way.
- jwr 2mo agoInteresting. The major factor seems to be the latency of change-compile-test cycle. I wonder if one of the reasons I've been getting such excellent results from LLMs with Clojure could be that they can immediately try things out in the running REPL. Rebuilding my entire application from scratch takes minutes, while connecting to a running system through nREPL and compiling single functions or namespaces takes less than a second.
- alexbezhan 2mo agoI find the need for type systems is less important now. and thats me saying this after 15 years of coding in Java, Scala, Kotlin, Typescript. Now I am using Elixir and incredibly surprised by how little I need static types. They are useful, but less needed now. Never could believe I would say that. But I'm the most productive I ever been. I get bugs of course, but they are related to queues lengths, retries, api errors, memory usage, performance, ... Bugs related to incompatible types are rare.
- Verdex 2mo agoThis isn't a great comparison. Im not that familiar with elixir, but erlang is hands down the best dynamic language to build systems in. It feels like they made only right decisions. I can only assume that elixir has made improvements on that. Meanwhile java and kotlin have the least useful types I've encountered in my career. Scala has some pretty powerful stuff, but it's like the c++ of powerful types. The ergonomics aren't great. Finally, typescript has a lot of impressive typing constructs but it really falls down on the runtime side (because javascript). The real comparison to make would be erlang/elixir vs rust or ocaml.
- zelphirkalt 2mo agoYou probably have built very solid concepts/ideas about what types are in the program and how to name things, so that they make sense, and all other things that lead to a program being useful and easy to read, over the course of those 15 years. The situation might not be the same for more junior devs. But also Elixir's paradigm is not the same as lets say some PHP slinging or JS. It encourages a stricter functional style, that already makes for better code than what many people produce in languages like JS and PHP, or Python.
- rr808 2mo agoScala was a dead end. Kotlin an obsolete workaround. Java though is now awesome, esp if you can ignore Spring. Should be more popular in the tech world.
- seanwilson 2mo ago> The important metric: how long does your entire development feedback cycle take, and what portion of that time is spent waiting on your compiler? > So far, we haven’t lost much in the switch. The type safety we gave up hasn’t been noticeable in any concrete way yet, especially considering our test coverage has never been better. Moving to Python means you'll have quicker compile times but now you'll need a bigger test suite which will take longer to run to get feedback after code edits? In TypeScript, you can compile and execute without waiting on type checking, an option like that would help?
- yakshaving_jgt 2mo agoI’ve been running my company on Haskell for a similar length of time. Long compile times can be an issue, but it’s an issue that can be managed. Would I scrap Haskell in favour of Python, now in the age of agentic coding? No. No I would not.
- nesarkvechnep 2mo agoThe whole article feels like a rationalisation for vibe coding your product from now on.
- catlifeonmars 2mo agoThe justification in TFA smell like premature optimization. A nominal bottleneck is just that-nominal. It’s a good thing to keep in your back pocket but you generally don’t want to expend extra effort optimizing something until you have to. I suspect that the cost of long compilation times (preLLM even) was actually quite high and the author is discounting/excluding those other factors and focusing on LLM feedback loops primarily as their justification. As an aside short feedback loops are important, but the article ignores one major reason why: humans learn most effectively when the time between action and feedback is reduced because the contents of our working memory degrades over time (take the explanation with a grain of salt). LLM has no such restriction, so the only thing that matters is that the codegen can keep up with the demands from the actual product.
- lgrapenthin 2mo agotldr; they decided to sacrifice quality for quantity via outsourcing their programming, and find Python more suitable for this. Which it always has been, whether outsourcing to cheap "talent" overseas, or now a subscription service text generator.
- dzonga 2mo agosame argument to migrate from Haskell applies to Ruby as well. & ultimately this is why Java/JVM keeps winning & to a lesser extent Typescript. you benefit from the robustness of the JVM, compilation is fast, the language is fast enough. to apply to Javascript/Typescript - good enough, fast enough though will not reach performance of JVM.
- ksec 2mo ago>same argument to migrate from Haskell applies to Ruby as well. I am not following. Why does it apply to Ruby? Ruby has likely 10 - 100x the size of open sources project and momentum behind it.
- nsagent 2mo agoHate to bring the whole Bun rewrite drama into this discussion, but it seems the Bun team thinks it makes sense to trade a potentially faster compile time in Zig to a likely slower compile time in Rust due to the claimed advantages of a memory-safe language with a robust type system. That approach seems entirely counter to the claims in this post. Obviously, different teams can have different perspectives, but I'm surprised just how different they are (especially for someone on the Haskell board). I'd love to better understand why the LLM flow works for Bun, but feels untenable for Scarf. Maybe the Scarf team could learn from the Bun team's approach?
- pdimitar 2mo agoOP said here that their team was familiar with Python and not with Rust. It's as simple as that. I replied that a frontier LLM can both write code in Rust _and_ educate you. And got down voted.
- mono442 2mo agoA bit surprised they have decided to move to python. In my experience LLMs don't work well with dynamically typed languages.
- designerbenny 2mo agoYou all are overthinking it. Haskellers aren’t hard to find. The roles fill fast. This is about embracing an AI-slop workflow so they can get that sweet increased valuation and investment. Nothing more. Most of the issues presented are valid, but overstated. It’s just PR for the swap.
- BenGosub 2mo agoSurprising decision in a time when writing code is cheap and so many projects migrate to Rust.
- vrighter 2mo agopython? that extremely brittle ecosystem?