home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6366 < prev    next >
Encoding:
Text File  |  1996-08-05  |  4.6 KB  |  167 lines

  1. Path: news.hik.se!usenet
  2. From: td93aj@te.hik.se (Andreas Johansson)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Visual E - New E Developer Tool - vedev.gif (0/1)
  5. Date: Wed, 27 Mar 1996 09:17:01 GMT
  6. Organization: Capitex
  7. Message-ID: <315906f0.9219429@news.hik.se>
  8. References: <68772090@0humpty.tomate.tng.oche.de> <Dou4u8.2H1@cix.compulink.co.uk>
  9. Reply-To: td93aj@te.hik.se
  10. NNTP-Posting-Host: mia95joa.dialin.hik.se
  11. X-Newsreader: Forte Agent .99c/16.141
  12.  
  13. E versus C/C++ (+ quest. How do I make a library in E?)
  14.  
  15. >A Visual E may be a good toy for amateur programmers to play with, but 
  16. >anything based around E cannot be a professional development system, IMHO.
  17.  
  18.  
  19. FIRST I MUST SAY I'M VERY SORRY ABOUT THAT BINARY FILE THAT I SEND TO
  20. THE DISCUSSION GROUP. I CAN UNDERSTAND NOW THAT IT WAS FOOLISH OF ME.
  21.  
  22. Don't start a war with E against C/C++, and why always call something
  23. a toy, when it is easy to use.
  24.  
  25. My profession is program development for PC, where much code is
  26. written in C/C++ and Visual Basic (I guess you will call VB a toy also
  27. and of course it's slow, but not a toy. When you have it for
  28. profession and can make money on it I would call it professional. If
  29. you look on it in that way I think that most of the development for
  30. the Amiga is not professional, so I can agree that Visual E is for
  31. amatueres but it's not a toy, it's a very nice tool). In the spare
  32. time i write some programs for Amiga. Before I have tested E, I used
  33. Maxon C++. So have have tried both very much.
  34.  
  35. Good arguments to use C/C++
  36. ---------------------------
  37. 1) This expressions works in C but not in E, and it sucks without
  38. them:
  39.  
  40. -------------------------------------------
  41. Accessing the pointer to a member variable:
  42. -------------------------------------------
  43. C/C++
  44. &(test->myptr)=10;
  45.  
  46. E (should be, but doesn't work)
  47. {test.tjoho}:=10
  48. -----------------------------------
  49. Case statment on a member variable:
  50. -----------------------------------
  51. C/C++
  52. switch(test->myvar)
  53. {
  54.    .....
  55. }
  56.  
  57. E (should be, but doesn't work)
  58. SELECT test.myvar
  59.   .....
  60. ENDSELECT
  61. --------------------------------------------------------------
  62. A hole structure in a functionheader:
  63. (I got that problem when i tried to write a BOOPSI class in E,
  64. please do anyone have a solution for this?)
  65. --------------------------------------------------------------
  66. C/C++
  67. void *dispatcher(Class *class, Object *object, Msg msg)  //(or
  68. something like that)
  69. {
  70.    .....
  71. }
  72.  
  73. E
  74. PROC dispathcer(class:PTR TO iclass, object:PTR TO object, msg:PTR TO
  75. msg)
  76.    ......
  77. ENDPROC
  78. ----------------------------------------------------------------
  79.  
  80.  
  81. 2) In some ways more advanced linker and header files
  82. ------------------------------------------------------
  83.  
  84. In C++ you can have then a class header in a .h file. And the code
  85. for the functions in .o files.
  86.  
  87. .h file:
  88. class test
  89. {
  90.    void tjoho();
  91. };
  92.  
  93. .o file before compiled:
  94. void test::tjoho()
  95. {
  96. }
  97.  
  98. In E you must have the code and the object header in the same file.
  99.  
  100. OBJECT test
  101. ENDOBJECT
  102.  
  103. PROC tjoho() OF test
  104. ENDPROC
  105. --------------------------------------------------------
  106.  
  107.  
  108. Now some good arguments  for E:
  109. -------------------------------
  110. There are only one E compiler, no strange variations. No
  111. troubleshoothing with different kinds of .lib files or anything.
  112.  
  113. More integrated with the inline assembler. In C there are some strange
  114. variations how to write the inline assembler, because it's not a part
  115. of any C standard.
  116.  
  117. More Amiga feeling in E, because of it's so close to assembler.
  118.  
  119. Compacter code in most cases.
  120.  
  121. A lot of C-compilers do not have precompiled headerfiles, but E have
  122. the module system, and a module is always compiled.
  123.  
  124. Not so strong typechecking. I know that you can use void * and long in
  125. C almost like E, but you always have to write typeconversions and that
  126. makes the code not look so good.
  127.  
  128. I haven't lookt so much on the LISP alike functions in E, but there
  129. are nothing like that in C.
  130.  
  131. VERY FAST COMPILNG
  132.  
  133. YOU CAN COMPILE A PROGRAM WITHOUT THAT 10 MB THAT YOU DIDN'T AFFORD.
  134. ---------------------------------------------------------------------
  135.  
  136. And now for my questions:
  137.  
  138. 1) How do I write a whole library in E or C.
  139.  
  140. The only problem I have in E is that this code doesn't work
  141.  
  142. label:
  143. .
  144. .
  145. .
  146. rts
  147.  
  148. LONG  label     -> Here I get a compiler error because this must be a
  149. direct value.
  150.  
  151. 2) Or how do I write some of the code in E?
  152.  
  153. The problem that I've got here is that I can't produce a .o (asm/C
  154. object file) to link with the assembler code (witch have the library
  155. initialization-code).
  156.  
  157. 3) And how do I make a E modules that looks like below when I run
  158. ShowModule on it?
  159.  
  160. LIBRARY blabla
  161.    Test(A0)
  162. ENDLIBRARY
  163.  
  164. //Per Jonsson
  165. ---
  166. Signature file located at ftp://ftp.net.net/dev/null
  167.