4/16 So, here's a question. I'm learning Python, and it seems to me that it
includes a lot of the power of Scheme or Lips, with out the wierdness.
Would Python make a better introduction to CS language than Scheme?
\_ Dunno, why don't you just ask Ping, he taught a 61A style course
in python at Cal. He claims it was good. I still haven't yet
found a good dollar Return on Investment for the time I spent
using scheme. ping's URL : http://zesty.ca/bc/info.html -pst
\_ We had a similar thread on this involving sysadmins. If you
want ROI on your time, get out of CS and leave it to people who
want to be doing it. Go do banking or something. -- ilyas
\_ you seem to be forgetting all about systems. systems people
probably almost never use scheme per se, though granted,
competent ones probably make use of concepts/techniques from
the functional languages.
\_ Did you actually read what my objection was? At any rate,
plenty of 'systems' people use functional languages, if
not necessarily scheme itself. -- ilyas
using scheme. - pst
\_ Read Norvig's essay on python. Languages which don't understand
lisp are forced to reimplement it, badly. I find python a lot
less intuitive than either lisp or scheme. YMMV. -- ilyas
\_ Link? All I could find was Python for Lisp Programmers.
\_ That's the one. It compares python to lisp in various ways.
\_ Link? All I could find was Python for Lisp Programmers.
-- ilyas
\_ Agreed. What's so weird about Scheme? There are almost no
syntax rules in Scheme; the language is very self-consistent and
uniform. Python seems to have a lot of extra, unnecessary
syntactical baggage that doesn't improve language
expressiveness. I also can't understand why Python has such
crippled lambdas. As for the original question about it being
a better intro language than Scheme, until Abelson and Sussman
rewrite SICP to use Python, I'd say no.
\_ Well, yes SICP would be the problem. But imagine we're
in fairy land where SICP is available for EVERY lanugage...
in fairy land where SICP is available for EVERY lanugage...
\_ python sicp: http://www.ibiblio.org/obp/thinkCSpy - pst
\_ There's nothing really "weird" about Lisp. I don't understand why
people think Lisp is any "weirder" than Prolog, Eiffel, Modula-2
or any other language. Just because it's not an ALGOG derived
language doesn't mean it's more or less difficult to learn.
-- williamc
\_ Ok, I like prolog, and use it frequently, but even I admit it's
'weird.' It has a whole different programming paradigm all to
itself. -- ilyas
\_ I haven't used it much, but it seems to be a very or perversely
specialized kind of FP.
\_ Prolog is not functional programming, although you can sort
of think of it that way if you squint and don't look too
hard. Prolog programs are statements which are true, and
prolog flow of control is a proof search. I found I
couldn't really grasp prolog by just pretending it's scheme
without parens, you really need to think about statements
and proofs to program prolog well. -- ilyas
\_ You can write in FP so that all your functions return
boolean and the only operator you use is AND with early
termination. And then adjust the eval loop so it takes
falsehood as failure rather than falsehood.
\_ ... and you still wouldn't get prolog. You would
need OR, and cuts, and superlogical features of
prolog like setof. And you would need to implement
the non-local prolog failure (which to do properly
requires non-trivial messing around with exceptions
or continuations). Like I said, you could sort of
do it, but you wouldn't be a very good prolog
programmer. Doing prolog properly in FP would just
entail implementing a prolog interpreter.
Look at
\_ python sicp: http://www.ibiblio.org/obp/thinkCSpy - pst
couldn't really grasp prolog by just pretending it's scheme
without parens, you really need to think about statements
\_ There's nothing really "weird" about Lisp. I don't understand why
people think Lisp is any "weirder" than Prolog, Eiffel, Modula-2
or any other language. Just because it's not an ALGOG derived language
doesn't mean it's more or less difficult to learn. -- williamc
requires non-trivial messing around with exceptions
stuctures is pretty odd. As Norvig points out "Python seems to be
easier to read than Lisp for someone with no experience in
and proofs to program prolog well. -- ilyas
http://www.bushong.net/david/comparisons/powerset.html
or continuations). Like I said, you could sort of
do it, but you wouldn't be a very good prolog
programmer. -- ilyas
\_ Oh, I don't know, the whole pair/cons/list way of building data-
and think about why the prolog is algorithmically so
different from the others. -- ilyas
\_ Oh, I don't know, the whole pair/cons/list way of building data-
either language."
\_ I can agree with that. Lisp's parentheses explosion is not
as easy for me to read anyway. Personally I found Ruby to be
very easy and elegant, although the block-passing syntax
can get a bit odd. It has very easy-to-use classes
\_ Ruby is closer to smalltalk than Python.
\_ Oh, I don't know, the whole pair/cons/list way of building data-
stuctures is pretty odd. As Norvig points out "Python seems to be
easier to read than Lisp for someone with no experience in
either language."
and objects too, unlike scheme. Python's a bit messier but
has the same stuff (Python's "len()" bothers me.)
stuctures is pretty odd. As Norvig points out "Python seems to
be easier to read than Lisp for someone with no experience in
either language."
\_ I can agree with that. Lisp's parentheses explosion is not
as easy for me to read anyway. Personally I found Ruby to be
very easy and elegant, although the block-passing syntax
can get a bit odd. It has very easy-to-use classes
and objects too, unlike scheme. Python's a bit messier but
has the same stuff (Python's "len()" bothers me.)
\_ And processing lists (which is actually very intuitive
for anybody who has taken introductory set theory) is
somehow stranger than processing
while (<>) { if ( $_ ~=/foo/) { s/bar/baz/}}? I don't know
but it took me about 30 minutes to learn scheme, whereas
it took me a solid week to just learn the basics of C,
and another month to do something useful with it.
\_ are you replying to the right person? I mentioned Ruby,
not Perl or C.
\_ Personally, I think Smalltalk, which Python is closely based on,
is better than both Lisp or Python. Lisp has a lot of great things
but the problem is that there is no syntax to the language. The
human has to be the compiler (and, when debugging, the decompiler).
Dylan on the other hand...
\_ Ruby is closer to smalltalk than Python. |