Differences between GNU C++ and Microsoft Visual C++ - visual-c++

What are the differences between GNU C++ 4.3 and MSVC++ 10? I am talking about language features and standards compliance.

Here are two pages that might be of help:
Options controlling C++ dialect (GNU C++)
Standards compliance issues in Visual C++ (Microsoft C++)
Search for keyword "standard" in first link, this will show you which options break standards compliance. Second link is fairly self explanatory, but this is the 2003 version. It's possible that more standards (non)compliance has been built in later versions.

Language features are formed by compiler because they are implemented into compiler.
So when you're talking about differences in implementations - you're talking about differences in compilers. There are no differences in implementations without compilers.

I don't think the language features would be awfully different. I mean the language remains the same. The difference would be in the libraries that are available with each implementation. VC++ comes with loads to work on Windows platform and is the preferred choice for it.

Related

Is there any modern compiled language with manual memory management?

Is there any modern (generics, closures, object oriented) language with manual memory management? And with a compiler, either to machine code or to another language like c.
I haven't read of any. All new languages are garbage collected, and most of them interpreted or run in a vm.
EDIT: sorry, I know c++0x now has many new features, but I can't see it as a modern language. It's too ugly and illegible to me. And the way closures are used makes it worse.
By modern I meant something cleaner than c++.
If you use a C++0x version of C++ compiler (like the last gccs) then it does provide all the features you need. The C++03 (current version) does have generics, object orientation, have closures implementation (functors) but not the syntax (that is provided in C++0x, as "lambdas" - available in VS2010, gcc4.5 and other recent versions of compilers) and is all about manual (but easy) memory management (using RAII-the badly named idiom- and smart pointers where necessary).
Don't rely on c++ birth's date : what we call "modern C++" is clearly more easy and powerfull thant the original version of C++. (but it have a very long timing between new versions)
The only other alternative that I can think about is D, that is thought to be a system programming language too, that is similar to C++ in core principles but tries to avoid some of it's "problems" and provide some other features missing in C++.
C++ (Don't laugh)
http://en.wikipedia.org/wiki/C%2B%2B0x
Rust - Not sure if its GC but it looks interesting
https://github.com/graydon/rust/wiki/Language-FAQ
Well, how modern is modern ?
Delphi requires that you manage your Memory, but provides simple and elegant ways to do that, it also has a pluggable architecture for memory management, and compiles to native code.
Delphi is still actively developed, nowadays by Embarcadero but was created originally in 1995 by Borland software, and even then was the successor to Turbo Pascal, so modern might be a subjective term for Delphi as its history is long.
There is an experimental language BitC. It is quite low-level, compiles to a portable C, and have a lot of neat modern features.
A good old Ada also worth mentioning.

Is there any freeware QBASIC compatible IDE for BASIC?

What freeware IDE is available other than Visual Basic?
Is there any freeware QBASIC compatible IDE for BASIC?
"QB64 is a compiler (C++ emitter) with an editor (IDE) that strives for 100% Qbasic and QuickBasic 4.5 compatibility."
http://qb64.net/wiki/index.php?title=About_QB64
I'd recommend looking at FreeBasic and FbEdit. It is largely QuickBasic compatible and FbEdit provides a nice Windows based IDE. There is also QB64, but I'm not aware of any slick IDE's for that one.
Have a look at FreeBASIC. It's an open source compiler and available for Windows, Linux and DOS platforms. Its licenses are GPL and partly LGPL.
On the one hand its syntax is similar to QBasic. For an even better compatibility to legacy QBasic programs it offers a QB compatibility mode, which can be enabled using the command line switch -lang qb (see the compiler dialects page in the wiki) or a preprocessor directive. So you can see it as an unofficial successor of QB.
On the other hand it adds quite a lot of new features to the traditional BASIC world, like for example
OOP (including inheritance),
DirectX based 2D graphics,
support for OpenGL,
pointers,
network / internet programming with WinSock etc.,
bindings for many libraries including curl, BASS, MySQL's C-API, ...
There are a few IDEs available for FreeBASIC. So you're free to choose the one you like most:
FBIde
FBEdit
Firefly Visual Designer for FreeBASIC
Furthermore, Geany as a versatile editor has built-in support for FreeBASIC. Its syntax highlighting also works reasonable for QB source codes.
All the IDEs and editors mentioned in this posting are either free open source software or at least freeware.
There are a number of free Basic compilers out there, but the compatibility with QBasic may be limited:
http://www.thefreecountry.com/compilers/basic.shtml
See also:
http://en.wikipedia.org/wiki/QuickBASIC

Programming languages that compile to native code and have the batteries included

What are the programming languages that compile to native code and which have provided a comprehensive library with them?
Libraries that includes functionality such as Networking, File IO, RegEx, Database, Graphics, Multimedia, Win32 API bindings, File compression, etc.
I'll assume everyone has thought of C and C++.
Haskell is the obvious one here. In particular, if you want batteries included, you want the Haskell Platform.
OCaml fits this category, as well.
Go is a new player that has (most of) the feature you asked.
The D programming language with it's standard library Phobos.
Some Lisp dialects include a native compiler, like Common Lisp with its SBCL, CCL or ECL (to C) compilers.
Rust is a system programming language but doesn't include batteries but has crates ― to avoid stale standard library modules
Delphi meets all those requirements. This is a development environment based on the Object Pascal language.
Is Objective-C with Cocoa/CocoaTouch an acceptable answer?
You can use this pair for programming applications running on devices with restrictive constraints on batteries (laptops and mobile phones).
Swift by Apple, but now Open Source, compiles to native code and is available for OS X and Linux.
Batteries are completely included for Mac OS X and iOS through Apple's extensive libraries/APIs, and support for OS independence is on the way with the development of core libraries.
Hmmm. The funny thing is, most OSes have native APIs for all that stuff. So all you really need is a language that can link in OS calls. Pretty much any compiled language worth its salt will do that.
I am currently working with Qt.
http://doc.trolltech.com/4.5/index.html
Edit: a Nitpick..
A programming 'language' is a grammar and set of semantics and syntax. It contains NONE of the things you are asking about. What you want to know about is API's, not languages.

Is there a high level language with an interpreter, dynamic compiler and static compiler(e.g. like the c++ compiler) along with a multimedia library?

The interpreter and dynamic compiler would be for testing/prototyping and when im done testing i use the static compiler.
Java has all of these - the stock Sun JVM has both an interpreter and dynamic compiler, and the GNU Compiler for Java (GCJ) can statically compile to machine code.
There are many.
One such language is Objective Caml. Let's check it against your requirements:
High-level language: Caml supports functional, object-oriented, and imperative styles of programming.
Interpreter: The ocaml system is a read-evaluate-print loop.
dynamic compiler: On platforms that support dynamic loading, ocamlrun can link dynamically with C shared libraries (DLLs).
static compiler: Available through the -linkall flag in the compiler.
Multimedia: There are libraries for 2-d graphics, 3-d graphics, audio, and video.
The bigger question is finding the best tool for your job. Many languages meet those requirements, but the most used languages have the best documentation and the most tested bindings to libraries. If you're going to use a language like Caml, there should be some overriding benefit to that language that can't be found in other languages.
Good luck!
The best option for you depends on the kind of your application. If it is a real-time program, then just stay with C++ (or ever with C) because no high-level language like Ruby/Perl/Python will beat them in this domain. But if the complexity of your future program is high enough, the best option I see in Python + PyOpenGL (for graphics) +PyOpenAL (for sound) and PyODE (for real-time physics). Actually, Python's VM is fast enough but you can also (with some efforts) compile it into a platform-dependent optimized code.
Alternatively you can use PyGame for 2D graphics and a way comfortable sound/music management.

Ada compilers for Linux

I'm doing a trade study for Ada development on Linux. Do you have any good compiler/OS recommendations?
So far, I've got GNAT from AdaCore running on CentOS 5.4, and I have license requests in for Rational Apex and Aonix ObjectAda.
This is a porting effort. The original codebase is Apex 3.0 on OSF1 4.0d.
Anything else I should be considering? Ideally, it would be a supported environment.
One issue you need to take into consideration is to determine to what degree your system that's being ported utilizes vendor-supplied packages to perform its function. What I've seen with older, large systems, especially Apex ones, is a propensity for the language gurus during its development time to have decided that vanilla Ada just wasn't good enough, and so tie into all these vendor-supplied packages. If that's what your system does right now, it's a strong argument for upgrading within the vendor and sticking with Apex (all other things being mostly equal).
Whenever I've done ports of such systems, if given the opportunity I've done my best to tear out all the vendor-supplied stuff--nine times out of ten replacing the vendor-specific stuff with vanilla Ada implementations worked just as well, and you no longer have to deal with the quirks of a compiler-specific package. Plus, you increase the portability and maintainability of the system, allowing it to better adapt to future changes.
There is always SPARK, but I believe its a specialized/subsetted version of the Ada language. You might want to contact SigAda or the Ada usenet group to see if there are any other ideas.
Honestly though, GNAT is a great tool set. You can use GNATBench, an Eclipse interface, or GPS, a light-weight GTK+ IDE, to interface with the GNAT tools.
Other compilers I am aware of are Green Hills AdaMULTI (for various RTOSes), and DDC-I's SCORE (also for various RTOSes)
Providers of certified compilers that support Linux (in addition to those listed in the question):
Irvine Compiler Corp.
OC Systems
RR Software
Sofcheck

Resources