Saturday, September 17, 2005

Why Gorm could never be done in C++

I recently had a discussion with a friend of mine whom I work with regarding C++ vs. Objective-C. I told him about GNUstep and also showed him Gorm. I explained the dynamic features of Objective-C and compared it to smalltalk and Java.

When I showed him some images of Gorm from the GS website I told him that Gorm could not be done in C++. He took some offense to this and immediately asked me "May I ask why you believe this couldn't be done?"

I explained that, it's because Gorm uses does several things which depend on the dynamic nature of Objective-C in order to do it's job. Here is a quick summary of the features of Objective-C which Gorm uses:

1) Categories - many categories, these are used in Gorm to do the following things
a) add the name of the inspector class for each type of inspector to the class itself so that it can be looked up easily. Mainly adding the extensions from the IBObjectAdditions.h protocol.
b) Also used for editors inspectors.
2) Loadable bundles - The palettes, which actually make up a large percentage of the code in Gorm are actually loadable bundles. These can be loaded when the application starts or during runtime.
3) Protocols - Many many protocols in Gorm. :)
4) Dynamic binding - As such, per #3, it's important to be able to call objects without knowing thier true class.

So far as I know C++ is incapable of doing #1, and is also incapable of #3 and #4. He went on to explain that it could be done in C++ if the modeller was a "code generator" to which I responded, but mine doesn't generate any code at all. :)

29 comments:

lewissmith9223 said...

Click Here Now Mortgage rates as low as 3.95%
$150,000 mortgage for $494/mo. Other loan amounts available. Up to 4 lenders in 24 hours.
Save money Click Here Now

De Post Man said...

Nice post. I also have a site talking about credit related issues http://mortgage.27days27gurus.com/ . Take a look if you have time. annual credit report.com

Tim said...

It can be done in C++, but not without the help of additional tools. Either you use something like Qt's QObject system, which gives C++ objects some more dynamic capabilities such as a limited support for

introspection, signals/slots and properties. Or alternatively you could also use a library which is able to gather meta-information from binaries and header files. AFAIK the latter has only been done for C, not for C++, though.

Thomas Zander said...

The funniest thing is that all of your needs are already covered by Qt (which is the basis of KDE and is C++).

So, its not only possible, its already being done.

Booradley said...

If something can be "done" in a given computer language, it can be done in ANY computer language. It may be very difficult, but, it can always be done.

Booradley said...

Sorry, one clarification. It can be done in ANY computer language that is 'Turing complete'

id said...

Are you claiming Romanji is English, too? No, C++ can't do it, swallow that. If you still want to call it C++.

id said...

Tim, please educate me, can we send any possible message to any possible object with QT's QObject system at GUI designer level? That is, don't you have to implement signals/slots for every method of QObject subclasses you want to use in the designer? If not, then that's a higher layer over C++, not C++. The same goes for Obj-C as a layer over C.
One thing to remember is, with Gorm you don't even have to recompile the object model, so gathering header files can't compete with Gorm's methods.

Gaining meta-information from the binaries (which I was told that it isn't possible with C++) could be a way to go, but as in my previous comment, I don't know if I should call it C++ and it sounds like a romantic dream to me. Not to mention that GTK's GObject can also do that as well.

For Thomas Zander, please try to understand tim's comment before you made such claims.

Alexander Kellett said...

sad... at least take 2 seconds to google a name before insulting them.

Alicia Bennett said...

Hi, I was surfing the internet and came across your blog. I'm quite impressed , with how it makes such good reading.

This is one to watch.

Many thanks,

how to birding

Carnival said...

Greetings, I was reading some blogs and happened on your blog. I'm quite impressed , with how it has a good feel.

Look forward to reading more.
Regards,

american birding associaiton

fshfghsf said...

看房子,買房子,建商自售,自售,台北新成屋,台北豪宅,新成屋,豪宅,美髮儀器,美髮,儀器,髮型,EMBA,MBA,學位,EMBA,專業認證,認證課程,博士學位,DBA,PHD,在職進修,碩士學位,推廣教育,DBA,進修課程,碩士學位,網路廣告,關鍵字廣告,關鍵字,課程介紹,學分班,文憑,牛樟芝,段木,牛樟菇,日式料理, 台北居酒屋,日本料理,結婚,婚宴場地,推車飲茶,港式點心,尾牙春酒,台北住宿,國內訂房,台北HOTEL,台北婚宴,飯店優惠,台北結婚,場地,住宿,訂房,HOTEL,飯店,造型系列,學位,牛樟芝,腦磷脂,磷脂絲胺酸,SEO,婚宴,捷運,學區,美髮,儀器,髮型,牛樟芝,腦磷脂,磷脂絲胺酸,看房子,買房子,建商自售,自售,房子,捷運,學區,台北新成屋,台北豪宅,新成屋,豪宅,學位,碩士學位,進修,在職進修, 課程,教育,學位,證照,mba,文憑,學分班,網路廣告,關鍵字廣告,關鍵字,SEO,关键词,网络广告,关键词广告,SEO,关键词,网络广告,关键词广告,SEO,台北住宿,國內訂房,台北HOTEL,台北婚宴,飯店優惠,住宿,訂房,HOTEL,飯店,婚宴,台北住宿,國內訂房,台北HOTEL,台北婚宴,飯店優惠,住宿,訂房,HOTEL,飯店,婚宴,台北住宿,國內訂房,台北HOTEL,台北婚宴,飯店優惠,住宿,訂房,HOTEL,飯店,婚宴,結婚,婚宴場地,推車飲茶,港式點心,尾牙春酒,台北結婚,場地,結婚,場地,推車飲茶,港式點心,尾牙春酒,台北結婚,婚宴場地,結婚,婚宴場地,推車飲茶,港式點心,尾牙春酒,台北結婚,場地,居酒屋,燒烤,美髮,儀器,髮型,美髮,儀器,髮型,美髮,儀器,髮型,美髮,儀器,髮型,小套房,小套房,進修,在職進修,留學,證照,MBA,EMBA,留學,MBA,EMBA,留學,進修,在職進修,牛樟芝,段木,牛樟菇,關鍵字排名,網路行銷,关键词排名,网络营销,網路行銷,關鍵字排名,关键词排名,网络营销,PMP,在職專班,研究所在職專班,碩士在職專班,PMP,證照,在職專班,研究所在職專班,碩士在職專班,SEO,廣告,關鍵字,關鍵字排名,網路行銷,網頁設計,網站設計,網站排名,搜尋引擎,網路廣告,SEO,廣告,關鍵字,關鍵字排名,網路行銷,網頁設計,網站設計,網站排名,搜尋引擎,網路廣告,SEO,廣告,關鍵字,關鍵字排名,網路行銷,網頁設計,網站設計,網站排名,搜尋引擎,網路廣告,SEO,廣告,關鍵字,關鍵字排名,網路行銷,網頁設計,網站設計,網站排名,搜尋引擎,網路廣告,EMBA,MBA,PMP
,在職進修,專案管理,出國留學,EMBA,MBA,PMP
,在職進修,專案管理,出國留學,EMBA,MBA,PMP
,在職進修,專案管理,出國留學,婚宴,婚宴,婚宴,婚宴

住宿,民宿,飯宿,旅遊,住宿,民宿,飯宿,旅遊,住宿,民宿,飯宿,旅遊,住宿,民宿,飯宿,旅遊,住宿,民宿,飯宿,旅遊,住宿,民宿,飯宿,旅遊,住宿,民宿,飯宿,旅遊,美容,美髮,整形,造型,美容,美髮,整形,造型,美容,美髮,整形,造型,美容,美髮,整形,造型,美容,美髮,整形,造型,美容,美髮,整形,造型,美容,美髮,整形,造型,設計,室內設計,裝潢,房地產,設計,室內設計,裝潢,房地產,設計,室內設計,裝潢,房地產,設計,室內設計,裝潢,房地產,設計,室內設計,裝潢,房地產,設計,室內設計,裝潢,房地產,設計,室內設計,裝潢,房地產,設計,室內設計,裝潢,房地產,進修,在職進修,MBA,EMBA,進修,在職進修,MBA,EMBA,進修,在職進修,MBA,EMBA,進修,在職進修,MBA,EMBA,進修,在職進修,MBA,EMBA,進修,在職進修,MBA,EMBA,進修,在職進修,MBA,EMBA,住宿,民宿,飯店,旅遊,美容,美髮,整形,造型,設計,室內設計,裝潢,房地產,進修,在職進修,MBA,EMBA,羅志祥,周杰倫,五月天,蔡依林,林志玲,羅志祥,周杰倫,五月天,蔡依林,林志玲,羅志祥,周杰倫,五月天,蔡依林,羅志祥,周杰倫,五月天,蔡依林

J&D said...

A片下載|成人影片下載|免費A片下載|日本A片|情色A片|免費A片|成人影城|成人電影|線上A片|A片免費看

米蘭情趣用品|情趣用品|情趣|飛機杯|自慰套|充氣娃娃|AV女優.按摩棒|跳蛋|潤滑液|角色扮演|情趣內衣|自慰器|穿戴蝴蝶|變頻跳蛋|無線跳蛋|電動按摩棒|情趣按摩棒|

huyuni said...

nike shoes & Puma Shoes Online- tn nike,puma shoes,puma cat, baskets cheap nike shox, air max.cheap nike shox r4 torch, cheap nike air, nike running shoes air max, puma speed and more. Paypal payment.nike running shoes Enjoy your shopping experience on Nike & Puma Shoes Online Store.

huyuni said...

Cheap Brand Jeans ShopMen Jeans - True Religion Jeans, burberry polo shirtsGUCCI Jeans, Levi's Jeans, D&G Jeans, RED MONKEY Jeans, Cheap JeansArmani Jeans, Diesel Jeans, Ed hardy Jeans, Evisu Jeans, Women JeansJack&Jones Jeans...Lacoste Polo Shirts, , Burberry Polo Shirts.wholesale Lacoste polo shirts and cheap polo shirtswith great price. clothingol.com offers lot of 10 lacoste polo shirts and lot of 20 cheap polo shirts. clothingol.com offers classic fit polo shirts. polo clothing

huyuni said...

Charlestoncheap columbia jackets. turned a pair of double plays to do the trick. spyder jacketsThe had at least one runner on in every inning but the first and outhit the RiverDogs by a 12-6 margin Lawal should be a focal point of the Yellow cheap polo shirts along with highly touted newcomer, 6-9 Derrick Favors, rated as the No. 1 power forward on the ESPNU 100. The Yellow Jackets

huyuni said...

quelle chaussures pumapaire de chaussures pour hommes choisir?!? La réponse est toute simple:chaussures nike une paire de baskets en partie vernies. du 17ème au 5ème rang, qui lui offre une place dans un top 5 largement tn requindominé par les sites de vente de produits high-tech. Le site de réservation d'hôtels Bookings.com gagne pour sa part 47 places et atteint le 8ème rang.

goodeda1122 said...

.,.,
自慰套,自慰器,情趣,自慰套,情趣,視訊交友,充氣娃娃,性感丁字褲,AV,按摩棒,電動按摩棒,情趣按摩棒,按摩棒,變頻跳蛋,跳蛋,無線跳蛋,
男女,潤滑液,
SM,情趣內衣,內衣,性感內衣,角色扮演,角色扮演服,吊帶襪,丁字褲,情趣用品,情趣用品,飛機杯,自慰套

酒店上班請找艾葳 said...

艾葳酒店經紀公司提供專業的酒店經紀, 飯局小姐,領檯人員,領台,傳播妹,或者想要到台北酒店林森北路酒店,私人招待所,或者八大行業酒店PT,酒店公關,酒店兼職,想去酒店上班, 日式酒店,制服酒店,ktv酒店,禮服店,整天穿得水水漂漂的禮服酒店,鋼琴酒吧酒店領檯,酒店小姐,公關小姐??,還是想去制服店上班小姐,水水們如果想要擁有打工工作、晚上兼差工作兼差打工假日兼職兼職工作學生兼差兼差打工兼差日領工作晚上兼差工作酒店工作酒店上班酒店打工兼職兼差兼差工作酒店上班等,想了解酒店相關工作特種行業內容,想找打工假日兼職兼差打工、或晚班兼職想擁有快速賺錢又有保障的工作嗎???又可以現領請找專業又有保障的艾葳酒店經紀公司!

艾葳酒店經紀是合法的公司工作環境高雅時尚,無業績壓力,無脫秀無喝酒壓力,高層次會員制客源,工作輕鬆,可日領現領
一般的酒店經紀只會在水水們第一次上班和領薪水時出現而已,對水水們的上班安全一點保障都沒有!艾葳酒店經紀公司的水水們上班時全程媽咪作陪,不需擔心!只提供最優質的酒店打工,酒店上班,酒店打工環境、上班條件給水水們。心動嗎!? 趕快來填寫你的酒店上班履歷表

水水們妳有缺現金、有卡債缺錢卡奴的煩腦嗎?想到日本留學日本打工嗎?妳是工讀生找工作??想要擁有高時薪又輕鬆的夜間兼職工作,打工機會和,假日打工,兼職工作日領假日打工的機會嗎??想實現夢想卻又缺錢沒錢嗎!??整天還在煩腦如何賺錢有什麼賺錢方法,和賺錢最快方法!?,想要打工,日領工作,短期打工,兼差工作,打工兼差工作嗎!?,
請加入我們艾葳酒店經紀公司工作單純輕鬆”高時薪”又可日領徵想要當傳播妹,上班小姐,酒店兼差,酒店兼職,歡迎學生打工,!!!
加入我們實現夢想就從現在開始^__^

Adi said...

Oes Tsetnoc one of the ways in which we can learn seo besides Mengembalikan Jati Diri Bangsa. By participating in the Oes Tsetnoc or Mengembalikan Jati Diri Bangsa we can improve our seo skills. To find more information about Oest Tsetnoc please visit my Oes Tsetnoc pages. And to find more information about Mengembalikan Jati Diri Bangsa please visit my Mengembalikan Jati Diri Bangsa pages. Thank you So much.
Oes Tsetnoc | Semangat Mengembalikan Jati Diri Bangsa

s said...

喇叭網 金屬擴張網Plastic injection Mold developmentInjection Mold Plastic injection molding Injection molding ISO9001認證 射出成形 塑膠製成品塑膠模具設計 模具開發 精密射出 縫衣機塑件Industrial PCB Heavy Copper PCB Microwave PCB Medical PCB 膠框創業 加盟 早餐店加盟 meat processing equipment food processing mixers 化糞池 通馬桶
導光板 衝孔網 菱型網 不鏽鋼 壯陽 成人用品春藥 壯陽藥品 持久 手工水餃 中華湯包 mini usb 催情 增大 模具廠 104法拍網 信義房屋 房屋買賣 台北法拍屋 塑膠射出成型 模具 Odm 塑膠射出模具 Oem代工廠化妝品盒 藥盒

s said...

金價查詢 月子餐 月子中心 坐月子餐 月子餐外送 月子餐食譜 統一發票9 10月 金價 統一發票9 10月 找工作 統一發票7 8月 求職 1111求職人力銀行 104求職人力銀行 104人力銀行 統一發票5 6月 104人力銀行 104求職人力銀行 塑膠袋 統一發票1 2月 金價 黃金價格 金價查詢 黃金買賣 環保袋 肉毒桿菌 黃金 統一發票3 4月 坐月子 sum中古車 1111人力銀行 104求職人力銀行 1111人力銀行求職 黃金價格查詢 中古車買賣 塑膠袋 統一發票9 10月 塑膠袋批發 中古車 中古車買賣消防公司 地板施工 網路廣告 網路行銷

s said...

熱水器 省電熱水器 衛浴設備 節能減碳 電熱水器 中古車 義賣 義賣活動 二手車 環保袋 環保袋 環保袋 十分瀑布 台北旅遊網 月子餐 飛梭雷射 太陽能熱水器 太陽能 三久太陽能 三久 身體檢查 健康檢查 台北民宿 平溪 景觀餐廳 薰衣草花園 花園餐廳 螢火蟲 渡假村 鐵道之旅 團體服 滷味 滷味加盟 滷味批發 滷味食材 滷味宅配 滷雞翅 滷雞腳 健康滷味 魯味 加盟創業 慈善慈善機構 公益彩券

s said...

健康食品 慈善基金會 公益團體 愛心捐款 捐款 美白 皺紋 減肥 禿頭 醫學美容 電波拉皮 雷射溶脂 肉毒桿菌 玻尿酸 痘疤 婦產科診所 室內設計 埋線 內分泌失調 黃體不足 針灸減肥 坐月子中心 婦產科 月子中心 全身健康檢查玫瑰花束 盆栽 網路花店 花店 鍛造 樓梯扶手 欄杆 鐵門 採光罩 清水溝 通水管 通馬桶

s said...

喜餅禮盒 < 塑膠射出 塑膠射出廠 模具設計 Precision Mold加盟創業 冷凍宅配 宅配美食 Light guide panels Plastic Products Mold design 沖孔網
飛梭雷射 柔膚雷射 獸醫師 創業鞋之澡堂 洗鞋子 洗包包加盟彌月禮盒 彌月禮 玻尿酸 皮膚科 皮膚科診所 肉毒桿菌 肉毒桿菌瘦臉 脈衝光 除斑 Flex PCB PCB Electronic PCB

s said...

房屋貸款 剖腹生產 姓名配對 星座 星座運勢 算命 素食料理 素食水餃 開運印章 風水 外遇 徵信 壁癌 屋頂防水 屋頂隔熱 抓漏 油漆 徵信社 外遇 徵信 徵信社 外遇 徵信 徵信社 外遇 徵信 徵信社 外遇 徵信 徵信社 外遇 徵信 徵信社 清潔公司浴室 漏水 舊屋翻新 裝潢 防水工程 壁癌 健康飲食 台北素食餐廳 吃素 團購美食 水餃 素食素食食譜

eda said...

角色扮演|跳蛋|情趣跳蛋|煙火批發|煙火|情趣用品|SM|
按摩棒|電動按摩棒|飛機杯|自慰套|自慰套|情趣內衣|
live119|live119論壇|
潤滑液|內衣|性感內衣|自慰器|
充氣娃娃|AV|情趣|衣蝶|

G點|性感丁字褲|吊帶襪|丁字褲|無線跳蛋|性感睡衣|

Melinda22 said...

This funniest thing is that all of your needs are already covered by Qt (which is the basis of KDE and is C++).get your ex back !venapro reviews

sarah saad said...



الشرق الاوسط من اهم شركات نقل العفش بالدمام متحصصه فى نقل عفش واثاث بالدمام ونقل العفش بالخبر كما انها توفر شركة نقل عفش بالجبيل والخبر وشركة نقل عفش بالقطيف والاحساء وجميع خدمات نقل العفش والاثاث بالمنطقة الشرقية بارخص اسعار نقل عفش بالدمام وتقدم ايضا شركة تخزين عفش بالدمام والخبر
شركة الشرق الاوسط
شركة نقل اثاث بالدمام
شركة نقل اثاث بالخبر
شركة نقل اثاث بالجبيل
شركة نقل عفش بالخبر
شركة نقل عفش بالقطيف
شركة نقل اثاث بالاحساء
شركة نقل عفش الجبيل
شركة نقل عفش بالدمام