Live data from Hacker News

The Janet Language

janet-lang.org

201–203 of 203 posts

Re: The Janet Language

#201
post #185
post #174

Earlier quoted context omitted.

That example is quite unfair. You could just write println(is_me ? "me" : "you") which has exactly the same amount of symbols.

I specifically called out the tertiary operator in my text so as to be fair, but tried to keep things simple in my example. Perhaps too simple. Of course you can do that simple case with a tertiary operator but: 1. It's a construct that really has no reason to exist (I argue) as distinct from `if`. 2. It doesn't compose with statements. This duality is primarily what I'm arguing against. A better example would have b…

I mean sure, more things being expressions instead of statements is pretty nice (e.g. in Rust you can do that). But you don't need to introduce different syntax for that.

Re: The Janet Language

#202

Earlier quoted context omitted.

Any examples to add, or you just want to leave it at pithy comment?

Sure, my thinking is that a cons cell can build singly linked lists and node-based binary trees. Some data structures are based only on those, but most involve an array of some kind. In scheme, for example, it's the combination of cons (i.e. lists and trees) and vector (i.e. arrays) that allows for arbitrary data structures. It's very constraining to have only the lists. - array: not a singly-linked list. - hash tabl…

So what about streams? Functions? Closures? Call/cc structures?

I understand your point if you are speaking in literal terms about just simple cons cells, but in practical Lisp/Scheme code, you don’t really rely on just the basics to do things.

I think there’s a hyperfocus sometimes on the simplicity of the core of lisp, the apply/eval balance, but it’s quite possible and often easy and convenient to perform normal programming tasks with these languages as well.

Re: The Janet Language

#203

Earlier quoted context omitted.

Sure, my thinking is that a cons cell can build singly linked lists and node-based binary trees. Some data structures are based only on those, but most involve an array of some kind. In scheme, for example, it's the combination of cons (i.e. lists and trees) and vector (i.e. arrays) that allows for arbitrary data structures. It's very constraining to have only the lists. - array: not a singly-linked list. - hash tabl…

So what about streams? Functions? Closures? Call/cc structures? I understand your point if you are speaking in literal terms about just simple cons cells, but in practical Lisp/Scheme code, you don’t really rely on just the basics to do things. I think there’s a hyperfocus sometimes on the simplicity of the core of lisp, the apply/eval balance, but it’s quite possible and often easy and convenient to perform normal p…

> I understand your point if you are speaking in literal terms about just simple cons cells, but in practical Lisp/Scheme code, you don’t really rely on just the basics to do things.

Agreed.

> So what about streams? Functions? Closures? Call/cc structures?

Those are interesting examples. They are all data structures in a sense (especially streams and closures), but to me they are more like functions than data (yes, yes, functions are values, blah, blah). Call/cc is a reification of execution control; thinking of it in terms of data stretches my brain.

Post reply on HN