View Poll Results: Which do you like best?

Voters
14. You may not vote on this poll
  • Symbolic

    13 92.86%
  • Descriptive

    2 14.29%
Multiple Choice Poll.

Thread: Symbolic vs Descriptive

  1. #1
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489

    Symbolic vs Descriptive

    Symbolic:
    Code:
    main {
      var n:Integer = 10;
      swap<Integer>(n, 20);
      printf("%d", n);
    }
    
    function swap<T>(&var1, &var2:T) {
      var temp:T = var1;
      var1 = var2;
      var2 = temp;
    }
    Descriptive:
    Code:
    Main
      Var n As Integer = 10
      swap<Integer>(n, 20)
      printf("%d", n)
    End Main
    
    Function swap<T>(Byref var1, ByRef var2 As T)
      Var temp As T = var1
      var1 = var2
      var2 = temp
    End Function
    Which do you like?
    Tell me the reason, please,,

  2. #2
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    Umm.. Err.. The first one, because the second looks like VB, which I hate.
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I do have to agree. C++ is symbolic, as well, so I like symbolic.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    I wouldn't call it appropriate to associate the syntax style with a complete language... I also wouldn't say that descriptive syntax is what makes Visual Basic a pretty lousy programming language. Descriptive languages are easier to pick up for new programmers, obviously, because there is less syntax you really need to memorize. However, since most symbolic languages tend to use the same symbols... once you know one, almost all of the other ones are pretty easy to pick up and understand. Symbolic languages tend to make it easier to identify variables and functions than descriptive languages do... especially when you're looking at the code on paper rather than a color-coded IDE. So, for that, I'd say I prefer symbolic languages. If however, all programming languages tended to do their own thing with symbols like using angle brackets for scope and braces for grouping... I could see myself appreciating the simplicity of descriptive languages more.
    Sent from my iPadŽ

  5. #5
    Registered User
    Join Date
    Jun 2008
    Posts
    266
    I like descriptive better actually. I mostly prefer it because I like tabs over {'s.

  6. #6
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Generally descriptive. But something more like:
    Code:
    Main
      n::Int = 10
      swap<Int> n 20
      printf  "&#37;d"  n
    End
    
    void swap<T> &var1  &var2::T 
      temp::T = var1
      var1 = var2
      var2 = temp
    End
    So you don't put ";". You just change a line. You don't put "," you just pug " ". You don't put (,) except some occasions (like Haskell). You don't put brackets but you put <tab>.
    But you use symbols like <,> for "additional" information. I don't like using "byref" or "ref". They get "confused" a bit with the variables. I want to be clear "this is the variable and this is how you pass it".

  7. #7
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    I don't mind either. I do a lot of C and a lot of Matlab, so I use both at a regular basis. One thing I'll say for 'descriptive' syntax is that it is sometimes nice to be able to see colours flagging scope rather than searching for braces.

  8. #8
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by twomers View Post
    I don't mind either. I do a lot of C and a lot of Matlab, so I use both at a regular basis. One thing I'll say for 'descriptive' syntax is that it is sometimes nice to be able to see colours flagging scope rather than searching for braces.
    oh god that woud be ugly as hell, id keep thinking a certain scope was all keywords or comments and the whole program woudl be at the same scope (no {'s )

    BASIC is intended to be a teaching language, Visual Basic is not. There are a lot fo reasons I don't use VB, but honestly the syntax isnt one of them. VB just lacks the flexibility of C/C++. I'm sure you could do anythign in VB that you can do in C/C++, except maybe write an OS, but the mental acrobatics you would need to perform to twist the languge into doing some of the things I need would make it so painfully obvious that it is unsuited to anything but web toys and excel scripts you would pull your eyeballs out. Then again, I wish excel would support C/C++ instead of or at least in addition to VB.

    I honestly dont see whats so hard about learning C/C++.
    Last edited by abachler; 12-06-2008 at 09:14 AM.

  9. #9
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Definitely symbolic, descriptive may be easier for the non-coder to read, but it really gets annoying having to type "End Function" when you can just slap down "}", a programmer can read them at pretty much the same rate, but you can type symbolically a lot faster. Brackets are also less "in your face" than full words are, making it easier for you the programmer to pay attention to the involving parts of code.

  10. #10
    Registered User
    Join Date
    Jun 2008
    Posts
    266
    Quote Originally Posted by Yarin View Post
    Definitely symbolic, descriptive may be easier for the non-coder to read, but it really gets annoying having to type "End Function" when you can just slap down "}", a programmer can read them at pretty much the same rate, but you can type symbolically a lot faster. Brackets are also less "in your face" than full words are, making it easier for you the programmer to pay attention to the involving parts of code.
    I disagree. A simple 'end' would suffice rather than 'End Function'. I would also find it easier to type the word out because you wouldn't have to use shift along with an oddly placed symbol.

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    The oddly placed symbol looks better IMHO.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    The larch
    Join Date
    May 2006
    Posts
    3,573
    What if END also happens to be a command to end execution?
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  13. #13
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Quote Originally Posted by anon View Post
    What if END also happens to be a command to end execution?
    Well, it would be a keyword so it wouldn't be used as a command (dunno if I got what you meant...probably not)

  14. #14
    Registered User
    Join Date
    Jun 2008
    Posts
    266
    Quote Originally Posted by anon View Post
    What if END also happens to be a command to end execution?
    What distinguishes a } at the end of a function from a } at the end of the program? I certainly don't see a difference...

  15. #15
    The larch
    Join Date
    May 2006
    Posts
    3,573
    I just meant that in Basic there already is an END command, so it is taken up. In a hypothetical language, do as you wish.

    I don't think there is a } at the end of a program. There's one at the end of main(), but the program may stop in a number of other places (e.g exit).
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 06-01-2009, 07:54 PM
  2. is there a weird rule about symbolic constants?
    By i_can_do_this in forum C Programming
    Replies: 5
    Last Post: 07-10-2006, 07:14 AM
  3. C Programming 2d Array Question
    By jeev2005 in forum C Programming
    Replies: 3
    Last Post: 04-26-2006, 03:18 PM
  4. Going out of scope
    By nickname_changed in forum C++ Programming
    Replies: 9
    Last Post: 10-12-2003, 06:27 PM
  5. anyone ever heard of symbolic programming
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 02-18-2002, 12:30 PM