LISTSERV mailing list manager LISTSERV 16.5

Help for CSSA Archives


CSSA Archives

CSSA Archives


CSSA@LIST.UVM.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CSSA Home

CSSA Home

CSSA  March 2009

CSSA March 2009

Subject:

Response to Peter and Jake

From:

Michael Evan Karpeles <[log in to unmask]>

Reply-To:

Computer Science Student Association <[log in to unmask]>

Date:

Sat, 21 Mar 2009 03:57:52 -0400

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (167 lines)

Jake,

I think Peter's point is still important to note, even in your  
example. Suppose you wish to 'combine' a set of existing assumptions  
(A1, A2, ..., An) in order to inductively determine a new rule-set of  
assumptions (B1, B2, ... Bn). What if one of the assumptions Ai is  
only assumed to hold true for a population of 50 objects whereas some  
Ak (for a k != i) only applies to populations of size 80. Any rule  
sets generated from the combination of assumptions Ai and Ak wouldn't  
logically describe a population of either 80 or 50. While this example  
is explicit (and obvious to the average programmer), take two points  
into consideration: humans are prone to error and we don't like to  
re-invent the wheel. Many times we will write small, precise,  
generalized functions that can be easily recycled. Imagine working  
with a group of coders who have built function on top of function on  
top of function. A simple miscommunication or misinterpretation can  
easily yield such illogical conversions. I think it all comes down to  
the amount of safety you need in your system. Obviously any language  
can ultimately accomplish the same tasks. When deciding on a language,  
paradigm, typing rules; it's a matter of subscribing to a model which  
fits the task... A set of doctrines and conventions which will help  
you get closest to reaching your goals.

On the other hand, Peter, I feel like Rich's whole argument was saying  
that you shouldn't be comparing apples and oranges if knowing the  
fruit type doesn't add any info to your program. I feel that one of  
the main points Rich Hickey was making is that maps should be used in  
situations where making further distinctions between data doesn't add  
any additional utility to the program. Take this Hickey quote, for  
example, "Making relation(s) non-special is the key to making the  
logic system readily useful to those who weren't thinking about  
designing specifically for it." Classes built on classes just add more  
layers of abstraction and make it harder to build universal functions  
to handle the data structures.

Sincerely,
- Michael E. Karpeles

Quoting Jacob Beauregard <[log in to unmask]>:

> I'd actually be less concerned about what a programming language
> prevents me from doing than what a programming language helps me do.
>
> The problem of poorly-written code is still problematic, but would still
> happen in any language you can name.
>
> In any case, when you write a program, you're essentially solving a
> problem, and pretty much all problems follow this structure in some
> sense:
> Combine(Existing assumptions) -> Derived assumptions
>
> You'll run into problems if your existing assumptions are:
> 1. Incorrect
> 2. Lacking
> 3. Not inferred
> 4. Disorganized
>
> For instance, the scientific method is a formalization of this used to
> validate assumptions.
>
> Actually writing down the program should be an expression of your
> assumptions and organization, and the same rules apply, except in the
> context of the programming language. The two most common things you'll
> have problems with in poorly written code are your own inability to
> infer something that the other person did, and disorganization. They
> kind of feed on each other in a sense. Lack of inference alone generally
> leads to a wtf error. Disorganization alone is hard for someone else to
> interpret. Both of them together are a complete mess. All of those rules
> are pretty much straight-forward, the exception is being disorganized,
> which is more complex because it's metric is a plurality, though you
> could probably nail a lot of them down from lists of usability metrics.
>
> Programming languages, meanwhile, don't regulate per-context lack of
> inference very well. Disorganization is semi-regulated. There are
> structures, however, that provide organizational tools, but their own
> level of organization and higher level of simplicity is the only thing
> that enables their actual application (which is probably an argument for
> high-level programming languages). To be honest, I would think that that
> the best way to go about inferences would be to create tools that help
> express them (take syntax highlighting). Another thing, people go on
> rants about documentation, and when you're working on a problem, your
> existing code and your existing assumptions are usually acting as
> documentation for you. The more formal existence of documentation is
> probably an afterthought for most of us, because the actual code acts as
> informal documentation. Then there's the code can be self-documenting
> part of the argument. Actually, yes, it should be. Programming languages
> provide few formal means to describe organization and inferences, and
> code itself is not self-organizing.
>
> One problem is that you can move a statement independently in code
> around to other lines, but there's nothing to aid us, for instance, in
> knowing contextually in what sequential or organizational context it's
> actually needed, or whether moving it might conflict with another task.
> Sometimes that context even expands.
>
> But yea, this is me just saying, what you're arguing is apples and
> oranges, and you're missing the true underlying issues that affect both
> dynamic and statically typed languages. There is no such thing as a
> language that doesn't make inferences. Take it down to assembly code,
> and you'll still be inferring the functionality of the instructions.
>
> On Thu, 2009-03-19 at 15:28 -0400, Peter C. Chapin wrote:
>> On Sat, 14 Mar 2009, Gary Johnson wrote:
>>
>> >   Just ran across another great essay by Rich Hickey (the designer and
>> >   benevolent dictator of the Clojure language), in which he reminds
>> >   creators of contrib libraries of the wastefulness of adding classes
>> >   and types to a language with pervasive map abstractions.  Check it
>> >   out.  This isn't a Lisp or Clojure specific problem.  The central
>> >   principle at work here is Alan Perlis' off-cited quote:
>> >
>> >   "It is better to have 100 functions operate on one data structure
>> >    than 10 functions on 10 data structures."
>> >
>> >   So dig it, and hack on.
>> >
>> >     
>> http://groups.google.nl/group/clojure/browse_thread/thread/e0823e1caaff3eed
>>
>> There is a counter argument to this. The idea behind strongly typed
>> languages is to allow the programmer to use types to track logically
>> distinct concepts. The programmer specifically does *not* want those
>> concepts mixed arbitrarly. Mixing everything with everything else just
>> creates a big mess.
>>
>> For example (using Ada)
>>
>> -- Introduce two distinct types.
>> type Apple_Count is new Integer;
>> type Orange_Count is new Integer;
>>
>> -- Create appropriate variables.
>> Apple_Basket_Size : Apple_Count;
>> Orange_Basket_Size : Orange_Count;
>>
>> ...
>>
>> -- We are confused.
>> Apple_Basket_Size := Orange_Basket_Size;
>>
>> The last line is a compile time error. Does it really make sense to store
>> a count of oranges in a variable intended to hold a count of apples? It
>> probably doesn't. If it does, an explicit type conversion can be applied:
>>
>> -- After code review, this assignment deemed safe...
>> Apple_Basket_Size := Apple_Count(Orange_Basket_Size);
>>
>> In languages that allow anything to be done to anything, logic errors like
>> the one above are detected (if they are caught at all) only during
>> testing. There is a time and place for such languages, but they definitely
>> have their disadvantages.
>>
>> So to bring this back to the original posting... treating all classes
>> uniformally as maps has a certain elegance, but I wonder how many nasty
>> bugs it hides.
>>
>> Peter
>



-- 
UVM ACM Chapter
CSSA Vice President
CSSA Secretary
www.uvm.edu/~mkarpele

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

July 2020
April 2020
March 2020
February 2020
July 2019
March 2019
September 2018
June 2018
August 2017
July 2017
June 2017
October 2016
September 2016
August 2016
July 2016
June 2016
April 2016
October 2012
August 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
May 2007
April 2007
March 2007
February 2007
January 2007
November 2006
October 2006
September 2006
June 2006
May 2006
April 2006
March 2006
January 2006
December 2005
November 2005
October 2005
September 2005
July 2005
May 2005
April 2005
March 2005
February 2005
January 2005
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
December 2002
November 2002
October 2002
September 2002
August 2002
May 2002
April 2002
February 2002
January 2002
December 2001
November 2001
October 2001
September 2001
July 2001
May 2001
April 2001
March 2001
February 2001
January 2001
December 2000
November 2000
October 2000
September 2000
August 2000
June 2000
May 2000
April 2000
February 2000
January 2000
November 1999
October 1999
September 1999
July 1999
April 1999
March 1999
January 1999
November 1998
October 1998
September 1998
August 1998
July 1998
April 1998
March 1998

ATOM RSS1 RSS2



LIST.UVM.EDU

CataList Email List Search Powered by the LISTSERV Email List Manager