The Artima Developer Community
Sponsored Link

Java Buzz Forum
Another anecdote on how whitespace can be evil

0 replies.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a flat view of this topic  Flat View
Previous Topic   Next Topic
Threaded View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Another anecdote on how whitespace can be evil Posted: Jul 18, 2006 2:50 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Another anecdote on how whitespace can be evil
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

In the entry from a Python fan Ruby Style Adding Methods to Existing Classes in Python? you look into the comments to see the following code:

class Foo:

def __init__(self):
self.x = “x = 1?
self.y = “y = 2?

def showx(self):
print self.x

def showy(self):
print self.y

if __name__ == ‘__main__’:

# Attach at runtime…
Foo.showy = showy

f2 = Foo()
f2.showx()
f2.showy()


The whitespace is lost, and this code is hard to read at best.

At least if curly-code is misformatted (which is frequent too) you can paste it into your IDE of choice and autoformat.

Read: Another anecdote on how whitespace can be evil


Topic: FreeBSD Foundation boosts Java support Previous Topic   Next Topic Topic: You Better You Bet

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use