[Bluej-discuss] bluej-discuss Digest, Vol 52, Issue 12

Ben Kaplan bskaplan14 at yahoo.com
Mon Oct 15 02:17:06 BST 2007


Last time I checked, Scheme required the notation "(* 3 (+ 2 2))", which is a lot easier to read with the parenthesis than without (as you showed it). Scheme's stepper also makes it really easy to see how the computer evaluates expressions like this, which you can't do in a language that uses infix notation.

----- Original Message ----
From: Aryeh M. Friedman <aryeh.friedman at gmail.com>
To: General discussion for users of BlueJ <bluej-discuss at bluej.org>
Sent: Sunday, October 14, 2007 4:24:35 PM
Subject: Re: [Bluej-discuss] bluej-discuss Digest, Vol 52, Issue 12

Sharon M. Tuttle wrote:
> (My apologies that this starts out off-topic - I'll bring it back to
> BlueJ at the end!)
>
>   
>> Pre/postfix belongs in compilers and very old hp calculators only!!!
>> All humor aside anything but infix requires an amazing amount of
>> conceptual conversion between problem and code space.   That plus having
>> to count parens basically rules out any lisp variant in my mind.
>>     
>
> All humor aside --- have you really looked at a function call lately?
> What is really all that different between (sqrt 4) and sqrt(4)? There
> are even the same number of parentheses! 8-) Function (and method) calls
> look pretty darn prefix to me.
>   

I was refering to arhithmatic (2 2 + 3 * would just baffle most
beginners but 2+2*3 [assuming traditional human precendance] can be read
instantly by anyone who is ready for college])
> And if you use an IDE (like DrScheme) that highlights the portion of code
> you've closed every time you type a closing parenthesis, you might find
> you don't have to count parentheses all that much. Of course, Bluej's
> parenthesis and curly-brace matching is also quite useful for the same
> reason. And in all cases, proper indentation helps to avoid blind
> "bracket-counting" (which of course isn't what you meant, I'm just
> bloviating! 8-) )
>   

the reason for using a mix of symbols vs. just one for grouping is
breaks the counting up... something is very wrong if you have an
expression that has more then 4 leading or closing parens in algol like
langs because a[i] is not the same as a(i)... under your arg we should
teach fully parened math only (because the only advantage of pre/postfix
over infix for human readers {compilers have different reasons} is it is
essencially fully parened without the need for parens)

the comments to the student who said we are arguing over nothing show
the evils of not really know the reason why the "standard" style exists
in the form it does (and IDE's help in that by doing the work for
you).... I would go so far as saying if your going with a 3 semester
Java sequence (procedural programming with minimal OO in Java I (upto
just before the world of zuul), OO/Exceptions/GUI/Files in Java II (the
rest of the book) and data structs/algorithms in Java III (any good ds/a
book in Java)) you should require everyone in Java I to use the Java I
lab (where autoident and grouping char matching are turned off) only.

_______________________________________________
mailing list bluej-discuss at bluej.org
To unsubscribe or change your preferences, go to
http://lists.bluej.org/mailman/listinfo/bluej-discuss







       
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bluej.org/pipermail/bluej-discuss/attachments/20071014/7aa33fe6/attachment.html 


More information about the bluej-discuss mailing list