Live data from Hacker News

The Lobster Programming Language

strlen.com

21–30 of 171 posts

Re: The Lobster Programming Language

#21

Earlier quoted context omitted.

A comparison to Swift's ARC would also be of interest :)

Yup, I will write up the algorithm some time soon. I've seen Swift's intentions to add lifetime analysis to ARC, but from what I could see it is much more complicated in Swift, requires annotations, and with significant runtime overhead remaining.

Arc isn’t that stuff, Arc is what it already does today. “Automatic reference counting.”

Re: The Lobster Programming Language

#22
Very personal opinion and matter of taste: Many lambda syntaxes are a bit weird.

    map(my_array)element:element*2 //lobster
    my_array.map{|element|element*2} //ruby
    Arrays.stream(my_array).map(element -> element*2).collect(something list something)  //java?
Lobster feels a bit unbalanced. Ruby has "pipes" which are a bit confusing substitute parentheses. Java has the cool arrow syntax but otherwise it feels very glued on. (edited and fixed, thanks for the comment)

Re: The Lobster Programming Language

#24

Earlier quoted context omitted.

Yup, I will write up the algorithm some time soon. I've seen Swift's intentions to add lifetime analysis to ARC, but from what I could see it is much more complicated in Swift, requires annotations, and with significant runtime overhead remaining.

Arc isn’t that stuff, Arc is what it already does today. “Automatic reference counting.”

I'm aware of that, I said "add lifetime analysis to ARC", as in, ARC is what I call regular runtime reference counting, and with lifetime analysis some of it can move to compile time.

Re: The Lobster Programming Language

#25

Very personal opinion and matter of taste: Many lambda syntaxes are a bit weird. map(my_array)element:element*2 //lobster my_array.map{|element|element*2} //ruby Arrays.stream(my_array).map(element -> element*2).collect(something list something) //java? Lobster feels a bit unbalanced. Ruby has "pipes" which are a bit confusing substitute parentheses. Java has the cool arrow syntax but otherwise it feels very glued on…

Your Lobster version has a stray comma, it is: map(my_array) element: element * 2

Note how if you write this example with multiple statements instead of "elements * 2", suddenly the Lobster syntax looks a lot more consistent, and the Ruby example doesn't look that great as it looks completely different from the built-in for loop.

Re: The Lobster Programming Language

#26

Earlier quoted context omitted.

Arc isn’t that stuff, Arc is what it already does today. “Automatic reference counting.”

I'm aware of that, I said "add lifetime analysis to ARC", as in, ARC is what I call regular runtime reference counting, and with lifetime analysis some of it can move to compile time.

Yep oops, sorry.

Anyway, psyched to see more people experimenting with this kind of thing!

Re: The Lobster Programming Language

#27

Earlier quoted context omitted.

It is not intended to be Python compatible, it merely has indentation based syntax that is similar. The cases where it differs from Python are actually for good reason: unlike Python that only has built-in control structures, here any function can look like if/for/while if it takes a lambda body.

This seems like a cool way to make an ad hoc dsl. I'm not a game programmer but I imagine it could be useful.

This seems like a cool way to make an ad hoc dsl. I'm not a game programmer but I imagine it could be useful

Smalltalker here. Being able to pass in lambdas very casually is a great way of producing an ad hoc DSL. Imagine a custom control structure which does a database transaction. Just implement a function!

Re: The Lobster Programming Language

#28

Hi, author of the language here. Not a great time for HN exposure, as I just added a lot of new functionality, but none of that is documented yet :) But hey, all publicity is good publicity? For those interested, some recent things that have been happening: - Compile time reference counting. This does an analysis similar to the Rust borrow checker to infer lifetimes, but unlike Rust doesn't make the programmer jump t…

Do you plan to accommodate multi-line lambda? Python is hamstrung on this front thanks to the white-space oriented formatting.

Re: The Lobster Programming Language

#29

Hi, author of the language here. Not a great time for HN exposure, as I just added a lot of new functionality, but none of that is documented yet :) But hey, all publicity is good publicity? For those interested, some recent things that have been happening: - Compile time reference counting. This does an analysis similar to the Rust borrow checker to infer lifetimes, but unlike Rust doesn't make the programmer jump t…

Btw, you have a bunch of dead links to Google+ (readme, the linked page, etc).

Re: The Lobster Programming Language

#30
post #28

Hi, author of the language here. Not a great time for HN exposure, as I just added a lot of new functionality, but none of that is documented yet :) But hey, all publicity is good publicity? For those interested, some recent things that have been happening: - Compile time reference counting. This does an analysis similar to the Rust borrow checker to infer lifetimes, but unlike Rust doesn't make the programmer jump t…

Do you plan to accommodate multi-line lambda? Python is hamstrung on this front thanks to the white-space oriented formatting.

> Python is hamstrung on this front thanks to the white-space oriented formatting.

You could have multiline lambdas with Python's signficant whitespace, the then-BDFL just didn't think it was important enough to accept any of the syntax options proposed for it or to bother finding another option, believing named functions were sufficient for the multiline case.

Post reply on HN