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.
  • 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
              • 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

                R Offline
                R Offline
                Roger Wright
                wrote on last edited by
                #21

                Pascal.

                "...a photo album is like Life, but flat and stuck to pages." - Shog9

                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?

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

                  There is a balance between CryptoPerl and Plain English, and neither extreme is ideal for a wide range of applications. You might consider "more special symbols" as "more elite" if you assing a negative meaning to elite, but that doesn't imply the native language extreme is inherently superior. I understand it more as "extensive punctuation" than "weird characters". Many real world languages have constructs where the meaning changes with punctuation, computer languages do that to a higher extent, but obviously, there is some limit on clarity.


                  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!

                  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:

                    W Offline
                    W Offline
                    WillemM
                    wrote on last edited by
                    #23

                    I was waiting for that one ;P

                    WM. What about weapons of mass-construction? "You can always try to smash it with a wrench to fix that. It might actually work" - WillemM

                    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

                      W Offline
                      W Offline
                      WillemM
                      wrote on last edited by
                      #24

                      It's not that I like one type of syntax over another. It's just that I dont like concat constructions to be denoted like this: A || B || C. C'mon, this can't be good. As long as languages keep this construct out of the lanuage it's all fine by me. (BTW. This construct is used inside Data Integrator 11.5 for string concatenation)

                      WM. What about weapons of mass-construction? "You can always try to smash it with a wrench to fix that. It might actually work" - WillemM

                      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