Page 1 of 1

Arranging code classes and scripts

Posted: Wed Nov 20, 2013 8:52 pm
by Pixel_Outlaw
I come from an OOP background in C++ so naturally I have some preconceptions of how code is to be organized across multiple files.

How is this usually done in Lisp?
Do I have each Class or struct in a single file?
How many functions in a file before i need to break it in to two?

Most people don't want to work with giant monolithic files when programming.
What are the rules of thumb for splitting a project across multiple files?

Re: Arranging code classes and scripts

Posted: Thu Nov 21, 2013 2:19 am
by Goheeca
I do it a module per a file so in a file there are classes, structs which logically belong to each other.

Re: Arranging code classes and scripts

Posted: Thu Nov 21, 2013 1:31 pm
by marcoxa
You can do whatever you want as long as it makes sense (TM) YMMV, etc etc.

Having said that, I came to like the one-class one-file organization of Java. Alas, with multimethods and generic functions there isn't a natural breakdown like that in CL.

Cheers
--
MA