Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming

New NSA-Funded Code Rolls All Programming Languages Into One 306

An anonymous reader writes "What's your favorite programming language? Is it CSS? Is it JavaScript? Is it PHP, HTML5, or something else? Why choose? A new programming language developed by researchers at Carnegie Mellon University is all of those and more — one of the world's first "polyglot" programming languages. Sound cool? It is, except its development is partially funded by the National Security Agency, so let's look at it with a skeptical eye. It's called Wyvern — named after a mythical dragon-like thing that only has two legs instead of four — and it's supposed to help programmers design apps and websites without having to rely on a whole bunch of different stylesheets and different amalgamations spread across different files.
This discussion has been archived. No new comments can be posted.

New NSA-Funded Code Rolls All Programming Languages Into One

Comments Filter:
  • by Anonymous Coward on Sunday August 10, 2014 @07:10PM (#47644067)

    As you'd expect from CMU, the papers themselves are pretty interesting. Just read the abstracts instead of trying to guess from the summary or vice article, which are both way off the mark.

    http://www.cs.cmu.edu/~aldrich/papers/ecoop14-tsls.pdf
    http://www.cs.cmu.edu/~aldrich/papers/maspeghi13.pdf

  • by Animats ( 122034 ) on Sunday August 10, 2014 @07:16PM (#47644121) Homepage

    No, it doesn't "roll all languages into one". It just allows embedding of the text of another language, such as HTML, into a Wyvern program. Variables can be substituted. Like this:

    let webpage : HTML = <html><body><h1>Results for {keyword}</h1
    <ul id="results">{to_list_items(query(db,
    SELECT title, snippet FROM products WHERE {keyword} in title))}
    </ul></body></html>

    (except that the last 3 lines above should be indented, because this language uses Python-style block notation.)

    Of course, everybody does that now, but the way they do it, especially in PHP, tends to lead to problems such as SQL injection attacks. The idea here is that Wyvern has modules for the inserted text which understand what kinds of quoting or escaping are required for the embedded language text.

    I just glanced at the paper, but that seems to be the big new feature.

  • Re:why- just why? (Score:1, Informative)

    by Desler ( 1608317 ) on Sunday August 10, 2014 @07:34PM (#47644207)

    Except it's not proprietary. It's GPLv2 and on Github [github.com].

  • by Anonymous Coward on Sunday August 10, 2014 @09:53PM (#47644659)

    It's not just about quoting or escaping. It actually builds an AST for each TSL expression (for example, an HTML expression), so they can tell if the expression is valid and how to combine the Wyvern expression with the TSL expression containing it. It looks like brain-dead string concatenation, which reduces clutter and improves readability, but it gives you all the benefits of using the type system.

  • Re:stupid argument (Score:2, Informative)

    by nabsltd ( 1313397 ) on Monday August 11, 2014 @08:49AM (#47646243)

    CSS & HTML5 ***are*** code languages for programming machine behavior

    CSS & HTML5 are data that is interpreted by a computer program. They are not "code languages". The rule of thumb is that without some sort of control structure (if/then/else, loops, etc.), it's just data.

    For HTML, this becomes obvious once you see how many real languages (JavaScript, PHP, ColdFusion, VisualBasic/ASP, etc.) have been created to overcome its lack of control structures.

On the eighth day, God created FORTRAN.

Working...