G
gwowen
must things entitled "X is evil" are nonsense
'"X is evil" considered harmful' ?
must things entitled "X is evil" are nonsense
I'm-not-starting-a-language-war-but
Lisp has:-
- unusual syntax
- it's a very big langauge
- little out-of-the-box support for modern programming (GUIs,
web, etc.)
'"X is evil" considered harmful' ?
Nick Keighley said:I'm-not-starting-a-language-war-but
Lisp has:- ....
- it's a very big langauge
Lisp's syntax is not unusual - it's simple. Extremely simple and intuitive.
Lisp as a basic language is small, very small.
You can teach both the syntax and all of the basic constructs in ~1 hour to a reasonably competent CS student.
Enough to write any algorithm a first-year student is likely to write. I can't think of another language where that is even theoretically possible.
I'm sort of old-fashioned I suppose, but what does a first-year CS student need with fancy GUIs?
Honestly, they just confuse the issue. Lisp is an interpreted language
so an interpreter prompt is really all you need
(okay, a Lisp-aware text editor like emacs would be nice too).
gak.
My first college CS course was based on Scheme (a LISP variant).
At the time I thought it was odd, but now I consider it an ideal first-year-CS language. You don't spend time worrying about syntax, IDEs, etc. You worry about algorithm design and correctness. As it should be.
Nick said:I'm-not-starting-a-language-war-but
Lisp has:-
- unusual syntax
- it's a very big langauge
- little out-of-the-box support for modern programming (GUIs,
web, etc.)
Every programming language has an unusual syntax to those who never had any
contact with it.
Then there is Scheme.
I believe there are some lisp bindings for some GUI toolkits. And there are
some CGI interfaces for Lisp floating around.
Lisp as a basic language is small, very small. You can teach both the syntax
and all of the basic constructs in ~1 hour to a reasonably
competent CS student. Enough to write any algorithm a first-year
student is likely to write. I can't think of another language
where that is even theoretically possible.
I used Golden Common LISP and PROLOG. Their main selling point are
recursion. It would be a nightmare to code procedural codes.
I'm sure some still are.
As a first language for didactic purposes? I think C, C++ and Java
are all equally lousy. Pascal is distinctly better, Python better
again. YMMV
It's wrong to say it has no value. I used to work on a Pascal compiler
that was written in Pascal...
But mostly it's a simplified teaching language. You can show beginners
how to do things without teaching them bad habits, and they can produce
simple programs quite quickly.
It may be that there are better things now; I'm not in teaching. My son
learned Java as a first language.
kind of funny is I started getting into programming a little while
before Java came out (I started messing with a lot of this stuff
sometime around 3rd grade IIRC).
some-odd years later, amid its time of huge hype, I already knew C, and
messed around with Java, but didn't really like what I saw:
it was very painful/awkward to use, and slow as hell...
they have since added a number of usability-improving features (inner
and anonymous classes, "import static", ...), and made Java much faster,
but I still find it kind of awkward and lame.
granted, I did recently go and look back at some code (in C) I had
written long ago (back when I was in high-school, ~ 12 years ago now),
observed that the quality was actually fairly poor by my current standards.
Maybe some other things would be good for them too.
http://www.codingthewheel.com/game-dev/john-carmack-script-interpreters-considered-harmful
I'm not trying to start a language flame war, honestly. I'll let this
guy do it for me. http://xkcd.com/353/
Python has some interesting features, but I tend to think that some of
that might be difficult for beginners. For example, I agree with you
that strong typing is a good thing.
If Python is "good", whatever that means, then why isn't Lisp,
"better"? http://xkcd.com/224/
ok it's simple. It's /also/ unusual. One mans "intuitive" is another mans.... But we have fallen into pantomime mode.
Common Lisp may have a very small core but I've never found it particularly easy to identify.
probably. But then basic C or Pascal or Python wouldn't take too long either.
really? I suspect bit banging is a bit difficult in core Lisp. Knuth had a reason for using pseudo-assembler.
What would be difficult in Pascal or Python?
engage their interest. real world programming actually has to deal with such things. When I was talking about beginner languages I wasn't necessaily thinking of CS students.
no. It *may* be an interpreted langauge. The CL standard actually requires a compiler. Stalin Scheme is one of the more aggressive whole program compilers in existence.
yep.
never quite got the enthusiasm for interpreters. I've programmed in Python but I've never understood why interpreters are super cool. On modern hardware compilers are pretty quick too.
gak.
I've learned, used and like Scheme.
At the time I thought it was odd, but now I consider it an ideal first-year-CS language. You don't spend time worrying about syntax, IDEs, etc. You worry about algorithm design and correctness. As it should be.
[the new google interface seems to have duplicated the entire post here :-( ]
C, C++, Python, Perl all support recursion. What language doesn't?
Some older BASICs?
(e-mail address removed) wrote:
(snip, someone wrote)
Even the BASIC GOSUB should allow for recursion.
Fortran added it in Fortran 90.
But even though those allow for it, many problems are easier
to write, and run faster, without using recursive calls.
Factorial and Fibonacci are two favorite examples of recursion
that, especially the latter, should be done without recursion.
but, the recursive Fibonacci function makes such a great benchmark...
why not have an algo where one can be like "fib(38)" or "fib(42)" and
measure how long it takes to complete?
(snip, I wrote)
I suppose it is a good benchmark for function call overhead,
but not much else. Maybe also a test for tail recursion optimization,
but there should be better tests for that. (It isn't so bad if
you include a cache of previously computed values.)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.