It says it covers pointers "as they work in C and Pascal". As if they work the same in those languages. Pascal's pointers are much better than C's pointers.
I have programmed machine code in the early days which is important, Because theres no getting away from it then along came C, C++, forth and lisp, Pascal and interpreted basic then came Compiled Basics...
I believe that Pure Basic will be the language of the future...
Sure it needs some work, but its getting there and it can do inline assembly code - I dont think there is any limit to what Pure Basic Can DOOO!
r_hyde wrote:
However, I will say that I prefer the ease of dereferencing using a single operator rather than PB's Peek/Poke functions. There has to be a way to make pointer usage both consistent and simple/wrist-friendly!
Well, one *could* use pointers, but that might be a bit cumbersome now and again (typing typing etc.)
GfaBasic had an interesting approach, instead of the classic Peek / Poke you could do something like:
Word( <memaddress> ) = <value>
I liked that format. Made things readable, but it's definitely not standard PB, I guess
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
By quicker, did you mean quicker to type or faster to execute? Because a simple test shows them to be about equal in terms of run-time.
To execute.
Actually, that was a bit of an 'off the cuff' remark there by myself! I seem to recall Fred saying that dreferencing a pointer was quicker than using Peek and Poke etc.
I may look like a mule, but I'm not a complete ass.
Vin wrote:C and C++ are still the languages of choice for system's applications (inc. OS development) and embedded systems.
Not only that but you can also code in C for any platform you like if GCC or something similar has been ported to it (GameCube's PowerPC Gekko CPU being a good example) ^o^
[quote="Trond]I wouldn't call it the language of "choice" because there's really no other choices if you want to do those things... [/quote]
Exactly! (With the exception of Assembly) I wish there were other choices. C++ can be unnecessarily complex.
I was just listening Scott Meyers (http://www.aristeia.com/publications_frames.html) who is one of the world's foremost experts on C++. It is pretty much the only language he works with and even he states that's it's unnecessarily complex. BTW, I highly recommend his books for whoever is trying to learn it.
Vin wrote:C and C++ are still the languages of choice for system's applications (inc. OS development) and embedded systems.
I wouldn't call it the language of "choice" because there's really no other choices if you want to do those things... :)
Sure there are. Me and some friends (mostly guys if you're curious ^o^) ported GNU Fortran to the Nintendo GameCube way back in 2002 or so.. It wasn't pretty usable but we did get a fully functional SD card manager done to be used in conjuction with an SD Gecko. O_O
Consider these things when labeling a language a systems development language: Can you create a bootable OS with it alone? Can you use it for Emedded Systems? Does it produce fast, small compact code that require minimal RAM and CPU usage? I'm not saying poorly written C++ can't take up all the RAM and CPU usage available but I am talking about ability. For example, C\C++ would be used for developing embedded systems (like a car computer or a cell phone) where RAM and CPU speed is highly limited. I wouldn't label Fortran as being able to fulfill all those needs. This doesn't mean a language can't be used for directly accessing hardware. PureBasic can do this.