Live data from Hacker News

Motivation – Keli Language

keli-language.gitbook.io

131–140 of 300 posts

Re: Motivation – Keli Language

#131

I think it's great that Keli is designed with IDE support in mind. However I believe that this is only half of the reason why FP still doesn't really break through in the corporate world. The other reason is that many FP users are too enthusiastic about creating abstractions. This is of course something that FP is exceptionally well suited for. An api that was written to simply process a list of Orders into a Report…

>The other reason is that many FP users are too enthusiastic about creating abstractions.

Elm lacks typeclasses, yet I've found this lack is what keeps a lot of libraries at bay that would have otherwise turned out overly abstract (see any mainstream Haskell library, really). It's the same reasoning behind Go: With great power comes great responsibility. At large, programmers shoot their own feet with powerful languages. Therefore, take away their guns, ie make languages less powerful. I still wish there was something like Elm, but tailored for backend/network programming: https://news.ycombinator.com/item?id=21909087

Re: Motivation – Keli Language

#133
post #41

The author lists F# as not IDE friendly. I find this categorization inaccurate. F# works great with Visual Studio, and especially well with intellisense. F# was designed as industrial language from the beginning, and high quality tooling is a large part of that. It might just be me, though, maybe other people use the language in ways that don't work that well there.

They also admit that it is better than average here: https://keli-language.gitbook.io/doc/specification/chapter-1...

> Keli is created to overcome a problem that is almost undeniable in every functional programming languages: the lack of proper IDE incorporation (perhaps except F#). In short, Keli can be viewed as an attempt to assimilate the Smalltalk's syntactic model into a functional programming environment.

Re: Motivation – Keli Language

#134
post #30

Earlier quoted context omitted.

Any chance you have a write up about your experience with it??

I'm pretty sure this is a joke. There's no way you can run a SaaS on two lines of code... Unless it's some bizzarely simple calculator or something like that.

Of course this is a joke.

Re: Motivation – Keli Language

#136

Earlier quoted context omitted.

> An api that was written to simply process a list of Orders into a Report might be abstracted into a fold on some monad, which at first seems a great idea. But if you're not careful, readability suffers a lot. It's much easier to get to know an application when its code deals with business objects that you already understand well, than to read hundreds of lines of code that deal only with abstractions. Do you have a…

I'd prefer readability to suffer because the fold over a monad needs something clever that requires a bit of reasoning to understand than because vast amounts of "readable" boilerplate (for example, trivial getters and setters) hide a needle in a haystack.

folding over a monad (or any other combinator) doesn't require extra reasoning or anything clever, that's the point.

Re: Motivation – Keli Language

#137
I personally don’t think keli is fixing the right problems: I’m personally an ocaml user, and I don’t see what keli adds to ocaml.

They cite positional parameters (that they call "prefix notation"… i wonder why ?) but ocaml already has support for named parameters (you can write things like split ~on:"," "a, b, c" for example) Moreover, guessing the order of parameters is generally not that hard :

— If you have good intellisense your IDE will tell you which parameter is which (how they are called in doc)

— If you have good intellisense, your ide will tell you the type of function, which, with strict typing is sufficient in a lot of cases (think "send : Unix.socket -> string -> unit", the type tells you the order of arguments)

— with named parameters, you don’t have to look up the order of parameters… but you have to look up their names, same problem

— This last one is pretty subjective, but in a lot of cases you can guess the order of parameters by thinking "on which argument does it make sense to do partial application ?" `splitBy ","` makes sense, `splitBy "a, b, c"` doesn’t really… so "," is the first argument (but that is subjective)

For IDE support, with the right tools, in my experience it is pretty good (ocaml-lsp or merlin do the job pretty well, and strict typing often allow for better intellisense than on non-functional languages)

Though there we arrive at the real problem I’ve experienced : the tooling. It’s not actually that bad. more like it’s badly explained. how do you know that you are supposed to install

— opam for package management (and reinstall ocaml via opam)

— dune for building

— utop as a REPL, because the basic REPL sucks

— batteries or janestreet-core for "standard library" because the standard library sucks (and which one anyway ?)

Plus these tools are hard to use at beginning / have a learning curve. (why can’t creating a project be as simple as - type "cargo new project" -> now you automatically have a project dir with a local opam switch, an opam file, a dune file, an example program, and basic utilities installed in that switch ? )

Personally, I think that’s what fp lacks the most right now (though I’m probably influenced a lot by ocaml) : easy to use and flat-learning curve tooling

Re: Motivation – Keli Language

#138
I like the idea but I think the tactics are wrong. The better approach would try to make the experience as much like OOP as possible. Like the named argument, message passing thing is nice, but it's going to be just one more thing that the 95% is going to have to get used to. If the goal is approachability, then have to get it as close to existing experiences as possible.

Re: Motivation – Keli Language

#139

Earlier quoted context omitted.

>I absolutely hate named parameters. They’re biased towards new users of a language and quickly become painful to write once you’re familiar with the function call. It is a fair complaint, but don't you think this is offset almost entirely by a good IDE?

I haven't used an IDE in years. Just VSCode. Which is not really an IDE. I haven't missed it. I think that if a language depends on an IDE to be useful, it's a design smell.

VSCode is an IDE. Otherwise, what is am IDE according to you? Is Emacs an IDE? Eclispe?

Re: Motivation – Keli Language

#140
post #32

Earlier quoted context omitted.

Compare that to JavaScript where you can literally just install vscode and node and you’re up and running. Not to mention that you could pop open a console in any browser and execute code. I love OCaml as a language but we have to admit that the developer experience just sucks. For something to be simple, a 10 year old kid needs to be able to figure it out. That’s how languages get adopted.

What an odd comment. >Compare that to JavaScript where you can literally just install vscode and node and you’re up and running As opposed to OCaml where you... install opam and merlin and you're up and running? >Not to mention that you could pop open a console in any browser and execute code. As opposed to OCaml where you can pop open utop and execute code. >For something to be simple, a 10 year old kid needs to be…

> How many 10 year old kids are there working as professional programmers?

Many of them in 10 years time, and they will be using concepts they learned when they were 10. And FP enthusiasts would complain why no one uses their favourite language.

My point is, if we want to get more people to use FP we have to make it more accessible. Everything from building better tooling, tutorials, environments. Good languages alone don’t matter.

You can’t tell me that it’s just as easy to get started with JavaScript or Python today as it’s to start with OCaml. That’s just delusional.

Post reply on HN