Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. The slickest language syntaxwise? [modified]

The slickest language syntaxwise? [modified]

Scheduled Pinned Locked Moved The Lounge
questioncsharp
24 Posts 11 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Roger Alsing 0
    wrote on last edited by
    #1

    Im just doing a little poll here on what languages you think have the slickest syntax. and if you dont like any it would be interesting to hear some arguments on what is bad in the current languages. So pretty much, why do you like a certain kind of syntax? I personally code C#, not because I like the syntax but rather because it lets me express myself enough and its some kind of defacto standard for .net coding. I know that Ive defended the C style languages because of their syntax but I think I have to rethink this :P MyType<OtherType<int>> var = new MyType<OtherType<int>>(1,2,3); if (a == b && c > d ) ... I cant say that I find the above very pretty. Its symbol mania... So if you guys could invent your own perfect language, how would it look? * For those of you who see code in here and are going to vote1 or cry "Do not post programming yadda yadda"... this is not a programming question.. its a question about prefference regarding syntax.. -- modified at 3:37 Thursday 21st December, 2006

    J D S K R 6 Replies Last reply
    0
    • R Roger Alsing 0

      Im just doing a little poll here on what languages you think have the slickest syntax. and if you dont like any it would be interesting to hear some arguments on what is bad in the current languages. So pretty much, why do you like a certain kind of syntax? I personally code C#, not because I like the syntax but rather because it lets me express myself enough and its some kind of defacto standard for .net coding. I know that Ive defended the C style languages because of their syntax but I think I have to rethink this :P MyType<OtherType<int>> var = new MyType<OtherType<int>>(1,2,3); if (a == b && c > d ) ... I cant say that I find the above very pretty. Its symbol mania... So if you guys could invent your own perfect language, how would it look? * For those of you who see code in here and are going to vote1 or cry "Do not post programming yadda yadda"... this is not a programming question.. its a question about prefference regarding syntax.. -- modified at 3:37 Thursday 21st December, 2006

      J Offline
      J Offline
      Jon Sagara
      wrote on last edited by
      #2

      The entire language consists of one statement that works for all programs that you will ever write: ReadMyMindAndDoExactlyWhatIWantYouInfernalMachine;

      Jon Sagara When I grow up, I'm changing my name to Joe Kickass! My Blog | My Site | My Articles

      R P 2 Replies Last reply
      0
      • R Roger Alsing 0

        Im just doing a little poll here on what languages you think have the slickest syntax. and if you dont like any it would be interesting to hear some arguments on what is bad in the current languages. So pretty much, why do you like a certain kind of syntax? I personally code C#, not because I like the syntax but rather because it lets me express myself enough and its some kind of defacto standard for .net coding. I know that Ive defended the C style languages because of their syntax but I think I have to rethink this :P MyType<OtherType<int>> var = new MyType<OtherType<int>>(1,2,3); if (a == b && c > d ) ... I cant say that I find the above very pretty. Its symbol mania... So if you guys could invent your own perfect language, how would it look? * For those of you who see code in here and are going to vote1 or cry "Do not post programming yadda yadda"... this is not a programming question.. its a question about prefference regarding syntax.. -- modified at 3:37 Thursday 21st December, 2006

        D Offline
        D Offline
        Don Fletcher
        wrote on last edited by
        #3

        I think my ideal would be C++ but I would definitely change the very messy template syntax :wtf: and overloading of << and >> (there must be a prettier way to do this and I've never gotten used to it!) C# and "managed" extensions just make things worse (I still remember when the mantra was "less is more")...something is badly wrong when you have to use constructs like "MyType> var". But in 20 years nothing's beaten the elegance of well structured C code for me :)

        R P M 3 Replies Last reply
        0
        • J Jon Sagara

          The entire language consists of one statement that works for all programs that you will ever write: ReadMyMindAndDoExactlyWhatIWantYouInfernalMachine;

          Jon Sagara When I grow up, I'm changing my name to Joe Kickass! My Blog | My Site | My Articles

          R Offline
          R Offline
          Roger Alsing 0
          wrote on last edited by
          #4

          I would love to see that compiler ;-)

          D 1 Reply Last reply
          0
          • D Don Fletcher

            I think my ideal would be C++ but I would definitely change the very messy template syntax :wtf: and overloading of << and >> (there must be a prettier way to do this and I've never gotten used to it!) C# and "managed" extensions just make things worse (I still remember when the mantra was "less is more")...something is badly wrong when you have to use constructs like "MyType> var". But in 20 years nothing's beaten the elegance of well structured C code for me :)

            R Offline
            R Offline
            Roger Alsing 0
            wrote on last edited by
            #5

            the MyType> var was a bit of forum distortion of the code. apparently the codeblocks in the forum does not output the raw content. so its fixed now. what it shows is a 2 level generic type

            D 1 Reply Last reply
            0
            • R Roger Alsing 0

              I would love to see that compiler ;-)

              D Offline
              D Offline
              Don Fletcher
              wrote on last edited by
              #6

              Oh no - that sounds like it could be a "Plain English Compiler"! RUN FOR YOUR LIVES!!!!!! :laugh: :laugh: :laugh:

              P W 2 Replies Last reply
              0
              • J Jon Sagara

                The entire language consists of one statement that works for all programs that you will ever write: ReadMyMindAndDoExactlyWhatIWantYouInfernalMachine;

                Jon Sagara When I grow up, I'm changing my name to Joe Kickass! My Blog | My Site | My Articles

                P Offline
                P Offline
                peterchen
                wrote on last edited by
                #7

                Back in ASM days we used the DWIM instruction for that:

                OUT eax, 17 ; hook garbage collector to resource manager
                DWIM 88 ; Do What I mean (in 88 clock cycles)

                Unfortunately, it didn't survive the move to more RISCy instruction sets (I never understood why). For C++0x I suggested to use the more colloquial "..." expression here

                std::string FindPrime(__int64 digits)
                {
                ...
                }

                I don't know what is so complicated about it, but obviously the standards comitee is still "working on it"


                Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers!
                We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
                Linkify!|Fold With Us!

                R P 2 Replies Last reply
                0
                • D Don Fletcher

                  I think my ideal would be C++ but I would definitely change the very messy template syntax :wtf: and overloading of << and >> (there must be a prettier way to do this and I've never gotten used to it!) C# and "managed" extensions just make things worse (I still remember when the mantra was "less is more")...something is badly wrong when you have to use constructs like "MyType> var". But in 20 years nothing's beaten the elegance of well structured C code for me :)

                  P Offline
                  P Offline
                  Pierre Leclercq
                  wrote on last edited by
                  #8

                  Don Fletcher wrote:

                  the very messy template syntax

                  Well template syntax is not so awful, if you use typedefs. Passing around raw templates does not sound like a good habbit to me. But we're touching at the very controversial nature of C++. It's not because the language allows the programmer to do something it is a good idea to do it. But still the programmer is free to make his own choices.

                  D 1 Reply Last reply
                  0
                  • R Roger Alsing 0

                    the MyType> var was a bit of forum distortion of the code. apparently the codeblocks in the forum does not output the raw content. so its fixed now. what it shows is a 2 level generic type

                    D Offline
                    D Offline
                    Don Fletcher
                    wrote on last edited by
                    #9

                    Oh that might be true now ... but it's only a matter of time before it's an accepted part of the syntax :laugh:

                    1 Reply Last reply
                    0
                    • D Don Fletcher

                      Oh no - that sounds like it could be a "Plain English Compiler"! RUN FOR YOUR LIVES!!!!!! :laugh: :laugh: :laugh:

                      P Offline
                      P Offline
                      Pierre Leclercq
                      wrote on last edited by
                      #10

                      !SUGEN DNARG EHT !SUGEN DNARG EHT !SUGEN DNARG EHT Beware of what you'll bring upon yourself. :)

                      D 1 Reply Last reply
                      0
                      • P Pierre Leclercq

                        Don Fletcher wrote:

                        the very messy template syntax

                        Well template syntax is not so awful, if you use typedefs. Passing around raw templates does not sound like a good habbit to me. But we're touching at the very controversial nature of C++. It's not because the language allows the programmer to do something it is a good idea to do it. But still the programmer is free to make his own choices.

                        D Offline
                        D Offline
                        Don Fletcher
                        wrote on last edited by
                        #11

                        Very true - and if you don't like something then don't use it! (That works for me and it's one of the great things about C/C++ :cool: )

                        1 Reply Last reply
                        0
                        • P peterchen

                          Back in ASM days we used the DWIM instruction for that:

                          OUT eax, 17 ; hook garbage collector to resource manager
                          DWIM 88 ; Do What I mean (in 88 clock cycles)

                          Unfortunately, it didn't survive the move to more RISCy instruction sets (I never understood why). For C++0x I suggested to use the more colloquial "..." expression here

                          std::string FindPrime(__int64 digits)
                          {
                          ...
                          }

                          I don't know what is so complicated about it, but obviously the standards comitee is still "working on it"


                          Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers!
                          We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
                          Linkify!|Fold With Us!

                          R Offline
                          R Offline
                          Roger Alsing 0
                          wrote on last edited by
                          #12

                          but take this: std::string FindPrime(__int64 digits) maybe people are just too used to it, but "::" "__int64" why should we have to use that many mumbo jumbo symbols to express what we want to do? Im not saying we need anything like the "english compiler" but dont you find the excessive use of symbols a bit annoying? its like we/language designers try to make things look cooler and more complex than they really are... the more __ before an identifier , the cooler the code.

                          P 1 Reply Last reply
                          0
                          • P Pierre Leclercq

                            !SUGEN DNARG EHT !SUGEN DNARG EHT !SUGEN DNARG EHT Beware of what you'll bring upon yourself. :)

                            D Offline
                            D Offline
                            Don Fletcher
                            wrote on last edited by
                            #13

                            :laugh:

                            1 Reply Last reply
                            0
                            • P peterchen

                              Back in ASM days we used the DWIM instruction for that:

                              OUT eax, 17 ; hook garbage collector to resource manager
                              DWIM 88 ; Do What I mean (in 88 clock cycles)

                              Unfortunately, it didn't survive the move to more RISCy instruction sets (I never understood why). For C++0x I suggested to use the more colloquial "..." expression here

                              std::string FindPrime(__int64 digits)
                              {
                              ...
                              }

                              I don't know what is so complicated about it, but obviously the standards comitee is still "working on it"


                              Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers!
                              We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
                              Linkify!|Fold With Us!

                              P Offline
                              P Offline
                              Pierre Leclercq
                              wrote on last edited by
                              #14

                              peterchen wrote:

                              it didn't survive the move to more RISCy instruction sets

                              Ouch! No! Not the ghost of processors where native instruction sets will support high level languages!!!!

                              1 Reply Last reply
                              0
                              • D Don Fletcher

                                I think my ideal would be C++ but I would definitely change the very messy template syntax :wtf: and overloading of << and >> (there must be a prettier way to do this and I've never gotten used to it!) C# and "managed" extensions just make things worse (I still remember when the mantra was "less is more")...something is badly wrong when you have to use constructs like "MyType> var". But in 20 years nothing's beaten the elegance of well structured C code for me :)

                                M Offline
                                M Offline
                                megaadam
                                wrote on last edited by
                                #15

                                If you like to read about weird programming languages, click this link. The factorial function can be written like this in Forth: : FACTORIAL 1 SWAP BEGIN ?DUP WHILE TUCK * SWAP 1- REPEAT ; or in Prolog: fact(X,1) :- X =:= 1. fact(X,Fact) :- X > 1, NewX is X - 1, fact(NewX,NF), Fact is X * NF. But the winnr is APL !X Apl has defined ! as a factorial operator. It is a higly specialized mathematical analysis. It has extremely powerful array processing capabilities where arrays can for example process themselves. Dont ask me how, I never used it just read about it but perhaps somebody here can entertain us with his/her knowledge :)

                                _____________________________________ Action without thought is not action Action without emotion is not life

                                1 Reply Last reply
                                0
                                • R Roger Alsing 0

                                  but take this: std::string FindPrime(__int64 digits) maybe people are just too used to it, but "::" "__int64" why should we have to use that many mumbo jumbo symbols to express what we want to do? Im not saying we need anything like the "english compiler" but dont you find the excessive use of symbols a bit annoying? its like we/language designers try to make things look cooler and more complex than they really are... the more __ before an identifier , the cooler the code.

                                  P Offline
                                  P Offline
                                  peterchen
                                  wrote on last edited by
                                  #16

                                  Roger J wrote:

                                  maybe people are just too used to it, but "::" "__int64" why should we have to use that many mumbo jumbo symbols to express what we want to do?

                                  :: is very precise, __ is necessary garbage.


                                  Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers!
                                  We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
                                  Linkify!|Fold With Us!

                                  R 1 Reply Last reply
                                  0
                                  • P peterchen

                                    Roger J wrote:

                                    maybe people are just too used to it, but "::" "__int64" why should we have to use that many mumbo jumbo symbols to express what we want to do?

                                    :: is very precise, __ is necessary garbage.


                                    Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers!
                                    We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
                                    Linkify!|Fold With Us!

                                    R Offline
                                    R Offline
                                    Roger Alsing 0
                                    wrote on last edited by
                                    #17

                                    >>:: is very precise yes but the same reasoning could be applied to the symbols used in say Perl. that doesnt mean that its a good/clean/smart syntax. we could ofcourse have symbols for everything , eg ¤ for public and maybe £ for private, but that doesnt make it good just because it has a meaning. eg. "&&" wtf is that all about?, why did someone think "oh lets make the logical and token be &&, that is so clever.." Or are everyone happy with their elit symbol syntax just because you you have gotten so used to it?

                                    A P 2 Replies Last reply
                                    0
                                    • R Roger Alsing 0

                                      Im just doing a little poll here on what languages you think have the slickest syntax. and if you dont like any it would be interesting to hear some arguments on what is bad in the current languages. So pretty much, why do you like a certain kind of syntax? I personally code C#, not because I like the syntax but rather because it lets me express myself enough and its some kind of defacto standard for .net coding. I know that Ive defended the C style languages because of their syntax but I think I have to rethink this :P MyType<OtherType<int>> var = new MyType<OtherType<int>>(1,2,3); if (a == b && c > d ) ... I cant say that I find the above very pretty. Its symbol mania... So if you guys could invent your own perfect language, how would it look? * For those of you who see code in here and are going to vote1 or cry "Do not post programming yadda yadda"... this is not a programming question.. its a question about prefference regarding syntax.. -- modified at 3:37 Thursday 21st December, 2006

                                      S Offline
                                      S Offline
                                      Stuart Dootson
                                      wrote on last edited by
                                      #18

                                      My favourite language is Haskell[^] because there is so little 'overhead' syntax! It is strongly typed, but infers types, meaning you don't (in 99.99% of cases) have to explicitly type anything. You can if you want....but you don't have to. You have to love a language that let's you define a (polymorphic) quicksort like this:

                                      qsort []     = []
                                      qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ qsort (filter (>= x) xs)
                                      

                                      There's bits of Erlang[^] syntax that are schweet as well (binary types, for example).

                                      1 Reply Last reply
                                      0
                                      • R Roger Alsing 0

                                        Im just doing a little poll here on what languages you think have the slickest syntax. and if you dont like any it would be interesting to hear some arguments on what is bad in the current languages. So pretty much, why do you like a certain kind of syntax? I personally code C#, not because I like the syntax but rather because it lets me express myself enough and its some kind of defacto standard for .net coding. I know that Ive defended the C style languages because of their syntax but I think I have to rethink this :P MyType<OtherType<int>> var = new MyType<OtherType<int>>(1,2,3); if (a == b && c > d ) ... I cant say that I find the above very pretty. Its symbol mania... So if you guys could invent your own perfect language, how would it look? * For those of you who see code in here and are going to vote1 or cry "Do not post programming yadda yadda"... this is not a programming question.. its a question about prefference regarding syntax.. -- modified at 3:37 Thursday 21st December, 2006

                                        K Offline
                                        K Offline
                                        Kevin McFarlane
                                        wrote on last edited by
                                        #19

                                        Roger J wrote:

                                        I know that Ive defended the C style languages because of their syntax

                                        I think the C-style languages are rather poor in their syntax, even though I'm primarily a C style language programmer myself. However, 1. I do think C# and Java syntaxes are much clearer and more readable than C/C++. 2. On the whole it's not that big an issue compared to the willingness of the programmer to write readable code, i.e., using well-named identifiers, short functions, etc. 3. Perl is probably the worst of the C syntax languages. I don't think any syntax is perfect. But, without having used them much, in scripting languages, Python and Ruby seem pretty slick. In statically typed languages Eiffel is pretty elegant. Many C-syntax types think it's verbose. But this is a superficial impression if you dig a little deeper.

                                        Kevin

                                        1 Reply Last reply
                                        0
                                        • R Roger Alsing 0

                                          >>:: is very precise yes but the same reasoning could be applied to the symbols used in say Perl. that doesnt mean that its a good/clean/smart syntax. we could ofcourse have symbols for everything , eg ¤ for public and maybe £ for private, but that doesnt make it good just because it has a meaning. eg. "&&" wtf is that all about?, why did someone think "oh lets make the logical and token be &&, that is so clever.." Or are everyone happy with their elit symbol syntax just because you you have gotten so used to it?

                                          A Offline
                                          A Offline
                                          Aamir Butt
                                          wrote on last edited by
                                          #20

                                          Roger J wrote:

                                          "&&" wtf is that all about?

                                          Isn't it a Mathematics thing to represent logical AND with & and logical OR with |? This is what is my understanding although I am not so sure.

                                          "Some people believe football is a matter of life and death. I'm very disappointed with that attitude. I can assure you it is much, much more important than that. -- Bill Shankly"

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups