Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ Programming ➜ General ➜ Is writing windows applications in C++ a nightmare?

Is writing windows applications in C++ a nightmare?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Rosko   (5 posts)  Bio
Date Sun 09 Sep 2007 03:07 AM (UTC)
Message
Hi all,
I have read over very little in the way of c++ code for the win32 platform.
I do not care for languages where capitalization is used free form so to speak where language features and libraries are concerned.
That is, using a screen reader I can hardly stand the berdin of having to remember that the language I am using uses four different capitalization schemes and sometimes up to another four function naming schemes.
I do not mind the function naming schemes as much as long as I can scan the code for what I am looking for,
and just read character by character to memorize the spelling and capitalization used in the statements that do not at first make sense when being read line by line.
I have no trouble reading code for stock smaug, and I enjoy looking at built in lua functions because they also follow a standard naming convention from what I have seen so far.

So far, I believe that there are enough quality languages that compile to bytecode that there is no reason to write anything in C++ for windows aside from high end graphical games and other performance critical applications.
I want to be able to tell microsoft to go shove it, I remember reading that they sometimes call developers pawns,
and they certainly do not seem concerned about our inalienable rights.
Neutrality is one thing, however everywhere I look I hear about msn and yahoo and google turning over sensative information to governments around the world - seemingly for the sake of handing it out.
Lets not forget microsoft's drm technology and participation in groups such as the TCPA.
I know I have come across a number of media files on websites that appeared unrestricted but were in fact restricted, and with recent trojans exploiting media sites by asking for extra codeqs, it seems buying protected media has more than its share of pitfalls and risks.
I imagine myself learning to write programs in c++ only to have my code broken by a windows update,
I almost believe that I would write a program and then be forced to upgrade to a new compiler from microsoft with much of the windows api closed off to outside developers.
I know this is impractical but never the less needed to voice my concerns anyway.

Now, to get to the point, my main question is this...
Why should anyone take the time to learn windows programming under c++ when its possible to write c++ applications for linux where virtually everything from the OS up is open source?
Also, is it not true that in most instances where the windows api could be used by a C++ application java would be better?
I got to thinking on this subject after realising it may be impossible to write a basic gui application in pure lua such as a dice roler with sounds.
Some blind computer users like a dice roler program, I figured my first application written in lua could be a dice roler and then maybe later I could add rule sets and network functionality for multi player tabletop like rpgs where a givven rule set would be used to automate score keeping among other things.

Thank you all for your time and I look forward to your responses.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Sun 09 Sep 2007 05:26 AM (UTC)
Message
Let me try to answer this question:

"Why should anyone take the time to learn windows programming?"

The answer is very simple: market share.

If you're not interested in selling your code, I would heartily and absolutely recommend Linux. If you are interested in making a business of whatever you program, I would very seriously consider sending you to Windows instead.

Of course, I would also suggest you use a cross-platform library so that you can run on Linux as well, but the point remains that for most commercial purposes Windows is simply where the big market share is.

As for this question:
"Also, is it not true that in most instances where the windows api could be used by a C++ application java would be better?"

There lie dragons and several religious wars. :)
Not to be facetious, but it depends on how you define 'better'. In my personal opinion, I would tend to not do GUI programming in C++ but in Java instead, in part because it's cross-platform but also because the Swing GUI library for Java is very pleasant to work with. (At least compared to Windows GUI programming. I've heard good things about wxWidgets, though. Nick could tell you a lot more: he knows quite a bit more than I do about that.)



Speaking of wxWidgets:
It is by no means impossible to write GUI applications using Lua. Of course, you can't use "pure" Lua, in the sense that you will need to use a library that talks to the Windows API. But, there is a library called wxLua that lets you use wxWidgets functionality in a Lua program. Probably exactly what you're looking for.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Rosko   (5 posts)  Bio
Date Reply #2 on Sun 09 Sep 2007 06:33 AM (UTC)
Message
Wow, thanks.
I do not know much about java but plan to learn it - maybe next after I get the hang of lua.

Speaking of lua, it sure seems like programming in lua is almost too easy in a good way.
There is the saying rather than work harder work smarter - well maybe the hard application development work should be done in a language like c, c++, or java and the front end and glue code done in lua.

This brings me to my next topic I will post about in a few minutes - whether or not it would be worthwhile to add lua hooks to NakedMud just as there are python hooks.

I have had a vision of a mud server with little in the wway of game mechanics worked out but able to be extended in a number of languages - to be speciffic most of the languages mushclient supports excluding windows only languages like vb.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 09 Sep 2007 09:30 PM (UTC)
Message
As David says, if you want cross-platform, try wxWidgets. Also Lua itself is multi-platform.

Combining them, you get wxLua. This lets you design GUI programs in (effectively) Lua.

Lua itself tends to have a standard of all lower-case variable names and function names.

From what I have seen so far, wxWidgets uses capitals, but in a logical way. For example FitToScreen (where the "words" are capitalized, that is, F, T and S in that case).

You could look at Delphi, I believe that is not case-sensitive.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


19,402 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.