Hacker News new | ask | show | jobs
by igouy 1473 days ago
"6.18 Saving code in a file" Pharo 9 by Example, page 75

https://books.google.com/books?id=hfpwEAAAQBAJ&lpg=PA75&ots=...

> In Smalltalk there is no such thing as source files...

    $ cat fact.st
    Stdio stdout 
        nextPutAll: 100 factorial printString; 
        nextPut: Character lf.!
    SmalltalkImage current snapshot: false andQuit: true!

    $ bin/pharo --headless Pharo10-SNAPSHOT-64bit-502addc.image fact.st
    93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
1 comments

I was obviously simplifying it for my explanation as I didn't want to write a story. Yes you can file-out and file-in but thats not the primary mode of operation when working with the IDE.
Look where that wrong explanation leads —

"#1 it's a burden of knowledge to shift from the Unix filesystem to the Smalltalk runtime. There... are no files."

https://news.ycombinator.com/item?id=31474424

"Pharo by Example" doesn't need a wrong explanation —

"It may seem like the image file should be the key mechanism for storing and managing software projects, but in practice that is not the case at all. There are much better tools for managing code and sharing software that is developed in a team. Images are useful, but you should be very cavalier about creating and throwing away images."

"2.5 Saving, quitting and restarting a Pharo session" Pharo 9 by Example, page 14

https://books.google.com/books?id=hfpwEAAAQBAJ&lpg=PA75&dq=p...