Live data from Hacker News

Blorp Language

blorp-lang.org

61–67 of 67 posts

Re: Blorp Language

#61

Interesting. there are some parts i like a lot here, but two things that I really dislike syntax wise. One is the lean towards a chainable syntax - this has proven to a big footgun for many devs in both java streams and typescript, making it very easy to go from O(n) to O(2n). The other part i really dislike is the first argument principle noted. If i myself define `string_and_reverse` and I can call it both through…

> making it very easy to go from O(n) to O(2n) Strictly speaking I assume everyone knows O(n) = O(2n) =O(kn) for k in R. But I see your point. I assume any decent compiler would merge the loops though

Yes, blorp does that. And it also allows local mutation and loops inside pure functions, so performance doesn't need to be left on the table in most cases.

Re: Blorp Language

#62
post #25

Interesting. there are some parts i like a lot here, but two things that I really dislike syntax wise. One is the lean towards a chainable syntax - this has proven to a big footgun for many devs in both java streams and typescript, making it very easy to go from O(n) to O(2n). The other part i really dislike is the first argument principle noted. If i myself define `string_and_reverse` and I can call it both through…

> i could definitely see this leading to some very funky looking chaining. At least for me, thing .doThis() .thenDoThat() .andFinallyThis() is much more readable than andFinallyThis( thenDoThat( doThis(thing) ) )

Yeah, this is the idea. This chaining is exactly the same as the pipeline operator in some some function languages, except that it hopefully reads in a more familiar way to programmers of non-functional languages.

Re: Blorp Language

#63

It looks nice. The general syntax isn't explained AFAICT? Looks somewhat Python-like but modernised (great!) - is it indentation sensitive?

Yes, it's python-inspired. Some notable differences are: - no return keyword - match/if are expressions - it's functional - =? is used for early returns or binding, depending on the variant of an Option or Result that is returned

There's a lot of other differences -- it's a smaller language surface than Python overall.

Re: Blorp Language

#64
post #15

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).

> 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".

I'm the creator of Blorp -- this made me chuckle a bit. I hadn't even considered that possibility.

Re: Blorp Language

#65
post #20

Readable syntax with mandatory indentation is a very questionable idea. For me its easier to understand that something ends with a specific designation, not with a lack of it. Indentation should be solved by formatter and not the language. And I don't quite understand the memory model, is it something similar to Rust?

The memory management model is automatic reference counting, with some optimizations, such as perseus for compile time reference counting where possible, and copy-on-write at runtime.

Re: Blorp Language

#66

It looks nice. The general syntax isn't explained AFAICT? Looks somewhat Python-like but modernised (great!) - is it indentation sensitive?

Yes, it's python-inspired. Some notable differences are: - no return keyword - match/if are expressions - it's functional - =? is used for early returns or binding, depending on the variant of an Option or Result that is returned There's a lot of other differences -- it's a smaller language surface than Python overall.

I like all those features!

I was trying to find if it is definitely a significant whitespace syntax, as it appears to be

Re: Blorp Language

#67

It would be nice to see a "new" language that actually does something truly new and valuable. Almost all "new" languages presented on HN are basically slightly different flavours of languages that have been around for a very long time. But without the libraries/documentation/tools etc. needed to make it useful.

Look at my language: https://github.com/Panzerschrek/U-00DC-Sprache/ . It offers speed and safety without introducing too much friction.

I added your language link to HN and there is a lot of interest:

https://news.ycombinator.com/item?id=48391838

Post reply on HN