3 ms·
Could anyone here give me some insite as to why to use smalltalk? I've been toying with objective C which is about the extent of my experience with anything re
by S_A_P 16y ago
Could anyone here give me some insite as to why to use smalltalk? I've been toying with objective C which is about the extent of my experience with anything remotely like it. This article mentions ease of debugging- what is easy about it? What sort of problems does this language solve eloquently?
- fstephany 16y agoYou don't have distinction between runtime and development time. Which means you can debug live. It's a bit like being logged in an IRB session on your rails application. Except that you have better tools than a plain command line. Ruby feels closer to Smalltalk than Obj-C to me. If you're familiar with Cocoa/Obj-C, you can have a look at http://www.fscript.org/ http://www.fscript.org/
- S_A_P 16y agothanks for this- this looks very helpful indeed.
- jcromartie 16y agoSmalltalk tries to solve the problem of mutable state in a unique way. Where some languages say "mutable state is bad, minimize or isolate state changes," Smalltalk gives you amazing tools for monitoring the state of objects in the system. The level of control at every level of execution is unlike any other language. You can open up live inspectors on any object, edit a method in the debugger and restart the stack frame you are looking at, and persist all of it across programming sessions in the image.
- cwp 16y agoHere's a short description of the debugging process for web apps written in Seaside: http://news.ycombinator.com/item?id=1887874 http://news.ycombinator.com/item?id=1887874 For me the key thing about Smalltalk is that its handling of abstraction scales well. On one hand, it's a modern, garbage collected, dynamic language in the same vein as Ruby, Python or Javascript. On the other, it give the programmer a lot more low-level control than any of those languages. For example, Seaside makes heavy use of continuations. In most languages, you're at the mercy of the language designer as to whether continuations are supported: Ruby has them, but Python and Javascript don't. Smalltalk hasn't traditionally supported continuations, but it provides low-level control of the stack, and Seaside implements continuations as part of the framework. Here's another, less exotic, example. Smalltalk provides GC-safe ways of manipulating raw chunks of memory, which other dynamic languages tend not to do. A couple of years ago, I needed to implement a specialized type of timestamp in Smalltalk. For my application, there would be many timestamps in memory at once, so optimized for memory usage. Internally each instance stored the number of seconds since March 1, 1980 as a 32-bit unsigned integer. More recently, I implemented a timestamp object in Javascript. Without the level of control that Smalltalk allows, I ended up just wrapping Javascript Date objects. I don't know what the internal storage of Date objects looks like, but I bet it's more efficient than anything I could implement in Javascript. You see this kind of thing all over the place in Smalltalk. Here's a comment I wrote a while back on syntax: http://news.ycombinator.com/item?id=1289177 http://news.ycombinator.com/item?id=1289177 It's a bit hard to quantify, but I find this scalability of abstraction to be one of the key things I look for in a programming language. I'm not a Lisp hacker, but my impression is that this is one of the primary virtues of Lisp as well.