Live data from Hacker News

Motivation – Keli Language

keli-language.gitbook.io

281–290 of 300 posts

Re: Motivation – Keli Language

#281

I am going to call bullshit on this: 1) Function argument order is not an issue in practice. Especially Elixir or OCaml providing keyword arguments. Also, there are mostly conventions eg search term comes first in replace function. Elixir, F# all provide Pipes, while little more verbose than dot notation, more universal than methods on objects. 2) IDE support: above points apply, although pervasive type inference may…

Yeah I agree that those two points don't make much sense whatsoever. Though I also don't agree with your point 1. I don't know if you have had much experience writing a functional language professionally. The benefit of immutability is exactly to make reasoning about your program much easier. Of course as you mentioned computers are indeed based on the von Neumann model, so in the end we sometimes have to go into memory usage details. However, unless you're programming some high-performance game, the vast majority of programs run totally fine with mostly immutable data structures. It's also especially suited for distributed computing (e.g. actor model) which is becoming the norm nowadays. In 95% of programming activities, the traditional "real computer science (what is "fake" computer science?), algorithms, data structures, number theory, probability" are used surprisingly rarely, while the elegance of functional/mathematical reasoning really makes the programming experience much more enjoyable and bug-free.

Re: Motivation – Keli Language

#282
post #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.

[deleted]

Re: Motivation – Keli Language

#283

Earlier quoted context omitted.

> the mistake that many FP advocates make is to make it a war of FP vs anything else. I don't disagree with this (goodness knows there are plenty of functional purists who come across as religious zealots), but I think it's also worth mentioning that there's an opposing camp of people who are hard-set against ever considering FP for anything at all because they've bought fully into object orientation and stateful com…

I've had people chew me out for using function objects in Java, saying it's too complicated and the newest thing isn't always great. I wanted to point out that Java 8 is 6 years old now, and qsort() has been a thing for a while.

I remember when I discovered "map" and "filter" in Python around 2000 or so and everybody I showed them to at work (it was a Java shop) thought they were so difficult and abstract compared to

  ArrayList result = new ArrayList();
  for (int i = 0; i 
To them that was the "easy" way, and I was a weird kid into weird shit. I didn't make any progress with them at all trying to convince them that "map" and "filter" were simpler than iterating over an index every single time. Now everybody has forgotten that business logic used to be one for-over-index loop after another, often nested, and debugging an error often meant running through a for-loop in a debugger over and over again examining the partially constructed result at the end of each iteration trying to figure out where it went wrong. FP saved us from that, and it gets no credit. People only think of FP as the scary stuff they haven't learned yet.

Re: Motivation – Keli Language

#286

I got excited at the idea of smalltalk syntax in functional clothing but it never seemed to deliver?

It won’t be delivered because it’s actually my final year project for my software engineering degree, and plus I’m also not convinced by this language anymore, I still think that there’s a better syntax which I can’t think of right now

Re: Motivation – Keli Language

#288
post #268
post #251

Earlier quoted context omitted.

I haven't seen evidence of reduced getters & setters in my day to day yet - they still seem pretty prevalent when OOP comes into the picture. I'd even say they got a bit worse because now it's excessive getters and setters with gigantic JavaDoc style comments all around them. If I see "@returns id integer The ID" one more time I'll be tempted to throw my monitor out the window.

> If I see "@returns id integer The ID" one more time I'll be tempted to throw my monitor out the window. I honestly believe we're in a dire need for a more up-to-date metaphor that lets us better express our anger at a computer, due to monitors becoming paper thin and lightweight in the past decade or so.

Hitting the desk with a fist of moderate force is harmless and rattles lightweight modern computer equipment very satisfactorily.

Re: Motivation – Keli Language

#289
post #281

I am going to call bullshit on this: 1) Function argument order is not an issue in practice. Especially Elixir or OCaml providing keyword arguments. Also, there are mostly conventions eg search term comes first in replace function. Elixir, F# all provide Pipes, while little more verbose than dot notation, more universal than methods on objects. 2) IDE support: above points apply, although pervasive type inference may…

Yeah I agree that those two points don't make much sense whatsoever. Though I also don't agree with your point 1. I don't know if you have had much experience writing a functional language professionally. The benefit of immutability is exactly to make reasoning about your program much easier . Of course as you mentioned computers are indeed based on the von Neumann model, so in the end we sometimes have to go into me…

> In 95% of programming activities, the traditional "real computer science (what is "fake" computer science?), algorithms, data structures, number theory, probability" are used surprisingly rarely

Yeah, unfortunately, the cheap webshits use reverse loops because they read in some medium article that comparison to zero is shorted, while repeatedly concatenating strings in an inner loop.

Doesn't help with things like - indexing on utf-8 strings is O(n) and often the compiler/JIT is not able to figure out all necessary loop fusions for you.

Basic algorithms, data structure knowledge is a must for every programmer. I don't say they should know how to prove a treap is 0.yz times more efficient than a skiplist. Now the next part.

> while the elegance of functional/mathematical reasoning ...

There is natural reasoning and there is category theory stuff that only serves to signal the dude has studied some aBsTrAcT mAtHeMaTiCs in programming communities.

A best example of this is Haskell. They bastatdized quicksort to show an "elegant example" on their website.

Another example is react. "React is fast omg virtual DOM". Not everyone will have latest macbook pro like hipster webshits.

I know, and I acknowledge the improvements in craft of ~~CRUD WEBSHIT~~ programming that came from FP camps. But there is also lot of bullshit there in FP camps.

Re: Motivation – Keli Language

#290

I am going to call bullshit on this: 1) Function argument order is not an issue in practice. Especially Elixir or OCaml providing keyword arguments. Also, there are mostly conventions eg search term comes first in replace function. Elixir, F# all provide Pipes, while little more verbose than dot notation, more universal than methods on objects. 2) IDE support: above points apply, although pervasive type inference may…

Immutability makes updating deeply nested data structures more difficult, since you have to update every level with the updated copy of one of its children.
Post reply on HN