Live data from Hacker News

Ante: A low-level functional language

antelang.org

31–40 of 226 posts

Re: Ante: A low-level functional language

#31

Earlier quoted context omitted.

> Is there a reason why you would make fn(1) and fn 1 equivalent? For the same reason you'd make 1 + 2 the same as 1 + (2). Parentheses can be used to group arbitrary subexpressions.

If fn 1 is an allowed function call syntax then fn (1) should be synonymous because 1 is expected to be the same as (1) except for a slightly different parse tree; but there might be good reasons to make fn 1 not a function call (for example, the implicit operator in a sequence of two expression without parentheses could be string concatenation rather than function application).

> the implicit operator in a sequence of two expression without parentheses could be string concatenation rather than function application

You can design a language which uses `e1 e2` to represent any binary operation you like, but I'd argue that function application is more common than string concatenation, so it's more deserving of that syntax. Plus, it plays nicely with currying.

Re: Ante: A low-level functional language

#32

Note to the website authors: the carousel with examples is not usable on mobile - trying to scroll the code swipes away to the next item. Would be better as just a series of example blocks.

Yet it's great on desktop. What I liked the most about it was that it doesn't auto-advance.

Generally, the entire site has a really nice design, at least on desktop. One of the prettiest I've seen.

Re: Ante: A low-level functional language

#33
post #32

Note to the website authors: the carousel with examples is not usable on mobile - trying to scroll the code swipes away to the next item. Would be better as just a series of example blocks.

Yet it's great on desktop. What I liked the most about it was that it doesn't auto-advance. Generally, the entire site has a really nice design, at least on desktop. One of the prettiest I've seen.

Even on desktop I wanted to be able to swipe (scroll gesture) or arrow key to advance the slide, but have to click the little dot icons

Re: Ante: A low-level functional language

#35
post #32

Earlier quoted context omitted.

Yet it's great on desktop. What I liked the most about it was that it doesn't auto-advance. Generally, the entire site has a really nice design, at least on desktop. One of the prettiest I've seen.

Even on desktop I wanted to be able to swipe (scroll gesture) or arrow key to advance the slide, but have to click the little dot icons

I was able to drag it sideways with the mouse.

Re: Ante: A low-level functional language

#37
post #5

Earlier quoted context omitted.

> Is there a reason why you would make fn(1) and fn 1 equivalent? If your standard function call convention is just `f x`, but you also support precedence operators, then `f (x)` automatically becomes possible. It reminds me of an old Lisp joke, though: f x -- too mathematical! (f x) -- too many parenthesis! f(x) -- just right!

Pity it doesn't include a line for: x f

x.f and x.f()

Re: Ante: A low-level functional language

#38

Very interesting stuff! I didn't even thought is possible to implement a low level functional languages, I always thought a functional language requires a ton of abstractions.

At the end of the day what prevents functional languages from being a good fit for low-level programming is that effective low-level programming cannot be referentially transparent. Might be my 2 cents, but i think Rust can hit a very sweet spot for functionally-leaning low-level effective programming.

I can't see why not - in normal computing, there is I/O. On embedded it also just "I/O" but a little more brutal than streams. Still pretty much the same though, at some point you must reference the outside world.

What am I missing?

Re: Ante: A low-level functional language

#40
post #3

The syntax looks a little funky to me but it's still quite interesting. Is there a reason why you would make fn(1) and fn 1 equivalent? For me personally it makes readability worse and looks strange when chaining functions like in their last example on their landing page. On mobile horizontal scrolling through the code snippets will trigger switching to the next snippet on my phone.

> Is there a reason why you would make fn(1) and fn 1 equivalent?

1 and (1) are isomorphic. A single term tuple can be converted to the single term, and vice versa. Having an implicit conversion doesn't seem too crazy.

The biggest issue I suspect would be confusion about the most idiomatic way, or a mix of styles in real-world code bases, that causes confusion or inconsistencies (increases cognitive load for the reader).

Post reply on HN