Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
the standard constructs are just so awfully planned out
I have a place in my heart for QBasic, as ugly as it may be.
GetCurrentAddress: mov eax, [esp] ret
call GetCurrentAddressmov [currentInstruction], eax
call L1: pop currentInstruction
I don't know the first thing about Assembly, so wouldn't call myself an expert, but is it this one?Code: [Select]GetCurrentAddress: mov eax, [esp] ret
Yes, even though it is twice as many instructions and a function call, it's faster.
Atm I'm learning Haskell, it's really nice and clean, no variables to mess with
...is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing.[5] It is named after logician Haskell Curry. In Haskell, "a function is a first-class citizen" of the programming language.[6] As a functional programming language, the primary control construct is the function. The language is rooted in the observations of Haskell Curry and his intellectual descendants
The HCAS Hello World program:main = "Hello World!"Output: \Hello World!"
A reference would help. Hard to find a definitive source.If you want to know more, look here:http://www.haskell.org/haskellwiki/Applications
This isn't to say that C++ is inferior, but the fact is that just because everybody uses it doesn't suddenly make it good. It low-level, and t's being used for tasks in which a low-level language isn't required. And those tasks that it is suited for discard it in favour of C because C++ is far "too heavy." That is, for a low level language, it hides a lot of what it does during compilation. The Speed argument is utterly idiotic because you can write slow code in any language and you can write fast code in any language. What's important is that even a skilled C++ programmer cannot necessary write code faster than a programmer in another language. Many people attribute this to "well that's because those other languages have IDE's and Designers and intellisense, It's not programming! It's like using powerpoint" this was mentioned towards VB4, I believe, in comparison to C++. Well, see, the thing is, when it comes to deliverables, people prefer to pay for something that exists. Deciding between a developer who should have the C++ implementation done "real soon" and a VB developer who already has a working implementation is a no brainer. The company doesn't care that a lot of self-righteous snobs think Visual Basic is "unclean" or "stupid" the fact that the software exists in that case and doesn't in the other is what decides their choice.Myself? I an write windows applications in C using the standard API. You know all that fun stuff like WNDCLASSEX and RegisterClassEx and CreateWindowEx() and of course message pumps. I don't do that because I want to concentrate on what the application is going to do, not which HMENU I should attach a popup I made with CreatePopupMenu(), and trying to remember the difference between CreatePopupMenu() and CreateMenu(). The primary attribute of a good programmer is Sloth, and all the "toy" languages as self-proclaimed programming purists call them add things like libraries and frameworks that help programmers get things done, not spend another week re-architecting their Shell_NotifyIcon() wrapper class. That's why most development in C++ leverages some other library (like BOOST,, ATL, etcetera). or the programmer has to follow a set of guidelines (such as RAII (Resource Allocation Is Initialization)) or something like COM Smart Pointers. these are, strictly speaking, things that should be implemented Once, by the language compiler, and only once. Instead, what we end up with is so many libraries, structures, rules, and guidelines that we lose sight of the forest through the trees. C++ at this point is more about learning your chosen framework, designed to hide the low-level details of your Operating System that you would normally call. And at that point, why are you using C++?