How does the programming language of the HP48GX compare to the Forth programming language? I’ve seen references about the HP’s programming language being OO, and it’s intriguing, but I don’t know how that would work in the rather limited stack-based environment an HP calculator would provide. I like RPN data entry and programming (hence my interest in HP instead of another TI or Casio (I have a TI-83+ and a Casio programmable color graphing calc)), and I have some experience in Forth (I’ve wasted some happy hours in a Forth shell defining words and using them on the stack :)), so I’m not coming into this cold and I want to know what to expect. Sample code would be very welcome.
Here’s a barely useful answer:
I use several Forths, but have never used a 48. But I used an HP 28S extensively, and noticed that it was more Forth-like than other HPs like the 10, 11, 12, 15 and 16C, the 33E, and others. In particular the 28S had DUP and SWAP, and its treatment of stack lift enable and the way the enter key worked was more consistent with the RPN (or postfix notation as it’s more often called) in Forth. Perhaps the 48 is like this?
But the 28 does not let you define new words. You can’t say : circlearea 2 x^y pi * ; and turn the radius on the stack into an area. If that’s true of the 48 as well, then I’d opine that it’s not Forth like except in the sense that both use postfix notation, and maybe sone functions are named similarly. But in that sense, then, hey, most other calculators are Fortran-like and Basic-like and C-like and, well, you get the idea.
All of the programmable calculators I’ve used have been Basic-based, Basic, in turn, being a dumbed-down FORTRAN meant to keep students from shooting themselves in the foot.
As you can see, I’m no fan of Basic or its mutant clones. I like Forth, however, and I’m looking forward to programming in an RPN language.
Now, how do these caclulators handle object-orientation? Is it like Ruby and Smalltalk, or is it completely different? Hell, having OO and RPN in the same language sounds like having a fridge case mod: Odd, but very, very promising.
Forth is not really OO - it’s called a threaded language. It’s neat because of incremental compilation, successful compilations add immediately to the environment, which you can use like other native elements.
Urban Ranger, I know Forth isn’t OO, but the HP’s language is advertised as being an OO language. I want to know if it really is, and, if it is, how the concept is handled.
Bump.
Dunno. This blurb doesn’t say anything about OO.