Slashdot Mirror


Quadrilingual Crazy Programming

mtve writes: "Have you ever seen source code that is valid on four languages: Perl, C, Befunge, and BrainF*ck? During last Perlgolf season famous Perl hacker Jérôme Quelin submit such inconceivable masterpiece and now he published expanded explanation of his solution. Caution: that text can hurt your mental health. Play Perlgolf!"

2 of 194 comments (clear)

  1. How about 7 languages? by Zifter · · Score: 5, Informative
    What about the famous Polyglot?

    It runs/compiles under 7 languages: ANSI COBOL, ISO Pascal, ANSI Fortran, ANSI C, PostScript, Shell Script, and 8086 machine language!!! Check it out, it rocks.

  2. Re:Shouldn't this tell us something? by joto · · Score: 5, Informative
    This must be some of the worst bullshit I've heard about programming languages in quite some time.

    Did you even read the article. I'll challenge you to find languages with much more different syntax from C/Perl than Befunge-98 and Brainfuck!

    There used to be PASCAL for scientists, FORTRAN for mathematicians, BASIC for hobbyists or new programmers...

    Actually, Pascal was for education, (and systems-programming (once you added some much-needed non-standard extensions)). Fortran was for scientists (mathmaticians would probably be happier with Lisp, or something like Mathematica, only scientists needs actual numbers).

    Obj C, C, and C++ are very similar

    No, they are not. Well, ObjC and C are the most similar of the three, but modern C++ has little in common with idiomatic C. Java looks very similar to Objective C (which pretty much tells you how different C and Objective C are).

    ...and most of the new 'Basic' environments like REALBasic and VisualBasic are near clones as well.

    Maybe. My experience with VB didn't leave me thinking it was anything close to Java (or any other of the above mentioned languages). However, VB.NET is supposed to be so.

    All of today's popular coding environments could be condensed to Java, Objective C, Perl, and some form of BASIC.

    Well, if by popularity, you mean lots of users, or lots of jobs available, I am very confused why Objective C is on the list (although OS X should give it a boost). On the other hand, if you mean liked by it's users, you will hardly find any language not fitting that description. By any account, you need C++ on the list.

    But yes, I agree that such a list can be made, and mine would be: C, C++, Java, VB, Perl, COBOL, PL/SQL, HTML/XML, ASP/JSP/PHP, SAS, Python, Matlab, Fortran, Common Lisp, mostly in that order, but maybe COBOL even more to the front of the list.

    Anyway, there is no way to avoid C, C++ and or Java on the top of the list. (Which maybe was your point, but anyone taking more than a cursory glance at those languages will find that they are in fact very different from each other. They look similar on the surface, but are just as different as Pascal, Fortran and Basic).