[ale] Any language (wuz: Assembly Language?)

Byron Jeff byronjeff at mail.clayton.edu
Sun Oct 27 13:10:00 EDT 2013


On Sun, Oct 27, 2013 at 09:31:39AM -0400, Ron Frazier (ALE) wrote:

> In my opinion, the best language should ignore all white space AND NOT
> require any curly braces or semicolons except as syntactically required
> delimiters for lists and arrays, etc.  That's the way Clipper was, and it
> was a real pleasure that the compiler wasn't always bugging me about
> formatting yet still figured out how to compile the program.

I cannot see how it can be without braces. How do you differentiate this:

if a > 5 then if b < 3 then call_small_b() else do_you call_small_a_or_big_b ()

Python makes it clear:

if a > 5:
   if b < 3:
      call_small_b()
   else
      call_big_b()

as opposed to:

if a > 5:
   if b < 3:
      call_small_b()
else
   call_small_a()

Braces can disambiguate the two also. But unless a rule is imposed that
else is always associated with the closest open if, then the original
construct is ambiguous. And if that rule is imposed, then there's no way to
do the second construct.

Then there is the philosophical issue of indentation. Indentation is rarely
for the benefit of the compiler. It's task is to create organization for
human readers. Reading improperly indented code is one of the biggest
headaches. And as a Professor is unfortunately a task I have to do more
often than I like.

Python's use of significant whitespace is one of the tools that actually
simplifies the language syntax. One statement per line so no semicolons are
required. Indentation replaces braces. It also enhances readability. If my
E-mail is properly formatted, then the two constructs above are visually
clear in their intent, while the original is ambiguous because there is no
imposed structure.

Of course all this is IMHO.

BAJ


> 
> Not trying to start a flame war or anything.
> 
> Sincerely,
> 
> Ron
> 
> 
> 
> "Rev. Johnny Healey" <rev.null at gmail.com> wrote:
> 
> >Haskell supports significant whitespace and curly braces.
> >
> >It is obviously the best programming language.
> >
> >-Johnny
> >On Oct 26, 2013 9:59 PM, "Pete Hardie" <pete.hardie at gmail.com> wrote:
> >
> >> Python doesn't use tabs - it uses consistent indentation.  TPTB
> >(Guido,
> >> the BDFL) recommend tabs, but I write Python with 4-space indents.
> >>
> >> And it keeps be from having to deal with previous code that mixes
> >if-else
> >> clauses without braces-around-blocks - a capital offense, IMNSHO
> >>
> >>
> >>
> >> On Sat, Oct 26, 2013 at 9:40 PM, Jim Lynch
> ><ale_nospam at fayettedigital.com>wrote:
> >>
> >>> On 10/26/2013 09:23 AM, Charles Shapiro wrote:
> >>>
> >>>> You've seen this ( http://me.veekun.com/blog/**
> >>>>
> >2012/04/09/php-a-fractal-of-**bad-design/<http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/>),
> >right?
> >>>>
> >>> I will never use a language that requires tabs.  Tabs are absolutely
> >the
> >>> scourge of programming.  They are completely foreign to any rational
> >>> layouts.  They are so 60's.  Python sucks so bad it's pathetic.  Php
> >has
> >>> warts true.  But it can be used to get the job done.  If Python ever
> >gets
> >>> curly braces I'll use it but not as long as it remains in the
> >distant past
> >>> using an arcaic typewriter structure.
> >>>
> >>> Jim.
> >>>
> >>> Think anyone knows I don't like tabs. ;)
> >>
> >>
> >> --
> >> Pete Hardie
> >> --------
> >> Better Living Through Bitmaps
> >>
> 
> 
> 
> --
> 
> Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9 Mail.
> Please excuse my potential brevity if I'm typing on the touch screen.
> 
> (PS - If you email me and don't get a quick response, you might want to
> call on the phone.  I get about 300 emails per day from alternate energy
> mailing lists and such.  I don't always see new email messages very quickly.)
> 
> Ron Frazier
> 770-205-9422 (O)   Leave a message.
> linuxdude AT techstarship.com
> Litecoin: LZzAJu9rZEWzALxDhAHnWLRvybVAVgwTh3
> Bitcoin: 15s3aLVsxm8EuQvT8gUDw3RWqvuY9hPGUU
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo

-- 
Byron A. Jeff
Chair: Department of Computer Science and Information Technology
College of Information and Mathematical Sciences
Clayton State University
http://faculty.clayton.edu/bjeff


More information about the Ale mailing list