Hacker Newsnew | past | comments | ask | show | jobs | submit | fourthark's commentslogin

But PowerShell 5.1 is still the one that ships with Windows.

It will get pattern matching when JS does. Not certain yet but in progress.

https://github.com/tc39/proposal-pattern-matching


That proposal is really dragging though. And typescript needs as much work because that's where the real power is. We need discern thing like

    match (x) {
      "bob": ...,
      string: ...,
      () => Promise<void>: ...,
      () => Promise<string>: ...,
    }
with exhaustiveness checking for it to be truly useful.


Discriminating a function or promise based on return type is never going to work, because JavaScript is dynamically typed and TypeScript erases types at compile time, so there's no way to know at runtime what type a function or promise is going to return.


It'll work because that's what typescript does, and that's why it needs to be implemented there, also. That's my point.

And as far as runtime goes, well, that's not what typescript does. It's a typical compile-time static type system.

Typescript aside, even a javascript-level first-class pattern expression is still extremely useful. I really hope it gets in there soon.


Yes that’s the point, you can’t protect against that, so you shouldn’t construct the “lethal trifecta”

https://simonwillison.net/2025/Jun/16/the-lethal-trifecta/


You actually can protect against it, by tracking context entering/leaving the LLM, as long as its wrapped in a MCP gateway with trifecta blocker.

We've implemented this in open.edison.watch


True, you have to add guardrails outside the LLM.

Very tricky, though. I’d be curious to hear your response to simonw’s opinion on this.


Sorry not familiar with this. Can you please link me?

We probably wouldn’t be here without it!


Weirdly, I’ve found that when that happens I can close Claude and then run `claude --continue` and now it has room to compact. Makes no sense.

But I have no idea what state it will be in after compact, so it’s better to ask it to write a complete and thorough report including what source files to read. Lot more work but better than going off the rails.


Most people don’t take this opportunity, though.


> It’s a lot easier than working with actual people because you don’t have to worry about offending or discouraging them

But you have to worry much more about confusing LLMs by introducing contradictory ideas or talking about too many things at once.

They will not call you out and they will not recover.

You don’t need to reboot your coworkers.


Life would be so much easier if you could reboot your coworkers!

One of the best solutions to most LLM problems is to wipe the context and go back to a clean slate.


Yeah if it’s obscure stuff you might have to guide it, show it just the relevant code / context. Outline the design for it.

They seem autonomous but often aren’t.


Argh


I’m curious what you mean. It’s a language with an open source implementation.

Others can and do implement parts of the language - e.g. Pandoc implements a parser and evaluates Typst.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: