News for hackers. Stuff that matters.
Re:Blorp Language by xigoi on Monday June 01, 2026 @09:10AM (#48356377)
Why is `pure` a keyword that needs to be added, with impure being the default? This discourages programmers from marking functions as pure. I like how Nim does it, with `func` declaring a function (pure) and `proc` declaring a procedure (impure).
Re:Blorp Language by adamddev1 on Monday June 01, 2026 @10:12AM (#48357097)
I also really like the distinction between a function and procedure. The function is a pure mathematical function. The procedure is a series of instructions.
Re:Blorp Language by rtfeldman on Monday June 01, 2026 @11:13AM (#48357927)
Roc defaults functions to being pure, and functions that can run side effects are inferred to have a different type by the compiler based on usage. By convention, their names should also end in `!` (e.g. `transform` for the name of a pure function and `transform!` if it does side effects), and the compiler warns you if you don't follow that convention.

https://github.com/roc-lang/roc/blob/b2503210da6b58a4ce1254d...

Re:Blorp Language by keithasaurus on Tuesday June 02, 2026 @08:02PM (#48377903)
Hey - I'm the creator of Blorp, and like a lot of the ideas you have in Roc! Did you consider having opt-in purity? Or some other means of conveying impurity other than "!"?
Re:Blorp Language by onlyrealcuzzo on Monday June 01, 2026 @09:36AM (#48356703)
I would also recommend this default.

We want languages that encourage good design.

If your goal is - like Crystal - to be as pain free of a migration from Python to Blorp, this shouldn't really impact it, since the compiler can and should be able to auto-fix this.

Re:Blorp Language by miroljub on Monday June 01, 2026 @11:19AM (#48358013)
> Why is `pure` a keyword that needs to be added, with impure being the default?

Marketing.

Instead of reading the code littered with "impure" keywords, you look at the beautiful code marked as "pure".

Re:Blorp Language by adastra22 on Monday June 01, 2026 @02:34PM (#48360814)
The LLM is just going to leave out the pure by default.
Re:Blorp Language by pepa65 on Tuesday June 02, 2026 @12:59AM (#48366249)
An exclamation mark instead for impure would solve that.
Re:Blorp Language by keithasaurus on Tuesday June 02, 2026 @11:36PM (#48379585)
I'm the creator of Blorp -- this made me chuckle a bit. I hadn't even considered that possibility.
Re:Blorp Language by keithasaurus on Tuesday June 02, 2026 @06:15PM (#48377068)
Hey... I'm the maintainer and had no idea this was posted. The reason pure is required is because it's clear and opt-in. There's a CLI subcommand called purify that will help identify pure functions that haven't been deemed so if that's desired.

But there can be many (small) applications where pure doesn't even matter, so I don't really want to force someone to write "impure" for the main function, for example.