December 19, 2003
Ilya Minkov wrote:

> Hi.
> 
> I don't think VB users who hate both C++ and Delphi can be attracted to D. It's just that D is much more similar to either of them than to Visual Basic.
> 
> Carlos Santander B. wrote:
> 
>> Last time I checked, B++ hadn't been updated for a long, long while.
> 
> 
> I have been talking to Pavel. He plans on a new language, since he found severe faults in B++ design. IIRC its memory management was somewhat weak. The new language will be somethig like a compiled Python. I'm waiting for him to put up a design paper on it. Pavel himself has made himself comfortable with C++ (which you start to like as you get to understand it) and with C#. This makes it even less probable for him to really work on a new language. BCX is not even good for small projects, bacause its module system is not existent, and debugging is almost impossible.
> 
> -eye
> 

I really like what i saw of b++, wish pavel would have kept working on it... but each to there own i guess (would love to get my hands on the source). As for "ael" or whatever he chose to call it, Pascal like syntax is just to weird for me...
The nice thing about bcx is it has a nice support community, and the author is very helpful in fixing any bugs you find or might have.

My main goal is to write a basic like syntax front-end for D, so i only have to learn the D syntax to start with, not its actual semantics, then i can learn the semantics later with the basic like syntax. But first im just messing around an experimenting with some things (playing is fun)

for example an interpeter would turn the following code:
Public MyArray(3) As String
into
public wchar[3] MyArray;
(or something similar).... and of course lots of built in macro's :)

My biggest headache is learning how librarys, headers, an such, all fit together (its almost like i should learn c++ first lol)

It will take me a while (possibly years) but im fairly well set on doing something like this... i have little choice but to write the front end in vb to start with, since thats what i know inside an out at the moment.

December 19, 2003
Carlos Santander B. wrote:

> "Walter" <rickwal@iinet.net.au> wrote in message
> news:brrveq$2m0v$1@digitaldaemon.com...
> | Carlos Santander B. wrote:
> | > (not that I've seen much either ;) ). If any of you is interested, let
> me
> | > know and I'll keep you informed.
> |
> | Hi All,
> | Yes please.
> | ...
> 
> Ok, then. Check http://earth.prohosting.com/carlos3, go to the delphi4d
> section.
> 
> -----------------------
> Carlos Santander Bernal
> 
> 

this looks very interesting, is it possible to use this without delphi installed?
December 19, 2003
"Lewis" <dethbomb@hotmail.com> wrote in message news:bru9cv$627$1@digitaldaemon.com...
> I really like what i saw of b++, wish pavel would have kept working on
it... but
> each to there own i guess (would love to get my hands on the source). As
for
> "ael" or whatever he chose to call it, Pascal like syntax is just to weird
for me...
> The nice thing about bcx is it has a nice support community, and the
author is
> very helpful in fixing any bugs you find or might have.

I haven't heard of this "b++" before, but it might be worth checking out.

> My main goal is to write a basic like syntax front-end for D, so i only
have to
> learn the D syntax to start with, not its actual semantics, then i can
learn the
> semantics later with the basic like syntax. But first im just messing
around an
> experimenting with some things (playing is fun)
>
> for example an interpeter would turn the following code:
> Public MyArray(3) As String
> into
> public wchar[3] MyArray;
> (or something similar).... and of course lots of built in macro's :)

My gut reaction to this is (bluntly) that it's a waste of time.  You should dive into the native syntax right away, it'll be easier to work with that way.  Force yourself to do the mapping to the old way of programming mentally instead of in some tool that will probably never get finished anyway.  The tool will quickly become a source of frustration anyway, as things we talk about doing won't work for you because your tool doesn't output those kinds of things properly, or it doesn't have those keywords supported, or whatever.   Walter is constantly changing little things about D, it's a moving target currently but that's good in a way as it's possible a few things will be corrected before 1.0.

> My biggest headache is learning how librarys, headers, an such, all fit
together
> (its almost like i should learn c++ first lol)
>
> It will take me a while (possibly years) but im fairly well set on doing something like this... i have little choice but to write the front end in
vb to
> start with, since thats what i know inside an out at the moment.

It won't take you years to just learn D more or less "from scratch."  Just browse on the D website thru the language docs and find some D source code (DIG or something) and start looking thru it, start running it and then modifying it.  Just start adding your own little functions inside of somebody else's toy app until you start to get the hang of it.

Sean


December 19, 2003
"Lewis" <dethbomb@hotmail.com> wrote in message
news:bru9e9$627$2@digitaldaemon.com...
|
| this looks very interesting, is it possible to use this without delphi
installed?

Thanks. Yes, because Delphi programs don't need any dll to run. The only thing needed will be the dll created with Delphi.

-----------------------
Carlos Santander Bernal


December 19, 2003
Sean L. Palmer wrote:

> My gut reaction to this is (bluntly) that it's a waste of time.  You should
> dive into the native syntax right away, it'll be easier to work with that
> way.

Sean, you're right. It may seem emotionally easier, but a syntactic translater, which doesn't do complete parsing and which is not completely debugged, is a great source of problems. It maps one source onto the other loosing line numbers and bending semantics, but not replacing it completely, and then it is impossible to debug code. Let Lewis give nontheless a try on this if he likes. (who knows?)

>>My biggest headache is learning how librarys, headers, an such, all fit
>>together

Hmmm... dig compiler driver (digc) might save you from grief. Modified version here.
http://earth.prohosting.com/carlos3/dig.htm

Lewis, you don't need to learn C++, but i would recommend you to get LCC-Win32 compiler and get some exposure to C. This will give you some knowledge of compilation model, idiotic syntax parts which are preserved in D, and so on. Something of the culture which (sadly) is compulsory for every modern programmer. While the compiler is not necessarily good for production work (debugger is weakish, no C++, ...), it has a neat and simple IDE, and - most importantly - a nice tutorial book. All is for free. The book gives you some simple and Windows programming, but doesn't take too far into the depths of C language and standard libary which you won't need later. So, go though the tutorials, and then switch happily back to D. You will really feel a great relief. After you're comfortable with D, you might want to learn some C++ and come back to D with relief and so on... ;)

In fact, i would like to recommend some book doing the same with a simple subset of C++ and STL, but i'm aware of none. Anyway, Bjarne Stroustrup has been considering modern C++ as a better language for beginners than C. I would argue that C++ is better than C for any serious project, even if for beginners, but not necessarily as the first language to start experimenting with. Anyway, D is *much* better than either by itself, and were a *perfect* language for beginning programmers if the library and tools were comprehensive. I bet and wish we will arrive there someday...

-eye

December 20, 2003
thanks for all the tips Ilya... I already have lcc-win32 along with half a dozen other compilers. In fact if theres a free compiler C\C++ out there i probably have it lol...

The problem is i also have so many "librarys", header files, and stuff thats its getting confusing. How does one know which library and headers are the best to use and where to put them all, and when to use what...

Lots of things have yet to make sense to me, such as why are there 'typedef's' and alias this and that... i see alot of data types that are simply duplicates of an existing type, which makes no sense to me except cause confusion, why not use the original datatype to start with?

Any how as i ponder these mysteries....


Ilya Minkov wrote:
> Sean L. Palmer wrote:
> 
>> My gut reaction to this is (bluntly) that it's a waste of time.  You should
>> dive into the native syntax right away, it'll be easier to work with that
>> way.
> 
> 
> Sean, you're right. It may seem emotionally easier, but a syntactic translater, which doesn't do complete parsing and which is not completely debugged, is a great source of problems. It maps one source onto the other loosing line numbers and bending semantics, but not replacing it completely, and then it is impossible to debug code. Let Lewis give nontheless a try on this if he likes. (who knows?)
> 
>>> My biggest headache is learning how librarys, headers, an such, all fit
>>> together
> 
> 
> Hmmm... dig compiler driver (digc) might save you from grief. Modified version here.
> http://earth.prohosting.com/carlos3/dig.htm
> 
> Lewis, you don't need to learn C++, but i would recommend you to get LCC-Win32 compiler and get some exposure to C. This will give you some knowledge of compilation model, idiotic syntax parts which are preserved in D, and so on. Something of the culture which (sadly) is compulsory for every modern programmer. While the compiler is not necessarily good for production work (debugger is weakish, no C++, ...), it has a neat and simple IDE, and - most importantly - a nice tutorial book. All is for free. The book gives you some simple and Windows programming, but doesn't take too far into the depths of C language and standard libary which you won't need later. So, go though the tutorials, and then switch happily back to D. You will really feel a great relief. After you're comfortable with D, you might want to learn some C++ and come back to D with relief and so on... ;)
> 
> In fact, i would like to recommend some book doing the same with a simple subset of C++ and STL, but i'm aware of none. Anyway, Bjarne Stroustrup has been considering modern C++ as a better language for beginners than C. I would argue that C++ is better than C for any serious project, even if for beginners, but not necessarily as the first language to start experimenting with. Anyway, D is *much* better than either by itself, and were a *perfect* language for beginning programmers if the library and tools were comprehensive. I bet and wish we will arrive there someday...
> 
> -eye
> 
December 20, 2003
"Carlos Santander B." <carlos8294@msn.com> wrote in message
news:brqk6e$l3k$1@digitaldaemon.com...
|
| I'm not a big fan of the Pascal/Delphi language, but I most admit that the
| Delphi/Kylix environment/tool/rad is great. As a matter of fact, I'm
writing
| (in Delphi 6 PE) a dll with declarations for all the GUI objects available
| in Delphi, and a library (in D) calling those objects, providing a wrapper
| to access them just like you would in Delphi. So far, so good. Why I'm
doing
| this? Because I think the way Delphi does GUI building is the best I've
seen
| (not that I've seen much either ;) ). If any of you is interested, let me
| know and I'll keep you informed.
|

I kinda need some help here.
Let's say I don't want to create a dll from Delphi, but rather an obj and
use it directly for the D library. Right now, when I try it, the linker
complies about not finding *any* of the functions created with Delphi. All I
can think of is that there's some incompatibility between the object files.
Is there a way to make this work?

-----------------------
Carlos Santander Bernal


December 20, 2003
"Carlos Santander B." <carlos8294@msn.com> wrote in message
news:bs0he3$itp$1@digitaldaemon.com...
|
| I kinda need some help here.
| Let's say I don't want to create a dll from Delphi, but rather an obj and
| use it directly for the D library. Right now, when I try it, the linker
| complies about not finding *any* of the functions created with Delphi. All
I
| can think of is that there's some incompatibility between the object
files.
| Is there a way to make this work?
|

(Forgot to mention: C obj)
Interestingly, Microsoft linker can convert DM's obj, but can't convert
Borland's. Is that well known? Is there a converter or something?

-----------------------
Carlos Santander Bernal


December 20, 2003
Carlos Santander B. wrote:
> "Carlos Santander B." <carlos8294@msn.com> wrote in message
> news:bs0he3$itp$1@digitaldaemon.com...
> |
> | I kinda need some help here.
> | Let's say I don't want to create a dll from Delphi, but rather an obj and
> | use it directly for the D library. Right now, when I try it, the linker
> | complies about not finding *any* of the functions created with Delphi. All
> I
> | can think of is that there's some incompatibility between the object
> files.
> | Is there a way to make this work?
> |
> 
> (Forgot to mention: C obj)
> Interestingly, Microsoft linker can convert DM's obj, but can't convert
> Borland's. Is that well known? Is there a converter or something?

I don't really any more than what I read (skimmed, really) here:
http://www.digitalmars.com/ctg/implib.html#coff2omf
http://www.faqs.org/faqs/msdos-programmer-faq/part2/section-7.html
http://www.mega-tokyo.com/os/os-faq-linker.html
http://www.bcbdev.com/faqs/faq92.htm

Microsoft is COFF.
Digital Mars is Intel 32 bit OMF.
Borland is either? both?

(I'd better send this message before I add any more URLs.)

Good luck.

> 
> -----------------------
> Carlos Santander Bernal
December 20, 2003
Lewis wrote:
> thanks for all the tips Ilya... I already have lcc-win32 along with half a dozen other compilers. In fact if theres a free compiler C\C++ out there i probably have it lol...
> 
> The problem is i also have so many "librarys", header files, and stuff thats its getting confusing. How does one know which library and headers are the best to use and where to put them all, and when to use what...
> 
> Lots of things have yet to make sense to me, such as why are there 'typedef's' and alias this and that... i see alot of data types that are simply duplicates of an existing type, which makes no sense to me except cause confusion, why not use the original datatype to start with?
> 
> Any how as i ponder these mysteries....

I come from a strong BASIC background (QBASIC, VB, and BCX in particular), so I think I can appreciate some of your concern about learning D. I've worked some on a tutorial that kind of teaches D from a BASIC perspective (http://jcc_7.tripod.com/d/tutor/), but I haven't put too much work into it yet, so it's pretty short.

I've found that the best way to learn D is to code in D. (Imagine that!) When I start learning a new language, I generally begin by porting the kind of programs I like to write. So one thing that I've done to learn D is to take a simple BCX sample program (many are available at http://groups.yahoo.com/group/BCX/) and port either the .bas file or the translated .c file into D. It can work out pretty well. But the best thing is probably to look at D code.  There's more and more of it out there.

Unfortunately since the language itself is still in flux, bit-rot can occur pretty quickly. Code that ran perfectly a couple months ago tends to require a few modifications to compile today. Making the required changed is not necessarily a problem for someone who's been around here for a while, but it can be frustrating for newcomers.

So if you come up with a question, ask away. It's likely that someone here has already confronted a similar issue.

Back to the original topic of COM...
Using COM isn't transparent in D (at least not yet) as it can be in VB, but it will become easier to use as the D libraries catch up.  I've got an idea to use COM in a VBish way that seems to work in BCX that I hope to port to D in the next month or so, but it may not pan out.  And it really is a kind of hack anyway. I'll announce it here if I get it to work at all.

-- 
Justin
http://jcc_7.tripod.com/d/