Re: D versus Objective C Comparison

2009-02-04 Thread Nick Sabalausky
"John Reimer" wrote in message news:28b70f8c139c58cb5508b9b1b...@news.digitalmars.com... > Hello Bill, > >> On Thu, Feb 5, 2009 at 3:55 AM, Nick Sabalausky wrote: >> >>> "Michel Fortin" wrote in message >>> news:gmbt40$18p...@digitalmars.com... >>> Perhaps it's offtopic in a D forum, but y

Re: D versus Objective C Comparison

2009-02-04 Thread John Reimer
Hello Bill, On Thu, Feb 5, 2009 at 3:55 AM, Nick Sabalausky wrote: "Michel Fortin" wrote in message news:gmbt40$18p...@digitalmars.com... Perhaps it's offtopic in a D forum, but you should use the class NSCharacterSet for that if you want to be efficient. There's a couple of methods in NSS

Re: D versus Objective C Comparison

2009-02-04 Thread Bill Baxter
On Thu, Feb 5, 2009 at 3:55 AM, Nick Sabalausky wrote: > "Michel Fortin" wrote in message > news:gmbt40$18p...@digitalmars.com... >> >> Perhaps it's offtopic in a D forum, but you should use the class >> NSCharacterSet for that if you want to be efficient. There's a couple of >> methods in NSStri

Re: D versus Objective C Comparison

2009-02-04 Thread Nick Sabalausky
"Michel Fortin" wrote in message news:gmbt40$18p...@digitalmars.com... > > Perhaps it's offtopic in a D forum, but you should use the class > NSCharacterSet for that if you want to be efficient. There's a couple of > methods in NSString accepting NSCharacterSet too which you may be > intereste

Re: D versus Objective C Comparison

2009-02-04 Thread Chris R Miller
Sean Kelly wrote: Chris R Miller wrote: = Short Story = I needed to search through a String (NSString) specifically to know whether a character at a specific index is any one of a given set of characters. Rather than subclass NSString, I decided to make a category: > [snip] Won't

Re: D versus Objective C Comparison

2009-02-04 Thread Sean Kelly
Chris R Miller wrote: Jacob Carlborg wrote: Walter Bright wrote: Setting aside the technical issues for the moment, isn't that exactly what inheritance is supposed to be good for? A few times I've had the need for this, I've always been able to solve the problem but it would have been easier

Re: D versus Objective C Comparison

2009-02-04 Thread grauzone
Daniel Keep wrote: grauzone wrote: Nick Sabalausky wrote: [snip] Umm, go into class A and add whatever you need? Maybe I can't, because it's foreign code. Changing it might increase maintenance overhead, require recompilation of libraries, might introduce additional module dependencies, whic

Re: D versus Objective C Comparison

2009-02-04 Thread bearophile
Michel Fortin: > with the extension syntax I proposed for class extensions in > D, you wouldn't have that problem (if implemented correctly) because > the compiler would always know from where the function is comming and > could therfore generate code so that the right function is called even >

Re: D versus Objective C Comparison

2009-02-04 Thread Michel Fortin
On 2009-02-04 01:36:59 -0500, Chris R Miller said: Unfortunately, they aren't in sequential order in the ASCII table, so it's not as simple as determining if char c is numeric: if ( c > '0' && c < '9' ) // c is numeric Therefore, it's useful for searching quickly, without getting into the

Re: D versus Objective C Comparison

2009-02-04 Thread Michel Fortin
On 2009-02-04 04:13:38 -0500, bearophile said: Instead of using a "kitchen-sink" class, in D you can put such functionality into a module, like the string module of Phobos or similar libs. I don't know Object-C, what you have done looks like the "monkey patching" done sometimes in Ruby. Is

Re: D versus Objective C Comparison

2009-02-04 Thread bearophile
Chris R Miller: > As you can see, I added important functionality to the class NSString > without going through all the trouble to make a new class and type cast > between NSString and MyDerivedString all over the place. It's more > transparent, and it's far better than a global function, or pl

Re: D versus Objective C Comparison

2009-02-03 Thread Chris R Miller
Jacob Carlborg wrote: Walter Bright wrote: Setting aside the technical issues for the moment, isn't that exactly what inheritance is supposed to be good for? A few times I've had the need for this, I've always been able to solve the problem but it would have been easier with support for this.

Re: D versus Objective C Comparison

2009-02-03 Thread John Reimer
Hello Nick, "John Reimer" wrote in message news:28b70f8c137be8cb5379a0349...@news.digitalmars.com... Hello Jarrett, On Mon, Feb 2, 2009 at 9:41 AM, John Reimer wrote: Perhaps taking a Linux/BSD kernel and building a software system up from there? How would one go about doing such a thin

Re: D versus Objective C Comparison

2009-02-03 Thread Michel Fortin
On 2009-02-03 02:15:16 -0500, "Nick Sabalausky" said: "Nick Sabalausky" wrote in message news:gm8pul$1ee...@digitalmars.com... I had been slowly coming around to the idea of having that universal function syntax instead of C#-style explicit extension methods, but maybe this need for dynamic d

Re: D versus Objective C Comparison

2009-02-03 Thread Don
Nick Sabalausky wrote: "Michel Fortin" wrote in message news:gm8dhq$sj...@digitalmars.com... On 2009-02-02 21:19:52 -0500, Daniel Keep said: Michel Fortin wrote: [stuff] Wouldn't this be just as well served with Walter's "universal function syntax"; ie: void backup(File this, string bac

Re: D versus Objective C Comparison

2009-02-02 Thread Nick Sabalausky
"John Reimer" wrote in message news:28b70f8c137be8cb5379a0349...@news.digitalmars.com... > Hello Jarrett, > >> On Mon, Feb 2, 2009 at 9:41 AM, John Reimer >> wrote: >> Perhaps taking a Linux/BSD kernel and building a software system up from there? How would one go about doing such a t

Re: D versus Objective C Comparison

2009-02-02 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:gm8pul$1ee...@digitalmars.com... > "Michel Fortin" wrote in message > news:gm8dhq$sj...@digitalmars.com... >> On 2009-02-02 21:19:52 -0500, Daniel Keep >> said: >> >>> >>> >>> Michel Fortin wrote: [stuff] >>> >>> Wouldn't this be just as well serve

Re: D versus Objective C Comparison

2009-02-02 Thread Nick Sabalausky
"Michel Fortin" wrote in message news:gm8dhq$sj...@digitalmars.com... > On 2009-02-02 21:19:52 -0500, Daniel Keep > said: > >> >> >> Michel Fortin wrote: >>> [stuff] >> >> Wouldn't this be just as well served with Walter's "universal function >> syntax"; ie: >> >> void backup(File this, string

Re: D versus Objective C Comparison

2009-02-02 Thread Daniel Keep
Michel Fortin wrote: > On 2009-02-02 21:19:52 -0500, Daniel Keep > said: > >> >> >> Michel Fortin wrote: >>> [stuff] >> >> Wouldn't this be just as well served with Walter's "universal function >> syntax"; ie: >> >> void backup(File this, string backupPath) >> { >> copy(this.path, backupPath

Re: D versus Objective C Comparison

2009-02-02 Thread Michel Fortin
On 2009-02-02 21:19:52 -0500, Daniel Keep said: Michel Fortin wrote: [stuff] Wouldn't this be just as well served with Walter's "universal function syntax"; ie: void backup(File this, string backupPath) { copy(this.path, backupPath ~ "/" ~ this.name); } File someFile; someFile.backup(b

Re: D versus Objective C Comparison

2009-02-02 Thread Daniel Keep
Michel Fortin wrote: > [stuff] Wouldn't this be just as well served with Walter's "universal function syntax"; ie: void backup(File this, string backupPath) { copy(this.path, backupPath ~ "/" ~ this.name); } File someFile; someFile.backup(backupPath); I know Walter was planning on adding th

Re: D versus Objective C Comparison

2009-02-02 Thread John Reimer
Hello Jarrett, On Mon, Feb 2, 2009 at 9:41 AM, John Reimer wrote: Perhaps taking a Linux/BSD kernel and building a software system up from there? How would one go about doing such a thing? I suppose you could use a QEMU interpreter to virtualize the system in the earliest stages until you g

Re: D versus Objective C Comparison

2009-02-02 Thread Michel Fortin
On 2009-02-02 19:12:33 -0500, Christopher Wright said: My impression of Objective-C is that it is a lot more dynamic -- for instance, member functions are accessed via global hashtables, so it's easy to open those hashtables up and add or redirect methods. Indeed.

Re: D versus Objective C Comparison

2009-02-02 Thread Michel Fortin
On 2009-02-01 14:45:58 -0500, Walter Bright said: Setting aside the technical issues for the moment, isn't that exactly what inheritance is supposed to be good for? I'll attempt a better example of something useful with class extensions. Say you have these classes: class Node

Re: D versus Objective C Comparison

2009-02-02 Thread Daniel Keep
grauzone wrote: > Nick Sabalausky wrote: >> [snip] >> >> Umm, go into class A and add whatever you need? > > Maybe I can't, because it's foreign code. Changing it might increase > maintenance overhead, require recompilation of libraries, might > introduce additional module dependencies, which in

Re: D versus Objective C Comparison

2009-02-02 Thread grauzone
Nick Sabalausky wrote: "grauzone" wrote in message news:gm7pa1$2tj...@digitalmars.com... Walter Bright wrote: Jacob Carlborg wrote: It would be great if D could have categories/open classes and you could do something like this: class A { void foo () {} } class A { void bar () {} }

Re: D versus Objective C Comparison

2009-02-02 Thread Christopher Wright
John Reimer wrote: This is actually kind of interesting because it would seem to make Objective-C slightly comparable to the C# language in that it's more than just a language (as is Java). It's a platform (and the beauty of the platform is really only extensively demonstrated by the OS runtim

Re: D versus Objective C Comparison

2009-02-02 Thread Nick Sabalausky
"grauzone" wrote in message news:gm7pa1$2tj...@digitalmars.com... > Walter Bright wrote: >> Jacob Carlborg wrote: >>> It would be great if D could have categories/open classes and you could >>> do something like this: >>> >>> class A >>> { >>> void foo () {} >>> } >>> >>> class A >>> { >>>

Re: D versus Objective C Comparison

2009-02-02 Thread grauzone
The question is, is there a solution, which is both aesthetically and technically better? PS: in dynamic languages, this capability is built-in. If you want an object to have an additional field, you can add that field dynamically.

Re: D versus Objective C Comparison

2009-02-02 Thread grauzone
Walter Bright wrote: Jacob Carlborg wrote: It would be great if D could have categories/open classes and you could do something like this: class A { void foo () {} } class A { void bar () {} } void main () { auto a = new A; a.foo; a.bar; } And it should of course work on

Re: D versus Objective C Comparison

2009-02-02 Thread Denis Koroskin
On Mon, 02 Feb 2009 19:17:17 +0300, Jarrett Billingsley wrote: On Mon, Feb 2, 2009 at 9:41 AM, John Reimer wrote: Perhaps taking a Linux/BSD kernel and building a software system up from there? How would one go about doing such a thing? I suppose you could use a QEMU interpreter to virtua

Re: D versus Objective C Comparison

2009-02-02 Thread Jacob Carlborg
Walter Bright wrote: Jacob Carlborg wrote: It would be great if D could have categories/open classes and you could do something like this: class A { void foo () {} } class A { void bar () {} } void main () { auto a = new A; a.foo; a.bar; } And it should of course work on

Re: D versus Objective C Comparison

2009-02-02 Thread Jarrett Billingsley
On Mon, Feb 2, 2009 at 9:41 AM, John Reimer wrote: >> Perhaps taking a Linux/BSD kernel and building a software system up >> from there? How would one go about doing such a thing? I suppose you >> could use a QEMU interpreter to virtualize the system in the earliest >> stages until you get such

Re: D versus Objective C Comparison

2009-02-02 Thread bearophile
Michel Fortin: > 1. It manages a list of registered classes, and their associated methods. > 2. It provides a method dispatch mechanism, and manages a list of > registered selectors. > 3. It provides various support routines for the compiler (exception > handling, synchronization). > > For compa

Re: D versus Objective C Comparison

2009-02-02 Thread John Reimer
Hello Michel, On 2009-02-02 01:39:40 -0500, John Reimer said: "The Objective-C language defers as much as it can from compile time and link time to runtime. Whenever possible, it does things dynamically. This means that the language requires not just a compiler, but also a runtime system to

Re: D versus Objective C Comparison

2009-02-02 Thread John Reimer
Hello Chris, John Reimer wrote: I link to stuff so that people can do more reading if they want. :) And again, I'm not there to really give a history lesson, more to analyze the situation of "you want to build an app which does foo, which is better for that purpose?" (the answer is that it d

Re: D versus Objective C Comparison

2009-02-02 Thread Michel Fortin
On 2009-02-02 01:39:40 -0500, John Reimer said: "The Objective-C language defers as much as it can from compile time and link time to runtime. Whenever possible, it does things dynamically. This means that the language requires not just a compiler, but also a runtime system to execute the c

Re: D versus Objective C Comparison

2009-02-02 Thread Chris R Miller
John Reimer wrote: I link to stuff so that people can do more reading if they want. :) And again, I'm not there to really give a history lesson, more to analyze the situation of "you want to build an app which does foo, which is better for that purpose?" (the answer is that it depends: who do y

Re: D versus Objective C Comparison

2009-02-01 Thread John Reimer
Hello Chris, John Reimer wrote: Hello Chris, http://www.fsdev.net/~cmiller/a/20090123_dvobjc.html Also, I do honor the right of reply. If there's something I have written that is now incorrect or inaccurate I will of course change my page to reflect that. Heck, all the comparisons in the

Re: D versus Objective C Comparison

2009-02-01 Thread Chris R Miller
John Reimer wrote: Hello Chris, http://www.fsdev.net/~cmiller/a/20090123_dvobjc.html Also, I do honor the right of reply. If there's something I have written that is now incorrect or inaccurate I will of course change my page to reflect that. Heck, all the comparisons in the world are worth

Re: D versus Objective C Comparison

2009-02-01 Thread John Reimer
Hello Chris, http://www.fsdev.net/~cmiller/a/20090123_dvobjc.html Also, I do honor the right of reply. If there's something I have written that is now incorrect or inaccurate I will of course change my page to reflect that. Heck, all the comparisons in the world are worthless if they aren't

Re: D versus Objective C Comparison

2009-02-01 Thread Nick Sabalausky
"Jacob Carlborg" wrote in message news:gm4fsm$kd...@digitalmars.com... > Michel Fortin wrote: >> On 2009-01-31 20:51:57 -0500, Chris R Miller >> said: >> If you had a smart enough dynamic linker and the signature of each function in the virtual table, you could do that in D too by cr

Re: D versus Objective C Comparison

2009-02-01 Thread Walter Bright
Jacob Carlborg wrote: It would be great if D could have categories/open classes and you could do something like this: class A { void foo () {} } class A { void bar () {} } void main () { auto a = new A; a.foo; a.bar; } And it should of course work on classes you don't hav

Re: D versus Objective C Comparison

2009-02-01 Thread Anders F Björklund
Marianne Gagnon wrote: >> LDC packages are available for 0.9, but it has some bugs still... Personally I can't wait to try LDC! It's available as a tarball, "ldc-0.9-mac.tar.bz2", including Tango. Where is this file available? I've been browsing the LDC website without finding anything bey

Re: D versus Objective C Comparison

2009-02-01 Thread Marianne Gagnon
> >> LDC packages are available for 0.9, but it has some bugs still... > > > > Personally I can't wait to try LDC! > > It's available as a tarball, "ldc-0.9-mac.tar.bz2", including Tango. Where is this file available? I've been browsing the LDC website without finding anything beyond the sou

Re: D versus Objective C Comparison

2009-02-01 Thread Jacob Carlborg
Michel Fortin wrote: On 2009-01-31 20:51:57 -0500, Chris R Miller said: If you had a smart enough dynamic linker and the signature of each function in the virtual table, you could do that in D too by creating virtual tables and updating offsets in the code accordingly while linking. (Object

Re: D versus Objective C Comparison

2009-02-01 Thread Piotrek
Chris R Miller pisze: Primarily that it's difficult (for me) to figure out how to get Tango and DSSS working with it. If you like Debian/Ubuntu you can try: http://www.dsource.org/projects/tango/wiki/Debian But I also got working dmd on linux many times with manual installation (Tango/DWT

Re: D versus Objective C Comparison

2009-02-01 Thread Piotrek
Chris R Miller linux: Christopher Wright wrote: It seems that your only significant complaint about Descent is that it is not integrated with DSSS. I believe you can set up DSSS as an external task in Eclipse: http://dsource.org/projects/descent/wiki/CompilingPrograms I believe this will call

Re: D versus Objective C Comparison

2009-02-01 Thread Anders F Björklund
Chris R Miller wrote: If you *require* Leopard / Xcode 3.0 support or Tango / DSSS etc. look at http://www.dsource.org/projects/tango/wiki/MacOSXInstall Well, I don't have Tiger lying around for me to use, so Leopard is non-negotiable. But it's possible to run Xcode 2.5 on Leopard, just as

Re: D versus Objective C Comparison

2009-02-01 Thread Chris R Miller
Anders F Björklund wrote: Chris R Miller wrote: Have a great day, and keep up the good work! I personally can't wait until D gets to the point that a (total bonehead) like me can install it on OS X! Alas, right now it seemeth to require more brain cells than I have at my disposal. You can

Re: D versus Objective C Comparison

2009-02-01 Thread Anders F Björklund
Chris R Miller wrote: Michel Fortin wrote: Well there's one error: "If you ignore Cocoa, then there is the GNUStep [gnustep.org] project, which is an Open-Source implementation of the old Carbon standard from NeXT Step." No. Carbon was created to ease port of classic Mac OS applications t

Re: D versus Objective C Comparison

2009-02-01 Thread Anders F Björklund
Chris R Miller wrote: Have a great day, and keep up the good work! I personally can't wait until D gets to the point that a (total bonehead) like me can install it on OS X! Alas, right now it seemeth to require more brain cells than I have at my disposal. You can find Mac OS X installer pa

Re: D versus Objective C Comparison

2009-01-31 Thread Chris R Miller
Christopher Wright wrote: It seems that your only significant complaint about Descent is that it is not integrated with DSSS. I believe you can set up DSSS as an external task in Eclipse: http://dsource.org/projects/descent/wiki/CompilingPrograms I believe this will call dsss (or whatever prog

Re: D versus Objective C Comparison

2009-01-31 Thread Chris R Miller
Michel Fortin wrote: On 2009-01-31 17:03:10 -0500, Chris R Miller said: Michel Fortin wrote: On 2009-01-31 15:39:17 -0500, Chris R Miller said: Anyways, I decided to write up a comparison of the two languages from a less technical, more deployment oriented standpoint. IOW, examining ho

Re: D versus Objective C Comparison

2009-01-31 Thread Christopher Wright
It seems that your only significant complaint about Descent is that it is not integrated with DSSS. I believe you can set up DSSS as an external task in Eclipse: http://dsource.org/projects/descent/wiki/CompilingPrograms I believe this will call dsss (or whatever program you specify) on the cu

Re: D versus Objective C Comparison

2009-01-31 Thread Michel Fortin
On 2009-01-31 20:51:57 -0500, Chris R Miller said: If you had a smart enough dynamic linker and the signature of each function in the virtual table, you could do that in D too by creating virtual tables and updating offsets in the code accordingly while linking. (Objective-C doesn't work lik

Re: D versus Objective C Comparison

2009-01-31 Thread Michel Fortin
On 2009-01-31 17:03:10 -0500, Chris R Miller said: Michel Fortin wrote: On 2009-01-31 15:39:17 -0500, Chris R Miller said: Anyways, I decided to write up a comparison of the two languages from a less technical, more deployment oriented standpoint. IOW, examining how well they perform fo

Re: D versus Objective C Comparison

2009-01-31 Thread Chris R Miller
Michel Fortin wrote: On 2009-01-31 18:50:52 -0500, Walter Bright said: Michel Fortin wrote: One area I think Objective-C to be very great and that you haven't touched is for creating stable APIs. In Objective-C, contrary to D and C++, you don't have to recompile every dependency when reord

Re: D versus Objective C Comparison

2009-01-31 Thread Daniel Keep
Michel Fortin wrote: > On 2009-01-31 18:50:52 -0500, Walter Bright > said: > >> Michel Fortin wrote: >>> One area I think Objective-C to be very great and that you haven't >>> touched is for creating stable APIs. In Objective-C, contrary to D >>> and C++, you don't have to recompile every depend

Re: D versus Objective C Comparison

2009-01-31 Thread Michel Fortin
On 2009-01-31 18:50:52 -0500, Walter Bright said: Michel Fortin wrote: One area I think Objective-C to be very great and that you haven't touched is for creating stable APIs. In Objective-C, contrary to D and C++, you don't have to recompile every dependency when reordering, adding and remov

Re: D versus Objective C Comparison

2009-01-31 Thread Chris R Miller
Walter Bright wrote: Chris R Miller wrote: Walter Bright wrote: Chris R Miller wrote: Also, I do honor the right of reply. If there's something I have written that is now incorrect or inaccurate I will of course change my page to reflect that. Heck, all the comparisons in the world are wor

Re: D versus Objective C Comparison

2009-01-31 Thread Walter Bright
Chris R Miller wrote: Walter Bright wrote: Chris R Miller wrote: Also, I do honor the right of reply. If there's something I have written that is now incorrect or inaccurate I will of course change my page to reflect that. Heck, all the comparisons in the world are worthless if they aren't

Re: D versus Objective C Comparison

2009-01-31 Thread Walter Bright
Michel Fortin wrote: One area I think Objective-C to be very great and that you haven't touched is for creating stable APIs. In Objective-C, contrary to D and C++, you don't have to recompile every dependency when reordering, adding and removing member functions in a class. In 64-bit Objective-

Re: D versus Objective C Comparison

2009-01-31 Thread Chris R Miller
Michel Fortin wrote: On 2009-01-31 15:39:17 -0500, Chris R Miller said: Anyways, I decided to write up a comparison of the two languages from a less technical, more deployment oriented standpoint. IOW, examining how well they perform for the last mile of development: deploying software.

Re: D versus Objective C Comparison

2009-01-31 Thread Michel Fortin
On 2009-01-31 15:39:17 -0500, Chris R Miller said: Anyways, I decided to write up a comparison of the two languages from a less technical, more deployment oriented standpoint. IOW, examining how well they perform for the last mile of development: deploying software. You talk about IDEs in

Re: D versus Objective C Comparison

2009-01-31 Thread Chris R Miller
Walter Bright wrote: Chris R Miller wrote: Also, I do honor the right of reply. If there's something I have written that is now incorrect or inaccurate I will of course change my page to reflect that. Heck, all the comparisons in the world are worthless if they aren't accurate! Thanks for

Re: D versus Objective C Comparison

2009-01-31 Thread Walter Bright
Chris R Miller wrote: Also, I do honor the right of reply. If there's something I have written that is now incorrect or inaccurate I will of course change my page to reflect that. Heck, all the comparisons in the world are worthless if they aren't accurate! Thanks for doing this, it's a nic

D versus Objective C Comparison

2009-01-31 Thread Chris R Miller
In my hiatus from D, I decided to take the plunge and teach myself Objective-C. This gave me some interesting insights into both languages. It's so fun, whenever I find another programmer, one of the first twenty things I say is "have you ever tried Digital Mars D? It will change your whole