Hacker News new | ask | show | jobs
by zoogeny 31 days ago
This is a classic debate in programming, literally:

2001: "Beating the Averages" (Paul Graham) [1]

2006: "Can Your Programming Language Do This?" (Joel Spolsky) [2]

Both of these articles argue for the thesis that programmers that have been deprived of certain language features often argue that they don't need those features since they are already comfortable working around the lack of said features.

It's a fancy way of arguing: you don't know what you're missing because you've never had it. Or, don't knock it until you try it.

Consider, is your argument a) I've never used it and don't see a need for it, or b) I've used it before and didn't get any benefit?

1. https://paulgraham.com/avg.html?viewfullsite=1

2. https://www.joelonsoftware.com/2006/08/01/can-your-programmi...

1 comments

I can already do functional programming like map/reduce in C# tho. Not sure what the LISP argument is. Spolsky was saying there's a perf benefit in there somewhere but I'm not seeing how unions give me that.
You have at least two options:

1. Argue from ignorance. Never try unions in any other programming languages and completely disallow their use in C# codebases that you participate in.

2. Try them out and adopt an informed opinion.

You may even choose to remain in ignorance until someone wastes their own time trying to convince you. But it isn't my job or desire to teach someone who won't put in the effort to learn for themselves.

its not your job to comment spitty replies either but yet you volunteer that time, when you could have been productive instead of whatever the fuck this shit is.

My primary concern with this pattern versus exceptions is calling code can simply discard the resulting problem.

I mean, they have to explicitly unpack the error and then choose to do nothing with it. It requires roughly the same amount of code to do the same with discarding an exception.

Except with a Result type the fact that an exception can occur and should be handled in the first place is explicit.

The problem if anything is that you MUST say something about the error case, despite the common scenario being “pass it forward” — the same reason exception do this by default. Which is also why rust for example special cases Result with the ? operator to do exactly that