Pointer arithmetic. Returning multiple values from a method (through pointer variables). Creating objects (actually structs) on the stack instead of on the heap. Manually cleaning up memory*. Communicating directly with the OS and hardware platform.
* my onetime real-time Java project could really have used this. With little strain it ran for a few minutes, then crashed with an OutOfMemoryError because the garbage collection could not run.
Gert Jan Kruizinga wrote:Yes, pointer math (or magic) is what i miss the most.
I used to miss it (in Java), but not anymore... In fact, I am more used to not using it, that I try not to do pointer arithmetic, even when I am working in C / C++.
Nope, I never loved that, even when I was writing PDP-11 assembler code. Note the PDP-11 and later Vax has single hardware instructions to implement the critical construct.
Using null delimited strings has been a huge source of evil bugs over the decades. And of course, it fails totally with non-ASCII data. The world is bigger than just the folks who speak English.
I miss it, although I still do enough embedded work that I don't have to miss it for very long :) What I *really* miss is making dynamic, extensible language implementations in resource-constrained systems a la Piumarta-style stuff, which makes use of pointer arithmetic. Quite enjoyable.
Gert Jan Kruizinga
Greenhorn
Joined: May 09, 2010
Posts: 16
posted
0
Yes Rob Prime, that is what i miss, and it starts getting interesting if *dest points to the i/o space of an device.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32675
4
posted
0
Moving thread as not a "beginning Java" question.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32675
4
posted
0
It's even more fun using FORTH the way I do it where I have to do pointer arithmetic directly on the stack!
If there's one language I truly miss working with, it's Forth, although I may take up Factor again. On an only vaguely-related note, I did get to work with actual PostScript for awhile when working at a high-speed printer manufacturer. In addition to the language, we also had really fast cameras to take pictures of how paper moved through the printer--before then I had never really given such thing any thought: paper physics. Crazy stuff.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32675
4
posted
0
David Newton wrote:Everything is more fun in Forth . . .
Even the segmentation errors when you can't see where they happened.