Hacker News new | past | comments | ask | show | jobs | submit login

Are reduce and lambdas really that cryptic/complex to people? I think I need an adult. -.-



I guess the point is that while many say what you do here, many of those also say "No! Using lambdas and reduces is great but saying `+/!10` is impossibly terse".

Essentially that's just the Blub Paradox in action.

Sadly, at the moment I'm on this side of the Blub Paradox in a weird way. I do acknowledge the power of specialist syntax and short notation (studied Maths which is full of this) but haven't dedicated sufficient time to it for it to be fluid to me.


range(100).reduce(plus, 0) isn't cryptic, what's cryptic is single character symbols. Looking at that line, unless you know K specifically, it's very difficult to figure out it's a reduce. Where as `sum(range(100))` is pretty self explanatory to most programmers who don't know python.


Not to mention it's a lot easier to search for `reduce` than `+`.


I don't know K but "+/" immediately stood out to me as "add over", so I think they made a good choice in using "/" for fold.

"!", on the other hand...


There's no good (or bad) choices for mapping abstract concepts like ranges, mapping, reducing, or combining to common (ASCII-) symbols. Every choice is inherently arbitrary and carries no meaning whatsoever (besides maybe ergonomics). One could just as well argue that "/" is the ISO 8000-2:2009 2-9.6 recommended symbol for division. The same source also shows why symbols alone are inadequate for an explicit representation of abstract concepts: the Nabla symbol alone represents 5 different operations depending on context according to the ISO standard.


What would be a more obvious symbol choice for range (aka til or seq)? Pound (#)?


It's not commonly taught in college. They're probably simpler than your typical for loop.


I’d be quite disappointed in your degree if you were never asked to take a course that was centered around a functional language.


Many smaller CS departments in the US have no such a course in their curricula.

There simply aren't enough professors to maintain that breadth of courses in those departments.


Really? That’s quite surprising; I would expect all of them to have some sort of “programming languages” course or similar…what classes do they have then?


AFAIK most or all of those curricula do include a sirvey course for programming languages.

IIUC the GP was talking about courses that specifically focused on functional programmimg.


Fair, but I from the context of the top comment I was talking more about being able to recognize and use basic functional constructs.


My CS program (class of 2007) was mostly c++. There was one semester of Java, but it was optional.

We learned fundamentals, discrete math, symbolic logic, and also "databases" (read: MS Access), object-oriented design, and I forget what else.

With the benefit of hindsight, I feel like I overpaid for that education :)


I’m a math student minoring in CS and I covered all of that before I’d finished second year. I also covered functional programming in first year.

I’m really surprised your CS degree didn’t cover operating systems, compilers, or algorithms. CS students at my school are required to take all of that stuff (and a lot more, including everything you’ve mentioned) before they even finish 3rd year. In 4th year they’ll be studying things like networking, real-time programming, computer graphics (physically-based rendering), machine learning, and computational math (for simulations, numerical solvers, linear and nonlinear optimization, etc).


Ah yes, operating systems - file that under "I forget what else".

Like I said, I feel that I overpaid for that education. The degree itself has paid for itself many times over, but I needed to learn basically everything important for a CS career on my own.


"Write an interpreter for a functional-like language of your choosing with XYZ requirements". In Haskell. As a 1st year uni project. I was just getting over Fortran. And prove it! "Can I do it in Turing please?" "No. Haskell." I still curse that exercise to this day, but it enlightened thinking.

A CS or Maths course should certainly involve some functional language element.

For someone reading thinking of CS at university, whether there's a requirement or option in such would be a good question to ask (you're interviewing them as much as they're interviewing you).


It's taught in bootcamps...


It's definitely more cognitive load to x people where x = 'some' or 'most'. It does not matter what x is, your change will be rejected.


Sounds like a recruiting problem, or possibly a training one.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: