digitalmars.D - Needed Keywords for java compatability [throws-instanceof]
- kortex (16/16) Aug 12 2005 i know in advance that D is great but as a javanese i [we] need some mis...
- Sean Kelly (6/9) Aug 12 2005 As a C++ programmer, I think throws clauses are far more trouble than th...
- Mike Parker (16/30) Aug 12 2005 For what it's worth, I'm a long time Java user and I utterly disagree
- Dejan Lekic (11/11) Aug 12 2005 Mr. Parker I was about to say almost the same as You did.
- Chris Sauls (9/10) Aug 12 2005 Already can be done, using cast().
- =?utf-8?B?RGF3aWQgQ2nEmcW8YXJraWV3aWN6?= (6/7) Aug 12 2005 I dare to say, that java needs to drop this keywords for compatibility
- AJG (5/10) Aug 12 2005 I second this notion and propose, furthermore, that the language Java be...
- Hasan Aljudy (5/24) Aug 12 2005 D--
i know in advance that D is great but as a javanese i [we] need some missing keywords for COMPATABILITY with java i mean throws for checked exceptions and instanceof of checkd typecasting i know i can do everything with D but with a large code i [we] need to transform from java to D it is a tedious work so we NEED these keyword just for COMPATABILITY . ----------------------------------------------- CONSTRUCTOR: i don't know why you choose to make D constructor like this i mean using this keyword as constructor i think it is a bad idea , inconvenient and unreadable for a while i think you also must use the C++/java style for constructor and this FOR COMPATABILITY only. -------------------------------------------------- THANK YOU kortex
Aug 12 2005
In article <ddig7b$m8m$1 digitaldaemon.com>, kortex says...i know in advance that D is great but as a javanese i [we] need some missing keywords for COMPATABILITY with java i mean throws for checked exceptionsAs a C++ programmer, I think throws clauses are far more trouble than they're worth. Particularly for a language that can call C code which may in turn generate system errors that propagate as exceptions.and instanceof of checkd typecastingDynamic typing will improve as D matures. Sean
Aug 12 2005
kortex wrote:i know in advance that D is great but as a javanese i [we] need some missing keywords for COMPATABILITY with java i mean throws for checked exceptions and instanceof of checkd typecasting i know i can do everything with D but with a large code i [we] need to transform from java to D it is a tedious work so we NEED these keyword just for COMPATABILITY .For what it's worth, I'm a long time Java user and I utterly disagree with you. If D were to add keywords and operators to ease your issues of porting Java projects, where does it end? From how many other languages should keywords be added? While I would love to see some particular Java features implemented in D (reflection, introspection, dynamic instantiation), I don't expect them to be implemented the 'Java way'. Think of it this way, if you move to D permanently you only need to port the project once.----------------------------------------------- CONSTRUCTOR: i don't know why you choose to make D constructor like this i mean using this keyword as constructor i think it is a bad idea , inconvenient and unreadable for a while i think you also must use the C++/java style for constructor and this FOR COMPATABILITY only. --------------------------------------------------D is not Java. D is not C++. The reason it seems foreign to you is that you are not 'Thinking in D'. Once you've worked with D for a while, this() as a constructor becomes quite natural. And contrary to your difficulties, I now find it much more readable than having constructors named after the class - this() just jumps out immediately and screems 'I'm a constructor!' because it's identical for every class. Maybe it will do the same for you over time.
Aug 12 2005
Mr. Parker I was about to say almost the same as You did. I, as C++ user, could (acually i would not - but just for an example :) require *_cast , throws, using (...) keywords; Modula-3 developers would Kind regards Dejan -- ........... Dejan Lekic http://dejan.lekic.org
Aug 12 2005
kortex wrote:and instanceof of checkd typecastingAlready can be done, using cast(). -- Chris Sauls
Aug 12 2005
On Fri, 12 Aug 2005 17:45:47 +0200, kortex <kortex_member pathlink.com> wrote:so we NEED these keyword just for COMPATABILITY .I dare to say, that java needs to drop this keywords for compatibility with D. Not reverse. Ha! :> ;) -- Dawid Ciężarkiewicz
Aug 12 2005
In article <op.svewd2yo58xlqs localhost.localdomain>, =?utf-8?B?RGF3aWQgQ2nEmcW8YXJraWV3aWN6?= says...On Fri, 12 Aug 2005 17:45:47 +0200, kortex <kortex_member pathlink.com> wrote:I second this notion and propose, furthermore, that the language Java be known henceforth as D--. Sun? --AJG.so we NEED these keyword just for COMPATABILITY .I dare to say, that java needs to drop this keywords for compatibility with D. Not reverse. Ha! :> ;)
Aug 12 2005
AJG wrote:In article <op.svewd2yo58xlqs localhost.localdomain>, =?utf-8?B?RGF3aWQgQ2nEmcW8YXJraWV3aWN6?= says...D-- LOL! You have a point there, we must deal with other languages from a position of strength.On Fri, 12 Aug 2005 17:45:47 +0200, kortex <kortex_member pathlink.com> wrote:I second this notion and propose, furthermore, that the language Java be known henceforth as D--. Sun? --AJG.so we NEED these keyword just for COMPATABILITY .I dare to say, that java needs to drop this keywords for compatibility with D. Not reverse. Ha! :> ;)
Aug 12 2005