6 ms·
Maybe a whole book is overkill. When I'm checking out a new language I like to see a couple of short, accessible examples to get a feel for the language. Like
by Y_Y 9y ago
Maybe a whole book is overkill. When I'm checking out a new language I like to see a couple of short, accessible examples to get a feel for the language.
Like this clock[0]:
Time now asValueHolder in: [ :clock |
[ [
1 second asDelay wait.
clock value: Time now ] repeat ] fork.
clock inspect ]
[0] https://medium.com/concerning-pharo/elegant-pharo-code-bb590f0856d0 https://medium.com/concerning-pharo/elegant-pharo-code-bb590...
- SomeHacker44 9y agoI have found that O'Reilly's "Nutshell" books tell me everything I need to know when learning most new languages, and then some. For some languages, though, they have features that might make this sort of overview challenging if you do not understand the core paradigms (such as Rust's ownership concepts).
- IshKebab 9y agoNot really: https://rustbyexample.com/ https://rustbyexample.com/ There's no excuse for not having any examples of a programming language on that programming language's home page. Here are some languages that do it right: https://ceylon-lang.org/ https://ceylon-lang.org/ https://www.dartlang.org/ https://www.dartlang.org/ https://golang.org/ https://golang.org/ https://www.rust-lang.org/en-US/ https://www.rust-lang.org/en-US/ Notice there at least one example (often executable!) on the home page of each site. I'm actually pleasantly surprised how well all those sites do. Most smaller programming languages get this bit horribly wrong.
- igouy 9y ago> There's no excuse for not having any examples of a programming language… https://pharo.org/ https://pharo.org/ I see examples on their home page.
- tom_mellior 9y agoThere is an image showing many IDE windows, one of which does actually show code you would find if you already knew what the code you were looking for looked like. You could still not copy and paste it. Then there is a textual example consisting of two lines of Posix shell, embedded in which is indeed a tiny Pharo program in a string. The parent's point mostly stands. (Oh, and there is a frickin' popup for a frickin' email newsletter hiding the content.)
- igouy 9y ago> You could still not copy and paste it. Why would you copy and paste code before you'd done anything more than glance at a language home page? Perhaps the better comparison is with some other languge IDE: https://www.jetbrains.com/go/ https://www.jetbrains.com/go/
- IshKebab 9y agoYeah maybe if Pharo was just a Smalltalk IDE, but apparently it is a distinct language.
- igouy 9y agoMore like a distinct Smalltalk language implementation. For decades, different Smalltalk language implementations have introduced novel things while still being recognizably implementations of Smalltalk. I haven't been able to find a clear statement of language differences between Pharo and other Smalltalks. The closest thing I've come across is this statement of intent: "We want to stress the fact that Pharo will certainly derive from ANSI and other Smalltalks. We will not change for the sake of change. What we want to say is that if there is something that can be improved but does not conform the ANSI Smalltalk, we will do it anyway." Perhaps a Pharo expert can clarify?
- ben-coman 9y agoI came to Pharo after the fork from Squeak. What I have picked up is that prior to the fork, there was significant tension between those that wanted to maintain backward compatibility and those that wanted to move the language forward. The latter group forked Pharo and that statement was Pharo seems to have be a response to their previous repression. In practice it hasn't yet diverged greatly. However one novel thing Pharo has added is Slots... http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.653.8981&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.653...