Live data from Hacker News

Motivation – Keli Language

keli-language.gitbook.io

11–20 of 300 posts

Re: Motivation – Keli Language

#11
post #9
post #3

The following example is kinda funny: // This is obviously not too right ",".splitBy("1,2,3,4,5") // This should be right, because it reads out more naturally "1,2,3,4,5".splitBy(",") Seeing as Python uses the first version for .join()

Yeah Python (and I think JavaScript?) pretty clearly have `join` backwards.

JS uses the second example

Re: Motivation – Keli Language

#12
post #3

The following example is kinda funny: // This is obviously not too right ",".splitBy("1,2,3,4,5") // This should be right, because it reads out more naturally "1,2,3,4,5".splitBy(",") Seeing as Python uses the first version for .join()

Exactly what I came here to write about:

  Python 3.8.2 (default, Jul 16 2020, 14:00:26) 
  >>> " ".join(["a", "b"])
  'a b'
vs Ruby

  2.6.5 :001 > ["a", "b"].join(" ")
  => "a b" 
I don't know which one is more natural but I prefer the Ruby version because it's consistent with

  "a b".split(" ")
which works in both languages. One less think to remember.

Re: Motivation – Keli Language

#13
I really appreciate the effort of designing the syntax to match common IDE expectations. However, I think it shouldn't be too difficult to add intellisense for Haskell-like syntax to IDEs as well. Especially with all the types available!

The only unconventional thing is that the function might be put in-front of the value and some parentheses need to be added, instead of just putting it after the cursor like with method syntax. I assume you get used to that rather quickly.

Re: Motivation – Keli Language

#14
Great to see the motivation spelled out clearly, but something seems strange. If you read the Quora answer, it just rants about how functional programming is obsessed with big words and esoteric concepts that are hard to grok, and that this constitutes poor UX. But Keli’s interpretation seems to be that the moment-to-moment experience in the IDE is poor, and that that’s what the language wants to address with more explicit syntax and intellisense support. These seem like two very different problems under the umbrella term “UX”.

Re: Motivation – Keli Language

#15
I disagree with all points in the article - the user experience with existing FP languages is superior, and the IDE integration for strongly typed languages is generally very impressive.

Syntactic window dressing isn’t what makes or breaks a language.

Re: Motivation – Keli Language

#17
post #8

While I could get onboard with functional languages being more user friendly I didn't find the motivation to be compelling. > Ambiguous functions argument positions It just seems to be advocating for named arguments, something which the majority of languages (OO or FP) support these days. You could say that requiring named parameters is a feature but it's hard to get excited about. > Not Intellisense friendly I use E…

Elixir is very good about function positions, too, by being consistent in it's stdlib, and by pinning structs to modules. Almost all library writers adhere to the convention.

Re: Motivation – Keli Language

#20
The author lists Ocaml as "non-IDE-friendly." This is not my experience. Ocaml is one of the most IDE friendly languages I have in my toolkit right now -- not just functional languages, but all of them. Ocaml + Emacs + Merlin is stable, accurate, very fast (responsive), and easy to set up and configure.

Plus, named and named-optional parameters are supported in the language, and can be used to good effect for disambiguating function parameters of similar type (the split, join problem).

Post reply on HN