Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
148 user(s) are online (96 user(s) are browsing Forums)

Members: 0
Guests: 148

more...

Headlines

 
  Register To Post  

« 1 (2)
Re: Necessary projects: (e.g. WxWidgets)
Just popping in
Just popping in


See User information
@abalaban

Just to close this off topic... :)

C++ is by definition more or equally cryptic than C since it's a superset of C (not always compatible to C, though).

Templates are quite an interesting concept, sure, but their current implementation is really not very good. And on a funnier note, I'm always amazed how long error messages can be when using templates and making a small mistake. I think that there could even be some contest about the longest (and useless) error message about c++ and templates. :)

References can be useful, but take some random code calling a method/function using references without looking at its prototype, you can't easily guess that the passed argument will be modified or not. Passing it by address just makes it clearer that it might be modified.

Go to top
Re: Necessary projects: (e.g. WxWidgets)
Quite a regular
Quite a regular


See User information
@Fab

Ok one point about error messages when using templates (hint in case you want to participate in such contest for the longest, try to use VC++ 6 it is really a mess

An the last one : you *are* supposed to look at function prototype/documentation when you are programming and not peek the first function that comes withou knowing what it does

Back to a quiet home... At last
Go to top
Re: Necessary projects: (e.g. WxWidgets)
Home away from home
Home away from home


See User information
@abalaban

Quote:

abalaban wrote:
@Fab

Ok one point about error messages when using templates (hint in case you want to participate in such contest for the longest, try to use VC++ 6 it is really a mess


VC++ 6 is old and non-standards compliant; it doesn't even do variable scoping correctly. People should upgrade to the latest Visual Studio. Back when I used it, I had to deliberately code things incorrectly in order to get it to compile. When I switched to VC++ 2003 express, I had to go through and fix everything.

One thing with GCC that is a minor annoyance is that you need to set a compiler flag in order to get it to use the latest C standard (which includes C++ style variable scoping rules).

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Necessary projects: (e.g. WxWidgets)
Just can't stay away
Just can't stay away


See User information
@Fab

Quote:

Fab wrote:

C++ is by definition more or equally cryptic than C since it's a superset of C

Sorry, I can't refrain from biting on this one.

If a language gives you more tools to select from for expressing a given algorithm, it will also increase your chances of expressing that algorithm less cryptically, generally speaking of course.

And specifically for C and C++, that's also my personal experience.

You may say that C++ is a more complicated language to learn than C, because it is a superset of C, but once you have learnt it (and use it as intended), the resulting code should have a good chance of being less cryptic than it would have been in C.

Best regards,

Niels
(who, after having used C++ for years, currently finds himself quite content with C#, especially after it got "generics" which makes him miss STL less )

(BTW, C# also has reference parameters, but requires the usage of the keyword ref both with the formal argument and the actual one. I quite like that as a compromise.)

Go to top

  Register To Post
« 1 (2)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project