Tuesday, February 10, 2009

C++ vs AS3

I've been working on an iPhone app for the past week or so and I'm pretty happy to be coding in C++ again I must say. C++ is not perfect by any means, in fact strong binding is a constant thorn in my side after the free and easy ways of Actionscript. Here are a few pros and cons that immediately stood out in moving between the two.

    Pro C++:
  • Variable declaration ("int x" is much better than "var x:int")
  • Enums
  • Templates in general and template meta-programming specifically
  • #defines and conditional compilation
  • Speed of execution

    Pro Actionscript 3:
  • Dynamic typing
  • Static constants of any type
  • Built in associative arrays
  • Built in UTF8 string support
  • Size of compiled code
  • Platform neutrality


In general I prefer C++. Perhaps because it's closer to the hardware and more things are possible, but you really have to know what you are doing to not spin your wheels too much. I *really* miss built in associative arrays and the awesome set of standard objects available in Flash however.

49 comments:

jtg said...

Pointless comparison really.

AS3 pros???...

> # Dynamic typing
AS3 made lots of effort to get away from this.

> # Static constants of any type
Which are simple in c/c++

> # Built in associative arrays
STL has all this and lot more

> # Built in UTF8 string support
Or _only_ UTF8 support.

> # Size of compiled code
Well much bigger if you include the runtime size too.

> # Platform neutrality

The C/C++ language itself is very platform neutral. Its the libraries you make use of that arent always and also the compiler choice.

This is all not to say that there are no AS3 benefits! Quite the opposite. More to point out the bullets you listed are really not accurate.

I would say AS3 benefits...
- way easier to learn and compile
- only have one runtime to consider
- ease to create rich GUI
- web and desktop targetting

(amonst probably others).

Also, you were not using Objective C for iphoine dev then?!

John said...

ITemplatez.com offers professional Professional flash templates, Swish Templates and web design templates

mchl_angls said...

quality WEB DESIGN advertisin :}

Anonymous said...

flex sdk supports conditional compilation

redseadragon said...

Hi, i'm from GameDev.net where I am trying to figure out aproximatly how much faster C++ is then AS3 for the forum http://www.gamedev.net/community/forums/topic.asp?topic_id=552507&whichpage=1&#3552926 . If you could post a comment stating some of your experiances/findings that I could quote there, that would be great!

FreeThemes4all Staff said...

Thank you so much... You can get a Nice Website Templates From Free Website Templates Download and Free Web Templates That gona be helpful!!

Anonymous said...

As3 is the best and i will never think that c++ is better than as3

Alexis Bob said...

A common goal among experienced web developers is to develop and deploy applications that are flexible and easily maintainable. An important consideration in reaching this goal is the separation of business logic from presentation logic. Developers use web template systems (with varying degrees of success) to maintain this separation.

Thanks
Alexis Bob
web design company

Makayla said...

Great, thanks for sharing this! I've heard a lot about it, but haven't tried it yet. Your brief review really convinced me, so I might just try it this weekend.

Nate Ranford said...

Next to C++, what other app would you prefer? Thank you!

Web development Company said...

This is the good news.The information you provide is very useful for me.Thank you for sharing it.I will come to see if you have new post every day.

Twin Cities Web Design said...

How do we check to see if all of things can work out and if the work for the same cases of business.

Minneapolis Internet Marketing said...

Where to find all things like these suggestion and other ways of website.

Faribault Web Design said...

Good ones. I will test to see if that works out for my cases.

zogger said...

Different devices web designers may utilize incorporate stamp up validators and other testing apparatuses for ease of usability and accessibility to guarantee their web sites meet web accessibility guidelines.
www.torontowebdesign.company

get rid of cellulite said...

Advantageously, the article is really the best on this notable topic. I harmonize with your conclusions and will thirstily look forward to your approaching updates
Mindfulness Courses Dublin

Sameer Sharma said...

Does Earth browser iPhone phone 5s?

Regards,
Sameer, CouponDadi, India's No.1 Coupon Website

get rid of cellulite said...

I like your site and content. thanks for sharing the information keep updating, looking forward for more posts. Thanks
aanrechtblad kopen

get rid of cellulite said...

I just read through the entire article of yours and it was quite good. This is a great article thanks for sharing this informative information. Its really good article i fully read this content..
verhuizen gouda

get rid of cellulite said...

I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!
campfire cooking equipment

Accredited GED Online said...

You completed certain reliable points there. I did a search on the subject and found nearly all persons will agree with your blog.

get rid of cellulite said...

This website is too great, make me happy. Website decoration is very elegant, content is very full, continuously outstanding theme, let a person gutty want to continue down at feeling, and I am enjoying it.
granieten tafelbladen

get rid of cellulite said...

Nice information, many thanks to the author. I believe that anyone who wants to know something about this topic will like the post.I really loved reading blog
hardsten keukenblad

get rid of cellulite said...

Attractive info. Thanks, I am really impressed with the quality of what you have provided in your article.
hardstenen keukenwerkblad

get rid of cellulite said...

The pursuit of truth and beauty is a sphere of activity in which we are permitted to remain children all our lives.
bra tape

idar hartono said...

Things are very open and intensely clear explanation of issues. was truly information. Your website is very beneficial.
http://jualjam-tangan.com

fitria maharani said...

Thanks so much for writing all of the excellent information!
http://penjualanjamtanganonline.com
http://grosirjamtanganonline.com

fitria maharani said...

I like the post and i a‭m surprised. the way of ex-planing is very good manner.
http://www.tokojamtanganfashion.com

fitria maharani said...

Thanks a lot for sharing. Will check back later for more of your articles.
http://jam-tanganonline.org
http://grosir-bajuanak.net
http://koleksibatu-akik.blogspot.com

fitria maharani said...

This is very nice one and gives indepth information. thanks for this nice article.
http://www.glenncolton.com
http://www.prettysocial.net

fitria maharani said...

thanks for his articel can menembah my insight on the internet,
http://daftarhargahargamobil.blogspot.com
http://harga-ikanhias.blogspot.com
http://bursamobilkita.blogspot.com
http://daftarhargahargamotor.blogspot.com
http://kolektor-batuakik.blogspot.com

haidir said...

nice blog, I like to read and I It will not hesitate to visit this site again
tas branded murah
l Financialnewss.com
l www.lagingetren.com

KAK DECO said...

Great, thanks for sharing this! I've heard a lot about it, but haven't tried it yet.
Jam Tangan Online Murah Your brief review really convinced me, so I might just try it this weekend.

Candra Gunwanto said...

Things are very open and intensely clear explanation of issues. was truly information. Your website is very beneficial.
http://www.jamtangan-murah.net

cantika said...

Thank you so much..
TAS BRANDED TERBARU
sehatdokter

mila heibica said...

Thank you very much! My friends and family members will be happy after hearing about this
http://goo.gl/gDZHkI

mila heibica said...

Thank you very much! My friends and family members will be happy after hearing about this
http://goo.gl/gDZHkI

mehroz aftab said...

Actually This post is exactly what I am interested. we need some more good information. Please add more good information that would help others in such good way.
badgarnituur

Online High School Diploma said...

Honestly everyone must appreciate your effort I like your blog you made to share the knowledge. The topic here I found was really useful to the topic which I was researching.

High School Diploma Program said...

Valueable post you have shared here keep it up.

cantika said...

I really enjoyed reading that content.
tas wanita branded
sehatdokter
www.tokojammurahonline.com

Early Childhood Music Tutor Sydney said...

The learning lab is providing the best Maths and English tutor in Sydney and if you are looking for maths tutor for your child contact us now!

Coach Hire UK said...

Well, very good post with informative information. I really appreciate the fact that you approach these topics from a stand point of knowledge and information.Coach Hire UK

Nittu Dua said...

Top 3 Packers and Movers in Gurgaon @
http://top3th.co.in/packers-and-movers-gurgaon/
Top 3 Packers and Movers in Delhi @
http://top3th.co.in/packers-and-movers-delhi/
Top 3 Packers and Movers in Noida @
http://top3th.co.in/packers-and-movers-noida/
Top 3 Packers and Movers in Ghaziabad @
http://top3th.co.in/packers-and-movers-ghaziabad/
Top 3 Packers and Movers in Faridabad @
http://top3th.co.in/packers-and-movers-faridabad/
Top 3 Packers and Movers in Pune @
http://top3th.co.in/packers-and-movers-pune/
Top 3 Packers and Movers in Mumbai @
http://top3th.co.in/packers-and-movers-mumbai/
Top 3 Packers and Movers in Thane @
http://top3th.co.in/packers-and-movers-thane/
Top 3 Packers and Movers in Navi Mumbai @
http://top3th.co.in/packers-and-movers-navi-mumbai/
Top 3 Packers and Movers in Hyderabad @
http://top3th.co.in/packers-and-movers-hyderabad/
Top 3 Packers and Movers in Bangalore @
http://top3th.co.in/packers-and-movers-bangalore/
Top 3 Packers and Movers in Chennai @
http://top3th.co.in/packers-and-movers-chennai/
http://top3th.co.in/

Nittu Dua said...

We have settled ourselves as one of the trustable moving companies in Ghaziabad and Faridabad and handle all the moving and packing requisites across the region. Our strong network of movers and packers in India assist us to reach you anywhere in India and relocate you from your existing place to the desired destination.
Packers and Movers Faridabad
Packers and Movers Delhi
Packers and Movers Ghaziabad
Packers and Movers Noida

josi josisonali said...

Exoprt Packers and Movers in India are known to provide moving & packing services at the rates that actually fit in make you local shifting solutions experts for amazing only.
Packers and Movers in Bangalore
Packers and Movers in Hyderabad
Packers and Movers in Chennai
Packers and Movers in Mumbai
Packers and Movers in Pune

josi josisonali said...

How did you can avail the experts services of listed Adword India's No 1 companies?
Thanks for information visit: http://www.adword.co.in/

Pinky Gupta said...

Thank you very much for sharing this article:

packers and movers in pune @ http://www.5th.co.in/packers-and-movers-pune/
packers and movers in bangalore @ http://www.5th.co.in/packers-and-movers-bangalore/

Pinky Gupta said...

Thank you very much for sharing this article:

packers and movers in gurgaon @ http://www.5th.co.in/packers-and-movers-gurgaon/

packers and movers in noida @ http://www.5th.co.in/packers-and-movers-noida/