Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Scheme for programmers book
Jens Axel Søgaard wrote:
> Michael Erdmann wrote:
> 
>
>
> Breaking things up in manageable modules is the thing to do.
> 
>
>
> A test suite that exercises all the code is the way to go.

This is a statement i can live with, extensive testing is requiered. But
my statement on top is, even more testing is required in the real
runtime environment.


>
> Allow a little side remark: Even in a statically typed language a
> test suite is needed. Suppose the function foo is changed from
> expecting a vector of any length to a expecting a vector of length
> two or more - how is the type checker supposed to catch that?

This is true, everthing which changes a data type during execution
can't be catched by the compiler. In Ada you will get a contrain
exception you can catch. What happens in scheme. I have the impression
that you get some unspecified exception with scheme.



> A small example from <http://okmij.org/ftp/Scheme/assert.txt>:
>
>  (let ((n (begin (display "Enter a positive integer:")
>           (newline) (read))))
>     (assert (integer? n) (> n 0)
>             report: "Domain error" n
>             "You should've entered a positive value" #\!)
>     (fact n))
>
This is what i was wondering why there is no support development by
contracts in scheme, since this asert check could be compiled in the
runtime environment controling if function is called at all? 
>
>
> I don't think SoftScheme is ready-to-use in a production environment.
> If someone proves me wrong, I'll be deligthed.
>
Don't ask me about soft_sceme. It neither compiles with bigloo nor
chicken. I will have to spend mutch more time on this issue then
i have expected.
 
>
>
> Chicken among others produce executables, so that ought to be
> straight forward.
I guess so, is there any  typical disribution format like rpm's,
but i guess it realy does not matter then.

> 
>
>
> It's hard to give such guide lines. Read some various Scheme programs
> to get a feel of the style. To see some small snippets doing every-day
> stuff try looking at <http://shootout.alioth.debian.org/lang/chicken/>.
> Another source is <http://www.schemecookbook.org>.
>
The reason why i am askising is, that i am used from Ada 95 or C, that
there is a style guide. This also include constructs you should avoid
since they are error prone or to difficult to read with in a short
notice.

> My own experience is that my coding style has changed over the years.
> This ranges from personal idiosyncrasies to more important ones.
>
> Idiosyncracy:     I hardly ever use IF anymore, I always use COND.
> Philosophical:    I code first and worry about portability later.
> Experience:       It took a quite while to learn to recognize the
>                   situations where macros can be big time savers.
>
As you write above, experience, so this for me in the moment a
low priority issue.



Report this thread to moderator Post Follow-up to this message
Old Post
Michael Erdmann
09-29-04 10:00 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Scheme archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:38 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.