Thread: Super language.

  1. #1
    Registered User
    Join Date
    Sep 2006
    Location
    Kansas City
    Posts
    76

    Super language.

    This might be a strange question, but is it possible to make one language that will be able to do what every language does. Someking of "super language" that will encorporate C/C++, java, php , actionscripts ...
    ?

  2. #2
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    Well...technically any real programming language can do anything if you know how to use the language properly.

    The language might not be designed for those specific purposes, but it can still accomplish them.

    I personally think that C/C++ comes the closest to this "super" language of which you speak. It combines an incredible amount of power with relative readability and ease of use.

    As you can see a whole slew of languages have been designed or modeled after C, even if only in a few aspects. Java and C# are the most obvious, but we cant forget PHP, JavaScript, and many others which are very C-like. Even Verilog, which is meant for creating digital circuits and not software, is very much C-like in structure.

    The problem is that there is more than one way of programming. In C, and all related languages, we use common practice of performing instructions one at a time, and sequentially.

    There are other languages which do not take this approach. Verilog is one, for example. In Verilog instruction are not executed sequentially, but essentially all at once.

    SQL is another example. SQL is a very popular database language, but is modeled very differently than other languages. It performs queries, which essentially are searches for specific pieces of data, on databases. Prolog is another similar language.

    But like I said, pretty much most languages can do anything if you put it to use in the right way, and know how to use the language (and if you know your algorithms, which are the same know matter what language you use).
    My Website

    "Circular logic is good because it is."

  3. #3
    aoeuhtns
    Join Date
    Jul 2005
    Posts
    581
    C/C++ don't come anywhere close. Especially not on the power spectrum.

    If you want a language that tries to do everything, see Perl 6. I don't think this is a good goal to have in mind, but Perl 6 is the closest to achieving this. It borrows from everything. And if there is a feature or syntax you want, you can write your own parsing function and use that to satisfy your goal.

    There are features of languages which are just incompatible. For example, some languages have the feature that there are no modifiable variables. You simply can't mix this with a language that has assignment statements. And then there's garbage collection/not, which is pretty much an on/off thing unless you want two different 'universes' that don't touch each other.

    Generally speaking, the classic 'language that can do everything' is Lisp.
    There are 10 types of people in this world, those who cringed when reading the beginning of this sentence and those who salivated to how superior they are for understanding something as simple as binary.

  4. #4
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    'language that can do everything' is Lisp.
    But what the effort it requires from the programmer, just to count all these endless )))))))))))))
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  5. #5
    Insane Game Developer Nodtveidt's Avatar
    Join Date
    Nov 2006
    Location
    Isabela, PR
    Posts
    105
    Just about every language can do everything already. It's all a matter of coder preference and, in many cases, bias and/or prejudice (such as hatred of BASIC without knowing about all the powerful BASICs there are out there today, such as freeBASIC). C++ seems to me to be the most flexible and versatile (it also helps to have no less than four major compilers for Windows), but lacking in terms of ease of use; the learning curve is somewhat steep for a lot of people (it was for me also). You have to ask yourself a few questions...how easy is it to use? How strict is the syntax? Who is developing the compiler? On these three pieces of information alone, you're going to find allies and opponents of any language, let alone hundreds of other little facts. So a super-language? Even if you were to collect all the "best things" from all the various languages, it still wouldn't be enough because coders tend to be prejudiced about coding languages and many will nitpick over the details.

  6. #6
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    The language that can do anything is the language that can incorporate code from others languages. That's a big number of the current programming languages.

    Now... a programmer than can do anything? That's harder to find
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  7. #7
    Registered Luser risby's Avatar
    Join Date
    Jun 2006
    Posts
    72
    Quote Originally Posted by Suchy
    This might be a strange question, but is it possible to make one language that will be able to do what every language does. Someking of "super language" that will encorporate C/C++, java, php , actionscripts ...
    ?
    It does seem like a strange question - here's my strange response.

    A language that can do everything that the computer can do is its processor's assembly language. Unfortunately the computer can only do about four things, viz: move bits to and from memory, move bits to and from i/o devices, simple arithmetic using the accumulator and jumping or branching to non-adjacent machine instructions.

    Putting these possibilities together in imaginative ways has led to higher level languages that offer virtual operations from groups of these instructions, e.g. languages like C offer several looping structures (combining arithmetic and branching) and libraries of functions for complex maths.

    Higher level, more abstract languages, like SQL for instance, offer more powerful virtual operations like creating subsets of data but, these operations are more specific to the range of tasks they are designed to complete.

    The computer itself, with its very low level of real operations, is a general purpose computing device. It can be put to work solving many diverse problems. I suggest that the higher the level of abstraction away from the computer the more specific (less general) are the uses to which languages may be put. Sure, it doesn't matter whether your data is about employees or astronomy or stock movements; a DBMS is generic in that sense, but you don't use a database to carry out image rendering, say, you'd implement another language for that type of task.

    So what I'm saying is that the number of uses people may want to put these general purpose computing machines to is essentially infinite and so a meta language to do everything you might conceive of must also be infinite.

    At least I think that's what I'm saying but I may have overstretched my wetware.
    ===
    Don't grumble about what you can't have;
    be grateful you don't get what you deserve.

  8. #8
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    BASIC - my peronal super language. "sigh" you can't beat the old ealy 90's version

    Code:
    10 REM A program to input your name
    20 PRINT"Enter your name "
    30 INPUT A$
    40 IF A% = "PIEMAN" GOTO 60 
    50 PRINT "That is not my name" GOTO 70
    60 PRINT "Yes! The pieman lives!" GOTO 70
    65 REM All is done, lets exit
    70 ENDPROC
    80 END
    Double Helix STL

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > This might be a strange question, but is it possible to make one language that will be able to do what every language does
    Like C for instance?
    http://en.wikipedia.org/wiki/Turing_completeness

    You can do in C what you can do in Perl, but only weirdos would try to do complex string handling and pattern matching in 1000's of lines of C which would be a 5-minute back of the envelope job in perl.

    A single language would be
    - huge (no use to the embedded market)
    - huge (impossible to debug the compiler)
    - huge (impossible to learn in a human lifetime)
    - hugh (Schilt books would cause deforrestation on a massive scale)

    As soon as you produced it, people would start ripping it apart and ignoring all the features which made no sense to them at all, and adding some new stuff which you forgot (or didn't think was necessary).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  10. #10
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    > (Schilt books would cause deforrestation on a massive scale)

    Salem, that us priceless. i couldn't help laughing. Poor old "herbie"
    Double Helix STL

  11. #11
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    My first C++ book, I bought it when I first tried t learn C++ 3 or 4 years ago (work pressed and I ended up abandining it just a couple of months later).

    The book is C/C++ Programmers's Reference. And it's meant to be just that... a reference. Well, guess what, not even so he managed to provide us with a good book. It's the worst reference I've ever seen. Dammit! What's wrong with this guy?
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  12. #12
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    He trys to hard to impress beginning programmers with the knowledge he has. The problem is, when these once newbie programmers get wiser and more language compliant, they can pick holes in his teaching practices. I am affraid to say, amy on this board already have done
    Double Helix STL

  13. #13
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    English.

  14. #14
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Actually spoken languages are notoriously incapable of doing many tasks. Bringing peace to the world, successfully running a business, building an airplane, ... As they say, it's all talk and no action.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  15. #15
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    The super language doesn't need to be big, as salem suggests.

    The super languages:
    http://compsoc.dur.ac.uk/whitespace/

    And of course,
    http://www.muppetlabs.com/~breadbox/bf/

    And since we are on the subject:
    http://en.wikipedia.org/wiki/Assembly_language
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What language did they make Java in?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 07-03-2005, 04:18 PM
  2. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 02:40 PM
  3. Language of choice after C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 47
    Last Post: 06-15-2004, 01:20 AM
  4. Languages dying
    By Zewu in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 07-29-2003, 10:08 AM
  5. Language Script..
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 03-30-2003, 06:48 AM