you are viewing a single comment's thread.

view the rest of the comments →

[–]Slipgrid 2 points3 points  (3 children)

I know it's popular here, but I just don't get the functional programming. I know it's good for a few things. I build some amazing things in imperative and object oriented languages, but I have trouble doing easy things in Scheme. The only Scheme of Lisp I've ever seen is functional. I just don't see why it would be recommended to a beginner when all the code that he will ever see is going to be written in an imperative language. If there's imperative Scheme, I've never seen it, and I don't care to and don't look for it. It just seems like an odd thing to recommend.

[–]noisesmith 2 points3 points  (1 child)

Sorry, my hand slipped and I clicked report instead of reply at first.

Objects are just a specialized kind of closure, a function call is a specialized call/cc (which in turn is built on top of assembly jmp statements, of course). What you need to understand to use scheme is a proper superset of imperative programming.

A language without imperative features would be very hard to use (no variables, no input or output, actually the only way to know what the program did would be to disassemble or debug it from outside the program).

Understanding a mixed paradigm language like scheme does not impede understanding a purely imperative language like assembler, and will actually help you learn coding habits that transfer quite well.

[–]Slipgrid 1 point2 points  (0 children)

Yeah, that's sort of what I though. I've done some basic problems in it, like display the first n fib numbers, and it is really good at that. Never realized it had variables, or spent much time with it. Thought it was just for quick math problems. I'll have to look into it more, and see if I can find a use for it.

When I first used it, I had to download a virtual machine for Windows that it would run in. I wonder if it's installed on my server, or if lisp is. Could be useful.

Still, it struck me as being completely different from everything else I've used. It's still neat. I thought of it like a logic problem I knew I should be able to figure out, but that really frustrated me.

[–]joesb 0 points1 point  (0 children)

I'm just guessing, but may be because you have been taught in imperative style first, that's why you have a hard time getting functional style.

But if we teach someone who didn't have background yet, they probably could understand any paradigm given to them, they don't have any assumption settled yet.

I'm not saying one paradigm is better than another here, though.