Live data from Hacker News

Blorp Language

blorp-lang.org

11–20 of 67 posts

Re: Blorp Language

#11

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

Fair! That'd depend on the operations right? For example, AFAIK typescript can't do much about multiple chained `map` calls, and i've seen quite a few `.filter(...).map(...).filter(Boolean).map(...)` :/

Re: Blorp Language

#14

Earlier quoted context omitted.

> 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

Fair! That'd depend on the operations right? For example, AFAIK typescript can't do much about multiple chained `map` calls, and i've seen quite a few `.filter(...).map(...).filter(Boolean).map(...)` :/

To be fair this likely should be handled by the interpreter/compiler for the compiled JS. V8 probably can merge this into one loop or another similar based on runtime types

Re: Blorp Language

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

Re: Blorp Language

#16

I know there are people that are used to the indention based scope but that has a real problem when it comes to copy/pasting code. I think a alternative that still looks pretty clean is to do like Ruby and Julia and have the function/class imply begin and have a literal 'end'.

If your editor messes up indentation when copy-pasting, you need a better editor.

Re: Blorp Language

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

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

#18

I like it. Reminds me of ruby. maybe a more verbose/explicit go? cool stuff!

You might like this language I've been working on: https://GitHub.com/Cuzzo/clear

It's not as true to Ruby as Crystal is, because I aim to make it far safer. It's closer to Elixir, if anything.

But I love Ruby to death, and it is definitely the desire to make it as close to Ruby spiritually as possible.

Re: Blorp Language

#19

I know there are people that are used to the indention based scope but that has a real problem when it comes to copy/pasting code. I think a alternative that still looks pretty clean is to do like Ruby and Julia and have the function/class imply begin and have a literal 'end'.

Fun fact, in Python, the indentation is checked per block. So, in the outer block, indentation can be 2 spaces, while in the inner block, the indentation is 3 spaces. The only prerequisite is that the indentation in the block is the same.

This, to circumvent copy/paste issues.

Re: Blorp Language

#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?

Post reply on HN