Why not C++?

25 replies [Last post]
j3no
User offline. Last seen 16 years 31 weeks ago. Offline
Joined: 2007-08-22
Posts: 1
Hi all, I would help this project becouse is really beautifull, but I programming in C/C++, why don't you use C++ like other project? Bye j3no
unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 1 week ago. Offline
Joined: 2006-11-27
Posts: 576
[quote=j3no]Hi all, I would help this project becouse is really beautifull, but I programming in C/C++, why don't you use C++ like other project?[/quote] Frontend is written in C++. The engine is in Pascal. Why not? Smile There are so many programming languages!..
Fabioamd87
Fabioamd87's picture
User offline. Last seen 14 years 39 weeks ago. Offline
Joined: 2007-04-29
Posts: 121
why pascal?
unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 1 week ago. Offline
Joined: 2006-11-27
Posts: 576
[quote=Fabioamd87]why pascal?[/quote] Why not? At the moment of starting project, it was the language, that I knew the best. So I preferred to use it. Frontend is in C++ because of Qt, very good crossplatform GUI framework. If there was one for Pascal, frontend could be in Pascal too.
Fabioamd87
Fabioamd87's picture
User offline. Last seen 14 years 39 weeks ago. Offline
Joined: 2007-04-29
Posts: 121
buy pascal, should be and old language, is powerful for making this game?
unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 1 week ago. Offline
Joined: 2006-11-27
Posts: 576
[quote=Fabioamd87]buy pascal, should be and old language, is powerful for making this game?[/quote] C isn't so very new too Smile Pascal is quite powerful, it has many advantages. It's compilation speed doesn't make you waste time waiting for fresh binary. Operator overloading helped to improve readability of sources. FreePascal compiler has high optimization level, thus providing near zero penalty against using C or C++. Again, I know this programming language best of all others, so it is my preference. Disadvantage of using Pascal is it's unpopularity, and because of it I had to write SDL_* bindings myself.
Fabioamd87
Fabioamd87's picture
User offline. Last seen 14 years 39 weeks ago. Offline
Joined: 2007-04-29
Posts: 121
i know, but i don't know so mutch about this things... but python?
unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 1 week ago. Offline
Joined: 2006-11-27
Posts: 576
[quote=Fabioamd87]i know, but i don't know so mutch about this things... but python?[/quote] I don't know python Smile May be it could fit our needs, but the engine is in pascal already, and it cost me almost 3 years of development.
Fabioamd87
Fabioamd87's picture
User offline. Last seen 14 years 39 weeks ago. Offline
Joined: 2007-04-29
Posts: 121
i think that the engine is really good, but now we should make some improvement to the game impact, and publicize better this game, for example making easy .deb package for debian/ubuntu
Displacer
User offline. Last seen 14 years 8 weeks ago. Offline
Joined: 2006-11-27
Posts: 29
We have debian package already and Debian maintainer.
Displacer
User offline. Last seen 14 years 8 weeks ago. Offline
Joined: 2006-11-27
Posts: 29
About c++ - if you have enough patience and will, you are welcome to rewrite engine to c++ or even pure C. But if you are really to do such a manpower consuming thing, if i were you ill probably consult unC0Rr first to prevent mismatches and misunderstandings.
WhyNotPascal
User offline. Last seen 14 years 47 weeks ago. Offline
Joined: 2009-04-29
Posts: 1
[quote=unC0Rr] [quote=Fabioamd87]why pascal?[/quote] Why not? At the moment of starting project, it was the language, that I knew the best. So I preferred to use it. Frontend is in C++ because of Qt, very good crossplatform GUI framework. If there was one for Pascal, frontend could be in Pascal too. [/quote] The main reason "why not" is simple--the big advantage of an open source project is ability of the community to contribute ideas and code to the project. Using Pascal largely prohibits this. I program for a living, and do not know anyone who is proficient in Pascal (am also 30 years young). Now, learning a new language is usually just a matter of grokking a different syntax and control flow...but as I get older, that becomes a less desirable thing to do Smile Anyway, I created an account simply to suggest that this could really be a neat project, but my motivation (and I suspect others) with an open source game such as this is to be able to fiddle with the engine AND play the game. The activation barrier to doing so is prohibitively large when it is written in Pascal. I suppose the activation barrier to rewriting it in anything other than Pascal is larger...so consider my commentary food for future thoughts, I guess.
unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 1 week ago. Offline
Joined: 2006-11-27
Posts: 576
Actually I didn't ever want a contributors to engine. Period.
nemo
nemo's picture
User offline. Last seen 16 hours 53 min ago. Offline
Joined: 2009-01-28
Posts: 1861
[quote=unC0Rr] Actually I didn't ever want a contributors to engine. Period. [/quote] Um. Well. Too bad. I'm changing it anyway. :-p
-- Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
alex12
User offline. Last seen 5 years 42 weeks ago. Offline
Joined: 2009-02-24
Posts: 115
[quote=nemo] [quote=unC0Rr] Actually I didn't ever want a contributors to engine. Period. [/quote] Um. Well. Too bad. I'm changing it anyway. :-p [/quote] Is the language changing to C++ Smile or will it stay Pascal Sad Smiley ?
nemo
nemo's picture
User offline. Last seen 16 hours 53 min ago. Offline
Joined: 2009-01-28
Posts: 1861
I can't think of any reason to convert engine to C++. If, god knows why, anyone wanted to do a language port, C would make more sense. Certainly I'll never volunteer for busy work. My comment above was just joking about changing the engine. Clearly unC0Rr accepts changes to it, whatever his antipathy might be.
-- Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
dcu
User offline. Last seen 6 years 26 weeks ago. Offline
Joined: 2009-04-14
Posts: 8
I don't know pascal, but I have been looking at the code and it seems quite readable to me. +1 for Pascal, +1 for Qt.
Sauer2
User offline. Last seen 13 years 51 weeks ago. Offline
Joined: 2008-11-30
Posts: 53
I wondered first, too. But i can understand using Pascal (also Objectpascal), because it's better to read (that and uncorrs skill are the reason, that there aren't many bugs) and actual implementations of it (Freepascal/Gnupascal) don't have the disadvantages of the origin pascal. Melon Speaking of other languages: C++ should get the C++09 specification done, for progress sake. Actual C(99) is even more mature, i heard. If you like scripting, Lua could be interesting (You can really learn this fast!!, but not really OO), but Python should work, too. Also, there are more people, who can write pascal than you could think. Delphi (more or less an Objectpascal dialect) is used in the industry and also in many schools, you first learn pascal.
lolor1
lolor1's picture
User offline. Last seen 13 years 10 weeks ago. Offline
Joined: 2008-12-19
Posts: 31
Sorry if this is changing the subject but, which compiler do you guys use, all the free ones out there are made for win 95 and look like old DOS compilers. I want to learn Pascal and maybe even help one of these days, but I don't know where to get started. BTW at our school we learn VB and me and my friend are finding it way to easy and the teacher gives us separate task. Maybe pascal could be useful? I am an amateur/teenage/beginner/noob/doesn't know what to do programmer lolor1
No keyboard found! Press any key to continue...
rbaleksandar
rbaleksandar's picture
User offline. Last seen 9 years 29 weeks ago. Offline
Joined: 2009-01-09
Posts: 685
[quote=lolor1] Sorry if this is changing the subject but, which compiler do you guys use, all the free ones out there are made for win 95 and look like old DOS compilers. [/quote] As far as I remember it was FreePascal. Smile I didn't quite get the thing whit the cool retro look. Smile The FreePascal looks - I think - modern enough to satisfy your modern-look-needs. Big Grin [quote=lolor1] BTW at our school we learn VB and me and my friend are finding it way to easy and the teacher gives us separate task. Maybe pascal could be useful? [/quote] This I really can't understand. You find VB too easy and you're looking for something hardcore. Try writing something more advanced with Assembly. Wink Smiley Nevermind, don't know what you mean with "difficult" and "easy". PS: You might also want to try some non-M$ stuff like C. Smile
[b][color=#FF0000]HTML[/color][/b] = [color=#FF0000][b]H[/b][/color]ow [color=#FF0000][b]T[/b][/color]o [color=#FF0000][b]M[/b][/color]eet the [color=#FF0000][b]L[/b][/color]adies Here is my [url=http://www.hedgewars.org/node/1691]Unofficial Manual[/url] for HW. Hope you like it. Wink Smiley Still working on it. Don't worry. Will get it finished...Sometime in the future. Big Grin
lolor1
lolor1's picture
User offline. Last seen 13 years 10 weeks ago. Offline
Joined: 2008-12-19
Posts: 31
Thanks, I meant that Visual Basic is way to simple and restricted in terms of expandability, online resources and speed as compared to C/C++ for example. I was just thinking that we might be able to get our teacher to use Pascal when the course is run again as a more powerful language maybe. I just don't know much about the language. Thanks heaps. Lolor1
No keyboard found! Press any key to continue...
nemo
nemo's picture
User offline. Last seen 16 hours 53 min ago. Offline
Joined: 2009-01-28
Posts: 1861
IMO, depending on your goals, for a first programming language I'd probably use Java, C or Javascript. Javascript is a dynamically typed, interpreted language available anywhere, that has plenty of real world use. Java is an OOP, OSS language with lots of real world use. And of course C needs no introduction... But I should still say, plenty of real world use Smile
-- Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
Smaxx
Smaxx's picture
User offline. Last seen 12 years 46 weeks ago. Offline
Joined: 2009-04-29
Posts: 391
Visual Basic restricted? Wouldn't call it so unless you're stuck with VB5. Wink Smiley As a start - Pascal, Visual Basic (6 or .net), maybe C#. C is possible as well but I'd say it will take you longer to get something working (other than console apps).
rbaleksandar
rbaleksandar's picture
User offline. Last seen 9 years 29 weeks ago. Offline
Joined: 2009-01-09
Posts: 685
Well, about C I agree. I use it on a hardware level along with assembler, that is - microcontrollers. VB isn't restricted. Don't know who told you this. C++ is a good choice and you might also want to try Qt along with it (Qt is used in HW along with FreePascal). PS: I say why not move this topic to the "Off Topic"-section. Half of the comments (after unC0Rr's) are simply a discussion about what program langauge should we choose to learn etc. etc.
[b][color=#FF0000]HTML[/color][/b] = [color=#FF0000][b]H[/b][/color]ow [color=#FF0000][b]T[/b][/color]o [color=#FF0000][b]M[/b][/color]eet the [color=#FF0000][b]L[/b][/color]adies Here is my [url=http://www.hedgewars.org/node/1691]Unofficial Manual[/url] for HW. Hope you like it. Wink Smiley Still working on it. Don't worry. Will get it finished...Sometime in the future. Big Grin
jerobarraco
User offline. Last seen 8 years 27 weeks ago. Offline
Joined: 2015-09-16
Posts: 2
I just registered to comment on this thread. I just want to add. 1) This job is awesome, good work man. 2) The network effect is not a reason to decide what to use. Just because "there are more people using it" doesn't mean is the right tool for all the jobs. is a cool add-on yes. but i wouldn't decide only over that. That is actually a know congitive bias. https://en.wikipedia.org/wiki/Network_effect https://en.wikipedia.org/wiki/Bandwagon_effect https://en.wikipedia.org/wiki/Groupthink https://en.wikipedia.org/wiki/Herd_behavior And IMNSHO i think that deciding on the "popularity" of a tool is actually being lazy and not taking the time to research the options, and that's actually the definition of "follow the masses" (though you gotta be careful sometimes the M is silent). One possible misconception is that C is a "well know" language, but there are many other programmers that knows how to code in pascal, don't underestimate them, they would also want to contribute in a project. In argentina (ie) pascal is a popular language, and i believe in Brazil too. there's also a thing called the law of offer and demand. And i actually think that in pascal could be a better ratio, because there are less people (let's imagine that), but there are less projects in proportion to those ppl. That in turn will make this few people more eager to contribute. Let me put an example, you have in pascal 100 ppl, and 10 projects. you have 10 people/project ratio. In c++ you have 1000 ppl, but 500 projects, you have 2 people/project ratio. I made OS projects in many languages, and the fact that there are more people using a language doesn't actually mean that those ppl are wanting or able to contribute to your language. I've learnt this the hard way. I'd proven that by publishing the same game on Android and BlackBerry, i got so many more downloads on BB than Android, just because the market of the prior is saturated. The other missconception is that pascal is not opensource, you have FreePascal (i've been using it for a while) and it runs, compile and has an ide for many platforms (including lin, win, mac, some pdas). FP is opensource and it has an important community. Oh and btw, it can use Qt http://wiki.freepascal.org/Qt_Interface/es If the author feels confortable using pascal, that's a big reason to start, a port could be done any day. I made projects in many languages, that's not a downside, and the fact that this guy expands what is KNOWN to be able to do in pascal, that's of great value by itself. And i put KNOWN in mayus because it seems to be a missconcetion that the lack of popularity of Pascal is directly correlated to the power of it, which once again is a cognitive bias. I've worked with Pascal for some time and is actually very powerful. As a language i think is as powerful as C or C++, it only lacks some libraries. I've made code that interfaces with assembly, code that calls windows api or other dlls, and even made a filesystem for a basic operative system with it (that booted from a floppy disk (oh the old times)). There's even a linux kernel made with Pascal. Then, the paradigm of C and Pascal are not very different. I've been programming c++ for many years, and i also know Pascal, and i think with some little time i can be equally proficient at both. If you think about it, this is an opportunity to expand your knowledge and don't stay with only one language. And at last, i know first hand the problems of coding in c++, and also the problems of learning it (because i work teaching c++), and i can tell you, that by choosing c++ over other very high level language (like python) you are also cutting down the possible people that can contribute to your project and that can actually make a REASONABLE IMPACT on it. Because c++ is not easy to learn, understand and or to master. And if a person becomes proficient in c++ is actually very possible that they're already bussy with a job. So at the end, C++ doesn't have a very higher benefit than pascal, it's actually almost the same. So, at the end, i think that if the author feels like doing it in pascal, that's awesome. I've seen ppl making games in python, ruby, c, html (html, seriously), basic, asm, so, i think the first answer is the best one. "why not?"
jerobarraco
User offline. Last seen 8 years 27 weeks ago. Offline
Joined: 2015-09-16
Posts: 2
2009? oh well, dates, who uses them anyway?
Copyright © 2004-2023 Hedgewars Project. All rights reserved. [ contact ]